[evolution-data-server] Coding style cleanups.



commit f56a4b63e2df1ae966619cf7633d1586e7c56179
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Sep 11 14:56:39 2010 -0400

    Coding style cleanups.

 addressbook/backends/file/e-book-backend-file.c    |   46 +-
 .../backends/groupwise/e-book-backend-groupwise.c  |  304 ++++----
 addressbook/backends/ldap/e-book-backend-ldap.c    |  364 ++++----
 addressbook/backends/ldap/openldap-extract.h       |  530 ++++++------
 addressbook/backends/vcf/e-book-backend-vcf.c      |   12 +-
 .../webdav/e-book-backend-webdav-factory.c         |    8 +-
 .../backends/webdav/e-book-backend-webdav.c        |  468 +++++-----
 addressbook/libebook/e-address-western.c           |   46 +-
 addressbook/libebook/e-book-query.c                |   52 +-
 addressbook/libebook/e-book-view.c                 |    2 +-
 addressbook/libebook/e-book.c                      |   14 +-
 addressbook/libebook/e-contact.c                   |   26 +-
 addressbook/libebook/e-destination.c               |    6 +-
 addressbook/libebook/e-error.h                     |    2 +-
 addressbook/libebook/e-name-western.c              |    6 +-
 addressbook/libebook/e-vcard.c                     |   50 +-
 addressbook/libebook/e-vcard.h                     |    2 +-
 addressbook/libedata-book/e-book-backend-cache.c   |    4 +-
 addressbook/libedata-book/e-book-backend-cache.h   |    4 +-
 .../libedata-book/e-book-backend-db-cache.c        |   34 +-
 .../libedata-book/e-book-backend-db-cache.h        |    8 +-
 addressbook/libedata-book/e-book-backend-sexp.c    |   64 +-
 addressbook/libedata-book/e-book-backend-summary.c |   52 +-
 addressbook/libedata-book/e-data-book-factory.c    |    4 +-
 addressbook/libedata-book/e-data-book.h            |    2 +-
 addressbook/tests/ebook/ebook-test-utils.c         |   48 +-
 addressbook/tests/ebook/test-changes.c             |    8 +-
 addressbook/tests/ebook/test-ebook.c               |    4 +-
 addressbook/tests/ebook/test-nonexistent-id.c      |    4 +-
 addressbook/tests/ebook/test-search.c              |    6 +-
 addressbook/tests/ebook/test-stress-bookviews.c    |    4 +-
 addressbook/tests/ebook/test-untyped-phones.c      |    2 +-
 addressbook/tests/vcard/dump-vcard.c               |    4 +-
 calendar/backends/caldav/e-cal-backend-caldav.c    |   10 +-
 .../backends/contacts/e-cal-backend-contacts.c     |    2 +-
 calendar/backends/file/e-cal-backend-file.c        |   36 +-
 .../groupwise/e-cal-backend-groupwise-utils.c      |   46 +-
 .../backends/groupwise/e-cal-backend-groupwise.c   |   18 +-
 calendar/backends/http/e-cal-backend-http.c        |    8 +-
 calendar/backends/weather/e-cal-backend-weather.c  |    6 +-
 calendar/backends/weather/e-weather-source-ccf.c   |   14 +-
 calendar/libecal/e-cal-check-timezones.c           |  152 ++--
 calendar/libecal/e-cal-check-timezones.h           |    8 +-
 calendar/libecal/e-cal-component.c                 |    4 +-
 calendar/libecal/e-cal-recur.c                     |   12 +-
 calendar/libecal/e-cal-system-timezone.c           |    8 +-
 calendar/libecal/e-cal-time-util.h                 |    2 +-
 calendar/libecal/e-cal-util.c                      |    8 +-
 calendar/libecal/e-cal-view.c                      |   10 +-
 calendar/libecal/e-cal.c                           |   34 +-
 calendar/libedata-cal/e-cal-backend-cache.h        |    4 +-
 calendar/libedata-cal/e-cal-backend-intervaltree.c |    8 +-
 calendar/libedata-cal/e-cal-backend-intervaltree.h |    2 +-
 calendar/libedata-cal/e-cal-backend-sexp.c         |   40 +-
 calendar/libedata-cal/e-cal-backend-store.h        |    6 +-
 calendar/libedata-cal/e-cal-backend-util.c         |    4 +-
 calendar/libedata-cal/e-data-cal-factory.c         |   10 +-
 calendar/libedata-cal/e-data-cal.h                 |    4 +-
 calendar/libedata-cal/test-intervaltree.c          |   28 +-
 calendar/tests/ecal/ecal-test-utils.c              |   38 +-
 calendar/tests/ecal/test-ecal.c                    |   10 +-
 calendar/tests/ecal/test-recur.c                   |    2 +-
 calendar/tests/ecal/test-search.c                  |    4 +-
 camel/camel-address.c                              |    8 +-
 camel/camel-block-file.c                           |  436 +++++-----
 camel/camel-block-file.h                           |   12 +-
 camel/camel-certdb.c                               |    2 +-
 camel/camel-charset-map.c                          |    8 +-
 camel/camel-charset-map.h                          |    6 +-
 camel/camel-cipher-context.h                       |   10 +-
 camel/camel-data-cache.c                           |   76 +-
 camel/camel-data-wrapper.h                         |    4 +-
 camel/camel-db.c                                   |   54 +-
 camel/camel-db.h                                   |    4 +-
 camel/camel-debug.c                                |   42 +-
 camel/camel-debug.h                                |    8 +-
 camel/camel-disco-diary.c                          |    2 +-
 camel/camel-disco-folder.c                         |   32 +-
 camel/camel-disco-folder.h                         |    2 +-
 camel/camel-disco-store.c                          |   18 +-
 camel/camel-disco-store.h                          |    2 +-
 camel/camel-file-utils.c                           |   36 +-
 camel/camel-file-utils.h                           |    2 +-
 camel/camel-filter-driver.c                        |   50 +-
 camel/camel-filter-driver.h                        |    2 +-
 camel/camel-filter-search.c                        |   48 +-
 camel/camel-folder-search.c                        |  568 ++++++------
 camel/camel-folder-search.h                        |   14 +-
 camel/camel-folder-summary.c                       |  948 ++++++++++----------
 camel/camel-folder-summary.h                       |   98 +-
 camel/camel-folder-thread.c                        |  278 +++---
 camel/camel-folder-thread.h                        |   16 +-
 camel/camel-folder.h                               |    8 +-
 camel/camel-gpg-context.c                          |  116 ++--
 camel/camel-html-parser.c                          |  142 ++--
 camel/camel-html-parser.h                          |   12 +-
 camel/camel-http-stream.c                          |   56 +-
 camel/camel-http-stream.h                          |    2 +-
 camel/camel-iconv.c                                |  112 ++--
 camel/camel-index-control.c                        |   76 +-
 camel/camel-index.h                                |   14 +-
 camel/camel-internet-address.c                     |  132 ++--
 camel/camel-internet-address.h                     |    2 +-
 camel/camel-list-utils.h                           |   32 +-
 camel/camel-lock-client.c                          |  114 ++--
 camel/camel-lock-client.h                          |    4 +-
 camel/camel-lock-helper.c                          |  104 ++--
 camel/camel-lock.c                                 |   92 +-
 camel/camel-lock.h                                 |   16 +-
 camel/camel-mime-filter-basic.c                    |   50 +-
 camel/camel-mime-filter-basic.h                    |    2 +-
 camel/camel-mime-filter-bestenc.c                  |   10 +-
 camel/camel-mime-filter-canon.c                    |    4 +-
 camel/camel-mime-filter-canon.h                    |    2 +-
 camel/camel-mime-filter-enriched.c                 |    6 +-
 camel/camel-mime-filter-from.c                     |   22 +-
 camel/camel-mime-filter-html.c                     |    4 +-
 camel/camel-mime-filter-index.h                    |    2 +-
 camel/camel-mime-filter-yenc.h                     |    2 +-
 camel/camel-mime-filter.c                          |   52 +-
 camel/camel-mime-message.c                         |   62 +-
 camel/camel-mime-message.h                         |    2 +-
 camel/camel-mime-parser.c                          |  360 ++++----
 camel/camel-mime-parser.h                          |    4 +-
 camel/camel-mime-part-utils.c                      |   24 +-
 camel/camel-mime-part-utils.h                      |    2 +-
 camel/camel-mime-part.c                            |   34 +-
 camel/camel-mime-utils.c                           |  684 +++++++-------
 camel/camel-mime-utils.h                           |    4 +-
 camel/camel-movemail.c                             |   98 +-
 camel/camel-multipart-signed.c                     |   76 +-
 camel/camel-multipart-signed.h                     |    2 +-
 camel/camel-multipart.c                            |   26 +-
 camel/camel-multipart.h                            |    2 +-
 camel/camel-net-utils.c                            |  108 ++--
 camel/camel-net-utils.h                            |    6 +-
 camel/camel-nntp-address.c                         |   18 +-
 camel/camel-object.c                               |    2 +-
 camel/camel-offline-folder.c                       |    4 +-
 camel/camel-operation.c                            |  182 ++--
 camel/camel-operation.h                            |   30 +-
 camel/camel-partition-table.c                      |    8 +-
 camel/camel-partition-table.h                      |    6 +-
 camel/camel-provider.c                             |   56 +-
 camel/camel-sasl-digest-md5.c                      |    4 +-
 camel/camel-sasl-gssapi.c                          |    4 +-
 camel/camel-sasl-ntlm.c                            |  134 ++--
 camel/camel-sasl-popb4smtp.c                       |   20 +-
 camel/camel-search-private.c                       |  158 ++--
 camel/camel-search-private.h                       |   16 +-
 camel/camel-search-sql-sexp.c                      |  156 ++--
 camel/camel-search-sql.c                           |   86 +-
 camel/camel-seekable-stream.h                      |    2 +-
 camel/camel-seekable-substream.c                   |   10 +-
 camel/camel-seekable-substream.h                   |    2 +-
 camel/camel-service.c                              |    6 +-
 camel/camel-session.c                              |   44 +-
 camel/camel-session.h                              |    2 +-
 camel/camel-smime-context.h                        |   12 +-
 camel/camel-store-summary.h                        |   48 +-
 camel/camel-store.c                                |  142 ++--
 camel/camel-store.h                                |    4 +-
 camel/camel-stream-buffer.c                        |   16 +-
 camel/camel-stream-filter.c                        |   46 +-
 camel/camel-stream-fs.c                            |    4 +-
 camel/camel-stream-mem.c                           |   12 +-
 camel/camel-stream-mem.h                           |    2 +-
 camel/camel-stream-null.c                          |    2 +-
 camel/camel-stream-process.c                       |    2 +-
 camel/camel-string-utils.c                         |   18 +-
 camel/camel-string-utils.h                         |    8 +-
 camel/camel-tcp-stream-raw.c                       |   44 +-
 camel/camel-tcp-stream-ssl.c                       |  126 ++--
 camel/camel-tcp-stream.h                           |    2 +-
 camel/camel-text-index.h                           |    6 +-
 camel/camel-trie.c                                 |    2 +-
 camel/camel-url.c                                  |   54 +-
 camel/camel-url.h                                  |    4 +-
 camel/camel-utf8.c                                 |   74 +-
 camel/camel-utf8.h                                 |   14 +-
 camel/camel-vee-folder.h                           |    4 +-
 camel/camel-vee-summary.c                          |   92 +-
 camel/camel-vtrash-folder.c                        |   30 +-
 camel/camel.c                                      |   30 +-
 camel/db-scrap-tools/db.c                          |   18 +-
 camel/providers/groupwise/camel-groupwise-folder.c |  180 ++--
 camel/providers/groupwise/camel-groupwise-folder.h |    2 +-
 .../providers/groupwise/camel-groupwise-journal.c  |    2 +-
 .../providers/groupwise/camel-groupwise-private.h  |    8 +-
 .../providers/groupwise/camel-groupwise-provider.c |    2 +-
 .../groupwise/camel-groupwise-store-summary.c      |  224 +++---
 .../groupwise/camel-groupwise-store-summary.h      |   16 +-
 camel/providers/groupwise/camel-groupwise-store.c  |  136 ++--
 camel/providers/groupwise/camel-groupwise-store.h  |    2 +-
 .../providers/groupwise/camel-groupwise-summary.c  |   50 +-
 .../groupwise/camel-groupwise-transport.c          |    2 +-
 camel/providers/groupwise/camel-groupwise-utils.c  |   40 +-
 camel/providers/imap/camel-imap-command.c          |   16 +-
 camel/providers/imap/camel-imap-folder.c           |  184 ++--
 camel/providers/imap/camel-imap-message-cache.c    |   22 +-
 camel/providers/imap/camel-imap-message-cache.h    |    2 +-
 camel/providers/imap/camel-imap-private.h          |    8 +-
 camel/providers/imap/camel-imap-provider.c         |    4 +-
 camel/providers/imap/camel-imap-search.c           |  126 ++--
 camel/providers/imap/camel-imap-store-summary.c    |  198 ++--
 camel/providers/imap/camel-imap-store-summary.h    |   14 +-
 camel/providers/imap/camel-imap-store.c            |  354 ++++----
 camel/providers/imap/camel-imap-store.h            |    4 +-
 camel/providers/imap/camel-imap-summary.c          |   42 +-
 camel/providers/imap/camel-imap-utils.c            |   16 +-
 camel/providers/imapx/camel-imapx-conn-manager.c   |   40 +-
 camel/providers/imapx/camel-imapx-folder.c         |   62 +-
 camel/providers/imapx/camel-imapx-provider.c       |   20 +-
 camel/providers/imapx/camel-imapx-server.c         |  912 ++++++++++----------
 camel/providers/imapx/camel-imapx-server.h         |    6 +-
 camel/providers/imapx/camel-imapx-store-summary.c  |  180 ++--
 camel/providers/imapx/camel-imapx-store.c          |  254 +++---
 camel/providers/imapx/camel-imapx-stream.c         |  128 ++--
 camel/providers/imapx/camel-imapx-summary.c        |   36 +-
 camel/providers/imapx/camel-imapx-utils.c          |  588 ++++++------
 camel/providers/imapx/camel-imapx-utils.h          |   48 +-
 camel/providers/imapx/camel-imapx-view-summary.c   |   64 +-
 camel/providers/local/camel-local-folder.c         |  178 ++--
 camel/providers/local/camel-local-provider.c       |   28 +-
 camel/providers/local/camel-local-store.c          |   94 +-
 camel/providers/local/camel-local-summary.c        |  200 ++--
 camel/providers/local/camel-local-summary.h        |   16 +-
 camel/providers/local/camel-maildir-folder.c       |   16 +-
 camel/providers/local/camel-maildir-folder.h       |    4 +-
 camel/providers/local/camel-maildir-store.c        |  224 +++---
 camel/providers/local/camel-maildir-store.h        |    2 +-
 camel/providers/local/camel-maildir-summary.c      |  296 +++---
 camel/providers/local/camel-maildir-summary.h      |    4 +-
 camel/providers/local/camel-mbox-folder.c          |  128 ++--
 camel/providers/local/camel-mbox-folder.h          |    4 +-
 camel/providers/local/camel-mbox-store.c           |  368 ++++----
 camel/providers/local/camel-mbox-summary.c         |  396 ++++----
 camel/providers/local/camel-mbox-summary.h         |    4 +-
 camel/providers/local/camel-mh-folder.c            |   18 +-
 camel/providers/local/camel-mh-folder.h            |    4 +-
 camel/providers/local/camel-mh-store.c             |  158 ++--
 camel/providers/local/camel-mh-summary.c           |  114 ++--
 camel/providers/local/camel-mh-summary.h           |    2 +-
 camel/providers/local/camel-spool-folder.c         |   30 +-
 camel/providers/local/camel-spool-folder.h         |    4 +-
 camel/providers/local/camel-spool-store.c          |  150 ++--
 camel/providers/local/camel-spool-summary.c        |   76 +-
 camel/providers/local/camel-spool-summary.h        |   16 +-
 camel/providers/nntp/camel-nntp-folder.c           |   52 +-
 camel/providers/nntp/camel-nntp-folder.h           |    2 +-
 camel/providers/nntp/camel-nntp-provider.c         |    6 +-
 camel/providers/nntp/camel-nntp-store-summary.c    |   38 +-
 camel/providers/nntp/camel-nntp-store-summary.h    |   12 +-
 camel/providers/nntp/camel-nntp-store.c            |  212 +++---
 camel/providers/nntp/camel-nntp-store.h            |    4 +-
 camel/providers/nntp/camel-nntp-summary.c          |   10 +-
 camel/providers/nntp/camel-nntp-summary.h          |    4 +-
 camel/providers/nntp/test-newsrc.c                 |    2 +-
 camel/providers/pop3/camel-pop3-engine.c           |   94 +-
 camel/providers/pop3/camel-pop3-engine.h           |    2 +-
 camel/providers/pop3/camel-pop3-folder.c           |  126 ++--
 camel/providers/pop3/camel-pop3-folder.h           |    2 +-
 camel/providers/pop3/camel-pop3-provider.c         |   10 +-
 camel/providers/pop3/camel-pop3-store.c            |   42 +-
 camel/providers/sendmail/camel-sendmail-provider.c |    4 +-
 camel/providers/smtp/camel-smtp-provider.c         |    4 +-
 camel/providers/smtp/camel-smtp-transport.c        |    8 +-
 camel/tests/folder/test1.c                         |   10 +-
 camel/tests/folder/test10.c                        |   16 +-
 camel/tests/folder/test11.c                        |   96 +-
 camel/tests/folder/test2.c                         |    8 +-
 camel/tests/folder/test3.c                         |  176 ++--
 camel/tests/folder/test4.c                         |   12 +-
 camel/tests/folder/test5.c                         |   14 +-
 camel/tests/folder/test6.c                         |   12 +-
 camel/tests/folder/test7.c                         |   14 +-
 camel/tests/folder/test8.c                         |   88 +-
 camel/tests/folder/test9.c                         |  100 +-
 camel/tests/lib/address-data.h                     |    2 +-
 camel/tests/lib/addresses.c                        |   46 +-
 camel/tests/lib/addresses.h                        |    2 +-
 camel/tests/lib/camel-test-provider.c              |    6 +-
 camel/tests/lib/camel-test-provider.h              |    2 +-
 camel/tests/lib/camel-test.c                       |  112 ++--
 camel/tests/lib/camel-test.h                       |   32 +-
 camel/tests/lib/folders.c                          |  410 +++++-----
 camel/tests/lib/folders.h                          |   12 +-
 camel/tests/lib/messages.c                         |  106 ++--
 camel/tests/lib/messages.h                         |   16 +-
 camel/tests/lib/streams.c                          |  192 ++--
 camel/tests/lib/streams.h                          |    8 +-
 camel/tests/message/test1.c                        |   98 +-
 camel/tests/message/test2.c                        |  270 +++---
 camel/tests/message/test3.c                        |  190 ++--
 camel/tests/mime-filter/test-charset.c             |    2 +-
 camel/tests/mime-filter/test-crlf.c                |    2 +-
 camel/tests/mime-filter/test-tohtml.c              |   88 +-
 camel/tests/mime-filter/test1.c                    |   24 +-
 camel/tests/misc/split.c                           |   36 +-
 camel/tests/misc/test1.c                           |   12 +-
 camel/tests/misc/test2.c                           |   30 +-
 camel/tests/misc/utf7.c                            |   34 +-
 camel/tests/smime/pgp.c                            |   26 +-
 camel/tests/stream/test1.c                         |   56 +-
 camel/tests/stream/test2.c                         |   22 +-
 camel/tests/stream/test3.c                         |   62 +-
 .../libecal/tmpl/e-cal-check-timezones.sgml        |    1 +
 .../reference/camel/tmpl/camel-cipher-context.sgml |    2 +
 libebackend/e-db3-utils.c                          |    4 +-
 libebackend/e-dbhash.c                             |   12 +-
 libedataserver/e-account-list.c                    |   42 +-
 libedataserver/e-account-list.h                    |    4 +-
 libedataserver/e-account.c                         |  166 ++--
 libedataserver/e-iterator.c                        |   38 +-
 libedataserver/e-list-iterator.c                   |   66 +-
 libedataserver/e-list.c                            |   36 +-
 libedataserver/e-memory.c                          |  106 ++--
 libedataserver/e-memory.h                          |   14 +-
 libedataserver/e-proxy.c                           |   10 +-
 libedataserver/e-sexp.c                            |  534 ++++++------
 libedataserver/e-sexp.h                            |    2 +-
 libedataserver/e-source-group.c                    |    2 +-
 libedataserver/e-source.h                          |    2 +-
 libedataserver/e-time-utils.c                      |   32 +-
 libedataserver/e-url.c                             |    8 +-
 libedataserverui/e-cell-renderer-color.c           |    2 +-
 libedataserverui/e-contact-store.c                 |    2 +-
 libedataserverui/e-destination-store.c             |    8 +-
 libedataserverui/e-name-selector-dialog.c          |   22 +-
 libedataserverui/e-name-selector-dialog.h          |    2 +-
 libedataserverui/e-name-selector-entry.c           |   26 +-
 libedataserverui/e-name-selector-list.c            |   26 +-
 libedataserverui/e-passwords.c                     |    4 +-
 libedataserverui/e-passwords.h                     |    4 +-
 libedataserverui/e-source-selector.c               |    6 +-
 libedataserverui/e-source-selector.h               |    6 +-
 libedataserverui/e-tree-model-generator.h          |    2 +-
 libedataserverui/test-name-selector.c              |    2 +-
 servers/groupwise/e-gw-connection.c                |   34 +-
 servers/groupwise/e-gw-connection.h                |    6 +-
 servers/groupwise/e-gw-container.c                 |   16 +-
 servers/groupwise/e-gw-container.h                 |   14 +-
 servers/groupwise/e-gw-filter.c                    |    2 +-
 servers/groupwise/e-gw-filter.h                    |    2 +-
 servers/groupwise/e-gw-item.c                      |   50 +-
 servers/groupwise/e-gw-proxy.c                     |   10 +-
 servers/groupwise/soup-soap-response.c             |    2 +-
 347 files changed, 10450 insertions(+), 10447 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index dc6a703..fa3fb6b 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -112,7 +112,7 @@ db_error_to_gerror (const gint db_error, GError **perror)
 }
 
 static void
-string_to_dbt(const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str, DBT *dbt)
 {
 	memset (dbt, 0, sizeof (*dbt));
 	dbt->data = (gpointer)str;
@@ -147,19 +147,19 @@ build_summary (EBookBackendFilePrivate *bfpriv)
 
 	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	memset (&id_dbt, 0, sizeof (id_dbt));
-	db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+	db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_FIRST);
 
 	while (db_error == 0) {
 
 		/* don't include the version in the list of cards */
-		if (id_dbt.size != strlen(E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
+		if (id_dbt.size != strlen (E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
 		    || strcmp (id_dbt.data, E_BOOK_BACKEND_FILE_VERSION_NAME)) {
 			EContact *contact = create_contact (id_dbt.data, vcard_dbt.data);
 			e_book_backend_summary_add_contact (bfpriv->summary, contact);
 			g_object_unref (contact);
 		}
 
-		db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+		db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 
 	}
 
@@ -185,7 +185,7 @@ set_revision (EContact *contact)
 	const struct tm *tm = NULL;
 	time_t t;
 
-	t = time(NULL);
+	t = time (NULL);
 	tm = gmtime (&t);
 	if (tm)
 		strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
@@ -194,7 +194,7 @@ set_revision (EContact *contact)
 }
 
 static gboolean
-do_create(EBookBackendFile  *bf,
+do_create (EBookBackendFile  *bf,
 	  const gchar      *vcard_req,
 	  EContact **contact,
 	  GError **perror)
@@ -466,12 +466,12 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend,
 		memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 		vcard_dbt.flags = DB_DBT_MALLOC;
 		memset (&id_dbt, 0, sizeof (id_dbt));
-		db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+		db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_FIRST);
 
 		while (db_error == 0) {
 
 			/* don't include the version in the list of cards */
-			if (id_dbt.size != strlen(E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
+			if (id_dbt.size != strlen (E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
 			    || strcmp (id_dbt.data, E_BOOK_BACKEND_FILE_VERSION_NAME)) {
 
 				if ((!search_needed) || (card_sexp != NULL && e_book_backend_sexp_match_vcard  (card_sexp, vcard_dbt.data))) {
@@ -479,7 +479,7 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend,
 				}
 			}
 
-			db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+			db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 
 		}
 		g_object_unref (card_sexp);
@@ -491,7 +491,7 @@ e_book_backend_file_get_contact_list (EBookBackendSync *backend,
 			db_error_to_gerror (db_error, perror);
 		}
 
-		db_error = dbc->c_close(dbc);
+		db_error = dbc->c_close (dbc);
 		if (db_error != 0) {
 			g_warning (G_STRLOC ": dbc->c_close failed with %s", db_strerror (db_error));
 		}
@@ -618,7 +618,7 @@ book_view_thread (gpointer data)
 		db_error = db->cursor (db, NULL, &dbc, 0);
 		if (db_error == 0) {
 
-			db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+			db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_FIRST);
 			while (db_error == 0) {
 
 				if (!e_flag_is_set (closure->running))
@@ -634,7 +634,7 @@ book_view_thread (gpointer data)
 					g_free (vcard_dbt.data);
 				}
 
-				db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+				db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 			}
 
 			dbc->c_close (dbc);
@@ -777,12 +777,12 @@ e_book_backend_file_get_changes (EBookBackendSync *backend,
 	if (db_error != 0) {
 		g_warning (G_STRLOC ": db->cursor failed with %s", db_strerror (db_error));
 	} else {
-		db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+		db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_FIRST);
 
 		while (db_error == 0) {
 
 			/* don't include the version in the list of cards */
-			if (id_dbt.size != strlen(E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
+			if (id_dbt.size != strlen (E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
 			    || strcmp (id_dbt.data, E_BOOK_BACKEND_FILE_VERSION_NAME)) {
 				EContact *contact;
 				gchar *id = id_dbt.data;
@@ -803,20 +803,20 @@ e_book_backend_file_get_changes (EBookBackendSync *backend,
 				/* check what type of change has occurred, if any */
 				switch (e_dbhash_compare (ehash, id, vcard_string)) {
 				case E_DBHASH_STATUS_SAME:
-					g_free(vcard_string);
+					g_free (vcard_string);
 					break;
 				case E_DBHASH_STATUS_NOT_FOUND:
 					ctx.add_cards = g_list_append (ctx.add_cards, vcard_string);
-					ctx.add_ids = g_list_append (ctx.add_ids, g_strdup(id));
+					ctx.add_ids = g_list_append (ctx.add_ids, g_strdup (id));
 					break;
 				case E_DBHASH_STATUS_DIFFERENT:
 					ctx.mod_cards = g_list_append (ctx.mod_cards, vcard_string);
-					ctx.mod_ids = g_list_append (ctx.mod_ids, g_strdup(id));
+					ctx.mod_ids = g_list_append (ctx.mod_ids, g_strdup (id));
 					break;
 				}
 			}
 
-			db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+			db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 		}
 		dbc->c_close (dbc);
 	}
@@ -919,7 +919,7 @@ e_book_backend_file_get_required_fields (EBookBackendSync *backend,
 {
 	GList *fields = NULL;
 
-	fields = g_list_append (fields , g_strdup(e_contact_field_name (E_CONTACT_FILE_AS)));
+	fields = g_list_append (fields , g_strdup (e_contact_field_name (E_CONTACT_FILE_AS)));
 	*fields_out = fields;
 }
 
@@ -993,10 +993,10 @@ e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
 		memset (&id_dbt, 0, sizeof (id_dbt));
 		memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 
-		db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+		db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_FIRST);
 
 		while (db_error == 0) {
-			if (id_dbt.size != strlen(E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
+			if (id_dbt.size != strlen (E_BOOK_BACKEND_FILE_VERSION_NAME) + 1
 			    || strcmp (id_dbt.data, E_BOOK_BACKEND_FILE_VERSION_NAME)) {
 				EContact *contact;
 
@@ -1028,7 +1028,7 @@ e_book_backend_file_upgrade_db (EBookBackendFile *bf, gchar *old_version)
 				g_object_unref (contact);
 			}
 
-			db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+			db_error = dbc->c_get (dbc, &id_dbt, &vcard_dbt, DB_NEXT);
 		}
 
 		dbc->c_close (dbc);
@@ -1145,7 +1145,7 @@ e_book_backend_file_load_source (EBookBackend           *backend,
 
 		db_error = (*env->open) (env, NULL, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_THREAD, 0);
 		if (db_error != 0) {
-			env->close(env, 0);
+			env->close (env, 0);
 			g_warning ("db_env_open failed with %s", db_strerror (db_error));
 			G_UNLOCK (global_env);
 			g_free (dirname);
diff --git a/addressbook/backends/groupwise/e-book-backend-groupwise.c b/addressbook/backends/groupwise/e-book-backend-groupwise.c
index 75cd78d..d9bb87a 100644
--- a/addressbook/backends/groupwise/e-book-backend-groupwise.c
+++ b/addressbook/backends/groupwise/e-book-backend-groupwise.c
@@ -383,7 +383,7 @@ populate_address (EContact *contact, gpointer data)
 	contact_addr = NULL;
 
 	if (address) {
-		contact_addr = g_new0(EContactAddress, 1);
+		contact_addr = g_new0 (EContactAddress, 1);
 		copy_postal_address_to_contact_address (contact_addr, address);
 		e_contact_set (contact, E_CONTACT_ADDRESS_HOME, contact_addr);
 		e_contact_address_free (contact_addr);
@@ -391,7 +391,7 @@ populate_address (EContact *contact, gpointer data)
 
 	address = e_gw_item_get_address (item, "Office");
 	if (address) {
-		contact_addr = g_new0(EContactAddress, 1);
+		contact_addr = g_new0 (EContactAddress, 1);
 		copy_postal_address_to_contact_address (contact_addr, address);
 		e_contact_set (contact, E_CONTACT_ADDRESS_WORK, contact_addr);
 		e_contact_address_free (contact_addr);
@@ -409,7 +409,7 @@ set_address_in_gw_item (EGwItem *item, gpointer data)
 
 	contact_address = e_contact_get (contact, E_CONTACT_ADDRESS_HOME);
 	if (contact_address) {
-		address = g_new0(PostalAddress, 1);
+		address = g_new0 (PostalAddress, 1);
 		copy_contact_address_to_postal_address (address, contact_address);
 		e_gw_item_set_address (item, "Home", address);
 		e_contact_address_free (contact_address);
@@ -417,7 +417,7 @@ set_address_in_gw_item (EGwItem *item, gpointer data)
 
 	contact_address = e_contact_get (contact, E_CONTACT_ADDRESS_WORK);
 	if (contact_address) {
-		address = g_new0(PostalAddress, 1);
+		address = g_new0 (PostalAddress, 1);
 		copy_contact_address_to_postal_address (address, contact_address);
 		e_gw_item_set_address (item, "Office", address);
 		e_contact_address_free (contact_address);
@@ -429,7 +429,7 @@ copy_postal_address (PostalAddress *address)
 {
 	PostalAddress *address_copy;
 
-	address_copy = g_new0(PostalAddress, 1);
+	address_copy = g_new0 (PostalAddress, 1);
 
 	address_copy->street_address = g_strdup (address->street_address);
 	address_copy->location = g_strdup (address->location);
@@ -447,7 +447,7 @@ set_postal_address_change (EGwItem *new_item, EGwItem *old_item, const gchar *ad
 	PostalAddress *new_postal_address;
 	PostalAddress *update_postal_address, *delete_postal_address;
 	gchar *s1, *s2;
-	update_postal_address = g_new0(PostalAddress, 1);
+	update_postal_address = g_new0 (PostalAddress, 1);
 	delete_postal_address = g_new0 (PostalAddress, 1);
 
 	new_postal_address = e_gw_item_get_address (new_item,  address_type);
@@ -456,51 +456,51 @@ set_postal_address_change (EGwItem *new_item, EGwItem *old_item, const gchar *ad
 		s1 = new_postal_address->street_address;
 		s2 = old_postal_address->street_address;
 		if (!s1 && s2)
-			delete_postal_address->street_address = g_strdup(s2);
+			delete_postal_address->street_address = g_strdup (s2);
 		else if (s1)
-			update_postal_address->street_address = g_strdup(s1);
+			update_postal_address->street_address = g_strdup (s1);
 
 		s1 =  new_postal_address->location;
 		s2 = old_postal_address->location;
 		if (!s1 && s2)
-			delete_postal_address->location = g_strdup(s2);
+			delete_postal_address->location = g_strdup (s2);
 		else if (s1)
-			update_postal_address->location = g_strdup(s1);
+			update_postal_address->location = g_strdup (s1);
 
 		s1 = new_postal_address->city;
 		s2 = old_postal_address->city;
 		if (!s1 && s2)
-			delete_postal_address->city = g_strdup(s2);
+			delete_postal_address->city = g_strdup (s2);
 		else if (s1)
-			update_postal_address->city = g_strdup(s1);
+			update_postal_address->city = g_strdup (s1);
 
 		s1 =  new_postal_address->state;
 		s2 = old_postal_address->state;
 		if (!s1 && s2)
-			delete_postal_address->state = g_strdup(s2);
+			delete_postal_address->state = g_strdup (s2);
 		else if (s1)
-			update_postal_address->state = g_strdup(s1);
+			update_postal_address->state = g_strdup (s1);
 		s1 =  new_postal_address->postal_code;
 		s2 = old_postal_address->postal_code;
 		if (!s1 && s2)
-			delete_postal_address->postal_code = g_strdup(s2);
+			delete_postal_address->postal_code = g_strdup (s2);
 		else if (s1)
-			update_postal_address->postal_code = g_strdup(s1);
+			update_postal_address->postal_code = g_strdup (s1);
 
 		s1 =  new_postal_address->country;
 		s2 =  old_postal_address->country;
 		if (!s1 && s2)
-			delete_postal_address->country = g_strdup(s2);
+			delete_postal_address->country = g_strdup (s2);
 		else if (s1)
-			update_postal_address->country = g_strdup(s1);
+			update_postal_address->country = g_strdup (s1);
 
 		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_UPDATE, address_type, update_postal_address);
 		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_DELETE, address_type, delete_postal_address);
 
 	} else if (!new_postal_address && old_postal_address) {
-		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_DELETE, address_type, copy_postal_address(old_postal_address));
+		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_DELETE, address_type, copy_postal_address (old_postal_address));
 	} else if (new_postal_address && !old_postal_address) {
-		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_ADD, address_type, copy_postal_address(new_postal_address));
+		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_ADD, address_type, copy_postal_address (new_postal_address));
 	}
 }
 
@@ -580,7 +580,7 @@ populate_emails (EContact *contact, gpointer data)
 	gint i;
 
 	item = E_GW_ITEM (data);
-	email_list = e_gw_item_get_email_list(item);
+	email_list = e_gw_item_get_email_list (item);
 
 	for (i =0; i < 3 && email_list; i++, email_list = g_list_next (email_list)) {
 		if (email_list->data)
@@ -662,7 +662,7 @@ populate_full_name (EContact *contact, gpointer data)
 	FullName  *full_name;
 	gchar *full_name_string;
 
-	item = E_GW_ITEM(data);
+	item = E_GW_ITEM (data);
 	full_name = e_gw_item_get_full_name (item);
 	if (full_name) {
 		full_name_string = g_strconcat ( (full_name->first_name == NULL) ? "\0" :    full_name->first_name, " ",
@@ -706,7 +706,7 @@ set_full_name_in_gw_item (EGwItem *item, gpointer data)
 static FullName *
 copy_full_name (FullName *full_name)
 {
-	FullName *full_name_copy = g_new0(FullName, 1);
+	FullName *full_name_copy = g_new0 (FullName, 1);
 	full_name_copy->name_prefix = g_strdup (full_name->name_prefix);
 	full_name_copy->first_name =  g_strdup (full_name->first_name);
 	full_name_copy->middle_name = g_strdup (full_name->middle_name);
@@ -722,7 +722,7 @@ set_full_name_changes (EGwItem *new_item, EGwItem *old_item)
 	FullName *new_full_name;
 	FullName  *update_full_name, *delete_full_name;
 	gchar *s1, *s2;
-	update_full_name = g_new0(FullName, 1);
+	update_full_name = g_new0 (FullName, 1);
 	delete_full_name = g_new0 (FullName, 1);
 
 	old_full_name = e_gw_item_get_full_name (old_item);
@@ -732,34 +732,34 @@ set_full_name_changes (EGwItem *new_item, EGwItem *old_item)
 		s1 = new_full_name->name_prefix;
 		s2 = old_full_name->name_prefix;
 		if (!s1 && s2)
-			delete_full_name->name_prefix = g_strdup(s2);
+			delete_full_name->name_prefix = g_strdup (s2);
 		else if (s1)
-			update_full_name->name_prefix = g_strdup(s1);
+			update_full_name->name_prefix = g_strdup (s1);
 		s1 = new_full_name->first_name;
 		s2  = old_full_name->first_name;
 		if (!s1 && s2)
-			delete_full_name->first_name = g_strdup(s2);
+			delete_full_name->first_name = g_strdup (s2);
 		else if (s1)
-			update_full_name->first_name = g_strdup(s1);
+			update_full_name->first_name = g_strdup (s1);
 		s1 = new_full_name->middle_name;
 		s2  = old_full_name->middle_name;
 		if (!s1 && s2)
-			delete_full_name->middle_name = g_strdup(s2);
+			delete_full_name->middle_name = g_strdup (s2);
 		else if (s1)
-			update_full_name->middle_name = g_strdup(s1);
+			update_full_name->middle_name = g_strdup (s1);
 
 		s1 = new_full_name->last_name;
 		s2 = old_full_name->last_name;
 		if (!s1 && s2)
-			delete_full_name->last_name = g_strdup(s2);
+			delete_full_name->last_name = g_strdup (s2);
 		else if (s1)
-			update_full_name->last_name = g_strdup(s1);
+			update_full_name->last_name = g_strdup (s1);
 		s1 = new_full_name->name_suffix;
 		s2  = old_full_name->name_suffix;
 		if (!s1 && s2)
-			delete_full_name->name_suffix = g_strdup(s2);
+			delete_full_name->name_suffix = g_strdup (s2);
 		else if (s1)
-			update_full_name->name_suffix = g_strdup(s1);
+			update_full_name->name_suffix = g_strdup (s1);
 		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_UPDATE,"full_name",  update_full_name);
 		e_gw_item_set_change (new_item, E_GW_ITEM_CHANGE_TYPE_DELETE,"full_name",  delete_full_name);
 
@@ -776,7 +776,7 @@ populate_contact_members (EContact *contact, gpointer data)
 	EGwItem *item;
 	GList *member_list;
 
-	item = E_GW_ITEM(data);
+	item = E_GW_ITEM (data);
 	member_list = e_gw_item_get_member_list (item);
 
 	for (; member_list != NULL; member_list = g_list_next (member_list)) {
@@ -919,20 +919,20 @@ set_members_in_gw_item (EGwItem  *item, EContact *contact, EBookBackendGroupwise
 
 	temp = emails_without_ids;
 	dtemp = dest_without_ids;
-	for (; temp != NULL && dtemp != NULL; temp = g_list_next (temp), dtemp = g_list_next(dtemp)) {
+	for (; temp != NULL && dtemp != NULL; temp = g_list_next (temp), dtemp = g_list_next (dtemp)) {
 		EContact *new_contact = e_contact_new ();
 		EGwItem *new_item = e_gw_item_new_empty ();
 		FullName *full_name;
 		EDestination *tdest = (EDestination *)dtemp->data;
 
-		e_contact_set (new_contact,E_CONTACT_FULL_NAME, e_contact_name_from_string (strdup (e_destination_get_email(tdest))));
-		e_contact_set (new_contact, E_CONTACT_EMAIL_1, strdup (e_destination_get_email(tdest)));
+		e_contact_set (new_contact,E_CONTACT_FULL_NAME, e_contact_name_from_string (strdup (e_destination_get_email (tdest))));
+		e_contact_set (new_contact, E_CONTACT_EMAIL_1, strdup (e_destination_get_email (tdest)));
 		e_contact_set (new_contact, E_CONTACT_IS_LIST, GINT_TO_POINTER (FALSE));
 		e_gw_item_set_item_type (new_item, E_GW_ITEM_TYPE_CONTACT);
-		e_gw_item_set_container_id (new_item, g_strdup(egwb->priv->container_id));
+		e_gw_item_set_container_id (new_item, g_strdup (egwb->priv->container_id));
 		full_name = g_new0 (FullName, 1);
 		full_name->name_prefix = NULL;
-		full_name->first_name = g_strdup(e_destination_get_name(tdest));
+		full_name->first_name = g_strdup (e_destination_get_name (tdest));
 		full_name->middle_name = NULL;
 		full_name->last_name = NULL;
 		full_name->name_suffix = NULL;
@@ -1065,7 +1065,7 @@ set_categories_in_gw_item (EGwItem *item, EContact *contact, EBookBackendGroupwi
 	category_ids = NULL;
 	id = NULL;
 	for (; category_names != NULL; category_names = g_list_next (category_names)) {
-		if (!category_names->data || strlen(category_names->data) == 0 )
+		if (!category_names->data || strlen (category_names->data) == 0 )
 			continue;
 		id = g_hash_table_lookup (categories_by_name, category_names->data);
 		if (id)
@@ -1073,7 +1073,7 @@ set_categories_in_gw_item (EGwItem *item, EContact *contact, EBookBackendGroupwi
 		else {
 			EGwItem *category_item;
 
-			category_item = e_gw_item_new_empty();
+			category_item = e_gw_item_new_empty ();
 			e_gw_item_set_item_type (category_item,  E_GW_ITEM_TYPE_CATEGORY);
 			e_gw_item_set_category_name (category_item, category_names->data);
 			status = e_gw_connection_create_item (egwb->priv->cnc, category_item, &id);
@@ -1081,11 +1081,11 @@ set_categories_in_gw_item (EGwItem *item, EContact *contact, EBookBackendGroupwi
 				gchar **components = g_strsplit (id, "@", -1);
 				gchar *temp_id = components[0];
 
-				g_hash_table_insert (categories_by_name, g_strdup (category_names->data), g_strdup(temp_id));
-				g_hash_table_insert (egwb->priv->categories_by_id, g_strdup(temp_id), g_strdup (category_names->data));
-				category_ids = g_list_append (category_ids, g_strdup(temp_id));
+				g_hash_table_insert (categories_by_name, g_strdup (category_names->data), g_strdup (temp_id));
+				g_hash_table_insert (egwb->priv->categories_by_id, g_strdup (temp_id), g_strdup (category_names->data));
+				category_ids = g_list_append (category_ids, g_strdup (temp_id));
 				g_free (id);
-				g_strfreev(components);
+				g_strfreev (components);
 			}
 			g_object_unref (category_item);
 		}
@@ -1179,7 +1179,7 @@ fill_contact_from_gw_item (EContact *contact, EGwItem *item, GHashTable *categor
 				}
 			}
 			else
-				mappings[i].populate_contact_func(contact, item);
+				mappings[i].populate_contact_func (contact, item);
 		}
 	}
 }
@@ -1220,15 +1220,15 @@ e_book_backend_groupwise_create_contact (EBookBackend *backend,
 			e_data_book_respond_create (book, opid, EDB_ERROR (PERMISSION_DENIED), NULL);
 			return;
 		}
-		contact = e_contact_new_from_vcard(vcard);
+		contact = e_contact_new_from_vcard (vcard);
 		item = e_gw_item_new_empty ();
 		e_gw_item_set_item_type (item, e_contact_get (contact, E_CONTACT_IS_LIST) ? E_GW_ITEM_TYPE_GROUP :E_GW_ITEM_TYPE_CONTACT);
-		e_gw_item_set_container_id (item, g_strdup(egwb->priv->container_id));
+		e_gw_item_set_container_id (item, g_strdup (egwb->priv->container_id));
 
 		for (i = 0; i < G_N_ELEMENTS (mappings); i++) {
 			element_type = mappings[i].element_type;
 			if (element_type == ELEMENT_TYPE_SIMPLE)  {
-				value =  e_contact_get(contact, mappings[i].field_id);
+				value =  e_contact_get (contact, mappings[i].field_id);
 				if (value != NULL)
 					e_gw_item_set_field_value (item, mappings[i].element_name, value);
 			} else if (element_type == ELEMENT_TYPE_COMPLEX) {
@@ -1254,7 +1254,7 @@ e_book_backend_groupwise_create_contact (EBookBackend *backend,
 			e_contact_set (contact, E_CONTACT_UID, id);
 			g_free (id);
 			e_book_backend_db_cache_add_contact (egwb->priv->file_db, contact);
-			egwb->priv->file_db->sync(egwb->priv->file_db, 0);
+			egwb->priv->file_db->sync (egwb->priv->file_db, 0);
 			e_book_backend_summary_add_contact (egwb->priv->summary, contact);
 			e_data_book_respond_create (book, opid, EDB_ERROR (SUCCESS), contact);
 
@@ -1308,7 +1308,7 @@ e_book_backend_groupwise_remove_contacts (EBookBackend *backend,
 			e_book_backend_db_cache_remove_contact (ebgw->priv->file_db, id);
 			e_book_backend_summary_remove_contact (ebgw->priv->summary, id);
 		}
-		ebgw->priv->file_db->sync(ebgw->priv->file_db, 0);
+		ebgw->priv->file_db->sync (ebgw->priv->file_db, 0);
 		e_data_book_respond_remove_contacts (book, opid, EDB_ERROR (SUCCESS),  deleted_ids);
 		return;
 	default :
@@ -1324,8 +1324,8 @@ set_changes_in_gw_item (EGwItem *new_item, EGwItem *old_item)
 	gint element_type;
 	gint i;
 
-	g_return_if_fail (E_IS_GW_ITEM(new_item));
-	g_return_if_fail (E_IS_GW_ITEM(old_item));
+	g_return_if_fail (E_IS_GW_ITEM (new_item));
+	g_return_if_fail (E_IS_GW_ITEM (old_item));
 
 	for ( i = 0; i < G_N_ELEMENTS (mappings); i++) {
 		element_type = mappings[i].element_type;
@@ -1348,7 +1348,7 @@ set_changes_in_gw_item (EGwItem *new_item, EGwItem *old_item)
 
 		} else if (element_type == ELEMENT_TYPE_COMPLEX) {
 			if (mappings[i].field_id != E_CONTACT_EMAIL)
-				mappings[i].set_changes(new_item, old_item);
+				mappings[i].set_changes (new_item, old_item);
 		}
 	}
 }
@@ -1388,13 +1388,13 @@ e_book_backend_groupwise_modify_contact (EBookBackend *backend,
 			e_data_book_respond_modify (book, opid, EDB_ERROR (PERMISSION_DENIED), NULL);
 			return;
 		}
-		contact = e_contact_new_from_vcard(vcard);
+		contact = e_contact_new_from_vcard (vcard);
 		new_item = e_gw_item_new_empty ();
 
 		for (i = 0; i < G_N_ELEMENTS (mappings); i++) {
 			element_type = mappings[i].element_type;
 			if (element_type == ELEMENT_TYPE_SIMPLE)  {
-				value =  e_contact_get(contact, mappings[i].field_id);
+				value =  e_contact_get (contact, mappings[i].field_id);
 				if (value &&  *value)
 					e_gw_item_set_field_value (new_item, mappings[i].element_name, value);
 			} else if (element_type == ELEMENT_TYPE_COMPLEX) {
@@ -1435,7 +1435,7 @@ e_book_backend_groupwise_modify_contact (EBookBackend *backend,
 			e_book_backend_db_cache_remove_contact (egwb->priv->file_db, id);
 			e_book_backend_summary_remove_contact (egwb->priv->summary, id);
 			e_book_backend_db_cache_add_contact (egwb->priv->file_db, contact);
-			egwb->priv->file_db->sync(egwb->priv->file_db, 0);
+			egwb->priv->file_db->sync (egwb->priv->file_db, 0);
 			e_book_backend_summary_add_contact (egwb->priv->summary, contact);
 		}
 		else
@@ -1517,7 +1517,7 @@ typedef struct {
 } EBookBackendGroupwiseSExpData;
 
 static ESExpResult *
-func_and(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
+func_and (ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EGwFilter *filter;
@@ -1527,14 +1527,14 @@ func_and(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 	filter = E_GW_FILTER (sexp_data->filter);
 	if (argc > 0)
 		e_gw_filter_group_conditions (filter, E_GW_FILTER_OP_AND, argc);
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_or(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
+func_or (ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EGwFilter *filter;
@@ -1544,21 +1544,21 @@ func_or(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 	filter = E_GW_FILTER (sexp_data->filter);
 	if (argc > 0)
 		 e_gw_filter_group_conditions (filter, E_GW_FILTER_OP_OR, argc);
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_not(ESExp *f, gint argc, ESExpResult **argv, gpointer data)
+func_not (ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EBookBackendGroupwiseSExpData *sexp_data;
 
 	sexp_data = (EBookBackendGroupwiseSExpData *) data;
 	sexp_data->is_filter_valid = FALSE;
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
@@ -1582,10 +1582,10 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 		const gchar *gw_field_name;
 
 		if (g_str_equal (propname, "x-evolution-any-field")) {
-			if (!sexp_data->is_personal_book && str && strlen(str) == 0) {
+			if (!sexp_data->is_personal_book && str && strlen (str) == 0) {
 				/* ignore the NULL query */
 				sexp_data->is_filter_valid = FALSE;
-				r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+				r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 				r->value.boolean = FALSE;
 				return r;
 			}
@@ -1619,14 +1619,14 @@ func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EGwFilter *filter;
@@ -1671,7 +1671,7 @@ func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
@@ -1684,7 +1684,7 @@ func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 #define AUTO_COMPLETION_QUERY 15
 
 static ESExpResult *
-func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EGwFilter *filter;
@@ -1700,10 +1700,10 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 		gchar *str = argv[1]->value.string;
 		const gchar *gw_field_name;
 
-		if (!sexp_data->is_personal_book && str && strlen(str) == 0) {
+		if (!sexp_data->is_personal_book && str && strlen (str) == 0) {
 			/* ignore the NULL query */
 			sexp_data->is_filter_valid = FALSE;
-			r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = FALSE;
 			return r;
 		}
@@ -1748,14 +1748,14 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendGroupwiseSExpData *sexp_data;
 	ESExpResult *r;
@@ -1763,7 +1763,7 @@ func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	sexp_data = (EBookBackendGroupwiseSExpData *) data;
 	sexp_data->is_filter_valid = FALSE;
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 
 	r->value.boolean = FALSE;
 
@@ -1771,7 +1771,7 @@ func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 }
 
 static ESExpResult *
-func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	EGwFilter *filter;
@@ -1817,7 +1817,7 @@ func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
@@ -1849,7 +1849,7 @@ e_book_backend_groupwise_build_gw_filter (EBookBackendGroupwise *ebgw, const gch
 	EGwFilter *filter;
 	gint i;
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 	filter = e_gw_filter_new ();
 
 	sexp_data = g_new0 (EBookBackendGroupwiseSExpData, 1);
@@ -1861,18 +1861,18 @@ e_book_backend_groupwise_build_gw_filter (EBookBackendGroupwise *ebgw, const gch
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, sexp_data);
 		} else {
-			e_sexp_add_function(sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp, 0, symbols[i].name,
 					    symbols[i].func, sexp_data);
 		}
 	}
 
-	e_sexp_input_text(sexp, query, strlen(query));
-	e_sexp_parse(sexp);
-	r = e_sexp_eval(sexp);
-	e_sexp_result_free(sexp, r);
+	e_sexp_input_text (sexp, query, strlen (query));
+	e_sexp_parse (sexp);
+	r = e_sexp_eval (sexp);
+	e_sexp_result_free (sexp, r);
 	e_sexp_unref (sexp);
 
 	if (sexp_data->is_filter_valid) {
@@ -1943,7 +1943,7 @@ e_book_backend_groupwise_get_contact_list (EBookBackend *backend,
 			contacts = e_book_backend_db_cache_get_contacts (egwb->priv->file_db, query);
 
 		temp = contacts;
-		for (; contacts != NULL; contacts = g_list_next(contacts)) {
+		for (; contacts != NULL; contacts = g_list_next (contacts)) {
 			vcard_list = g_list_append (vcard_list,
 						    e_vcard_to_string (E_VCARD (contacts->data),
 						    EVC_FORMAT_VCARD_30));
@@ -2028,7 +2028,7 @@ e_book_backend_groupwise_get_contact_list (EBookBackend *backend,
 			e_data_book_respond_get_contact_list (book, opid, EDB_ERROR_FAILED_STATUS (OTHER_ERROR, status), NULL);
 			return;
 		}
-		for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
+		for (; gw_items != NULL; gw_items = g_list_next (gw_items)) {
 			contact = e_contact_new ();
 			fill_contact_from_gw_item (contact, E_GW_ITEM (gw_items->data), egwb->priv->categories_by_id);
 			e_contact_set (contact, E_CONTACT_BOOK_URI, egwb->priv->original_uri);
@@ -2174,13 +2174,13 @@ book_view_thread (gpointer data)
 			printf ("summary not found, reading the uids from cache\n");
 		contacts = e_book_backend_db_cache_get_contacts (gwb->priv->file_db, query);
 		temp_list = contacts;
-		for (; contacts != NULL; contacts = g_list_next(contacts)) {
+		for (; contacts != NULL; contacts = g_list_next (contacts)) {
 			if (!e_flag_is_set (closure->running)) {
 				for (;contacts != NULL; contacts = g_list_next (contacts))
 					g_object_unref (contacts->data);
 				break;
 			}
-			e_data_book_view_notify_update (book_view, E_CONTACT(contacts->data));
+			e_data_book_view_notify_update (book_view, E_CONTACT (contacts->data));
 			g_object_unref (contacts->data);
 		}
 		if (e_flag_is_set (closure->running))
@@ -2202,7 +2202,7 @@ book_view_thread (gpointer data)
 		}
 
 		if (enable_debug)
-			g_get_current_time(&start);
+			g_get_current_time (&start);
 
 		filter = e_book_backend_groupwise_build_gw_filter (gwb, query, &is_auto_completion, &search_string);
 		view = "name email default members";
@@ -2263,7 +2263,7 @@ book_view_thread (gpointer data)
 				g_ptr_array_free (ids, TRUE);
 				e_data_book_view_unref (book_view);
 				if (enable_debug) {
-					g_get_current_time(&end);
+					g_get_current_time (&end);
 					diff = end.tv_sec * 1000 + end.tv_usec/1000;
 					diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 					printf("reading contacts from cache took %ld.%03ld seconds\n",
@@ -2296,13 +2296,13 @@ book_view_thread (gpointer data)
 			if (gwb->priv->is_cache_ready) {
 				contacts = e_book_backend_db_cache_get_contacts (gwb->priv->file_db, query);
 				temp_list = contacts;
-				for (; contacts != NULL; contacts = g_list_next(contacts)) {
+				for (; contacts != NULL; contacts = g_list_next (contacts)) {
 					if (!e_flag_is_set (closure->running)) {
 						for (;contacts != NULL; contacts = g_list_next (contacts))
 							g_object_unref (contacts->data);
 						break;
 					}
-					e_data_book_view_notify_update (book_view, E_CONTACT(contacts->data));
+					e_data_book_view_notify_update (book_view, E_CONTACT (contacts->data));
 					g_object_unref (contacts->data);
 				}
 				if (e_flag_is_set (closure->running))
@@ -2352,7 +2352,7 @@ book_view_thread (gpointer data)
 		}
 
 		temp_list = gw_items;
-		for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
+		for (; gw_items != NULL; gw_items = g_list_next (gw_items)) {
 
 			if (!e_flag_is_set (closure->running)) {
 				for (;gw_items != NULL; gw_items = g_list_next (gw_items))
@@ -2370,7 +2370,7 @@ book_view_thread (gpointer data)
 				e_data_book_view_notify_update (book_view, contact);
 			else
 				g_critical ("Id missing for item %s\n", (gchar *)e_contact_get_const (contact, E_CONTACT_FILE_AS));
-			g_object_unref(contact);
+			g_object_unref (contact);
 			g_object_unref (gw_items->data);
 		}
 		if (temp_list)
@@ -2382,7 +2382,7 @@ book_view_thread (gpointer data)
 		e_data_book_view_unref (book_view);
 
 		if (enable_debug) {
-			g_get_current_time(&end);
+			g_get_current_time (&end);
 			diff = end.tv_sec * 1000 + end.tv_usec/1000;
 			diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 			printf("reading %d contacts from server took %ld.%03ld seconds\n",
@@ -2462,7 +2462,7 @@ find_book_view (EBookBackendGroupwise *ebgw)
 
 	if (e_iterator_is_valid (iter)) {
 		/* just always use the first book view */
-		EDataBookView *v = (EDataBookView*)e_iterator_get(iter);
+		EDataBookView *v = (EDataBookView*)e_iterator_get (iter);
 		if (v)
 			rv = v;
 	}
@@ -2483,7 +2483,7 @@ get_sequence_from_cache (DB *db,
 	gint db_error;
 
 	string_to_dbt ("firstSequence", &uid_dbt);
-	memset (&vcard_dbt, 0, sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
@@ -2496,7 +2496,7 @@ get_sequence_from_cache (DB *db,
 	}
 
 	string_to_dbt ("lastSequence", &uid_dbt);
-	memset (&vcard_dbt, 0, sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
@@ -2509,7 +2509,7 @@ get_sequence_from_cache (DB *db,
 	}
 
 	string_to_dbt ("lastTimePORebuild", &uid_dbt);
-	memset (&vcard_dbt, 0, sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
@@ -2595,7 +2595,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 	if (status != E_GW_CONNECTION_STATUS_OK)
 		return NULL;
 
-	for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
+	for (; gw_items != NULL; gw_items = g_list_next (gw_items)) {
 		contact_num++;
 		contact = e_contact_new ();
 		fill_contact_from_gw_item (contact, E_GW_ITEM (gw_items->data), ebgw->priv->categories_by_id);
@@ -2606,7 +2606,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 			book_view_notify_status (book_view, status_msg);
 			g_free (status_msg);
 		}
-		g_object_unref(contact);
+		g_object_unref (contact);
 		g_object_unref (gw_items->data);
 
 	}
@@ -2643,7 +2643,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 		return NULL;
 
 	if (enable_debug) {
-		g_get_current_time(&start);
+		g_get_current_time (&start);
 		printf("Building the cache for %s \n", ebgw->priv->book_name);
 	}
 
@@ -2666,12 +2666,12 @@ build_cache (EBookBackendGroupwise *ebgw)
 	while (!done) {
 
 		if (enable_debug)
-			g_get_current_time(&tstart);
+			g_get_current_time (&tstart);
 		status = e_gw_connection_read_cursor (priv->cnc, priv->container_id,
 						      cursor, TRUE, CURSOR_ITEM_LIMIT,
 						      position, &gw_items);
 		if (enable_debug) {
-			g_get_current_time(&tend);
+			g_get_current_time (&tend);
 			diff = tend.tv_sec * 1000 + tend.tv_usec/1000;
 			diff -= tstart.tv_sec * 1000 + tstart.tv_usec/1000;
 			printf("e_gw_connection_read_cursor took %ld.%03ld seconds for %d contacts\n", diff / 1000, diff % 1000, CURSOR_ITEM_LIMIT);
@@ -2702,7 +2702,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 				g_free (status_msg);
 			}
 
-			g_object_unref(contact);
+			g_object_unref (contact);
 			g_object_unref (l->data);
 
 		}
@@ -2718,7 +2718,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 		position = E_GW_CURSOR_POSITION_CURRENT;
 	}
 
-	ebgw->priv->file_db->sync(ebgw->priv->file_db, 0);
+	ebgw->priv->file_db->sync (ebgw->priv->file_db, 0);
 
 	if (book_view) {
 		e_data_book_view_notify_complete (book_view, NULL /* Success */);
@@ -2728,7 +2728,7 @@ build_cache (EBookBackendGroupwise *ebgw)
 	e_gw_connection_destroy_cursor (priv->cnc, priv->container_id, cursor);
 
 	if (enable_debug) {
-		g_get_current_time(&end);
+		g_get_current_time (&end);
 		diff = end.tv_sec * 1000 + end.tv_usec/1000;
 		diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 		printf("completed building cache for %s in %ld.%03ld seconds for %d contacts\n",
@@ -2746,7 +2746,7 @@ build_summary (EBookBackendGroupwise *ebgw)
 	gulong diff;
 
 	if (enable_debug) {
-		g_get_current_time(&start);
+		g_get_current_time (&start);
 		printf ("summary file not found or not up-to-date, building summary for %s\n",
 			ebgw->priv->book_name);
 	}
@@ -2759,7 +2759,7 @@ build_summary (EBookBackendGroupwise *ebgw)
 	contacts = e_book_backend_db_cache_get_contacts (ebgw->priv->file_db, query_string);
 	g_free (query_string);
 	temp_list = contacts;
-	for (; contacts != NULL; contacts = g_list_next(contacts)) {
+	for (; contacts != NULL; contacts = g_list_next (contacts)) {
 		e_book_backend_summary_add_contact (ebgw->priv->summary, contacts->data);
 		g_object_unref (contacts->data);
 	}
@@ -2768,7 +2768,7 @@ build_summary (EBookBackendGroupwise *ebgw)
 	ebgw->priv->is_summary_ready = TRUE;
 
 	if (enable_debug) {
-		g_get_current_time(&end);
+		g_get_current_time (&end);
 		diff = end.tv_sec * 1000 + end.tv_usec/1000;
 		diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 		printf("building summary for %s took %ld.%03ld seconds \n",
@@ -2799,7 +2799,7 @@ update_cache (EBookBackendGroupwise *ebgw)
 	g_mutex_lock (ebgw->priv->update_cache_mutex);
 
 	if (enable_debug) {
-		g_get_current_time(&start);
+		g_get_current_time (&start);
 		printf("updating cache for %s\n", ebgw->priv->book_name);
 	}
 
@@ -2811,7 +2811,7 @@ update_cache (EBookBackendGroupwise *ebgw)
 			e_flag_set (closure->running);
 	}
 
-	cache_file_name = e_book_backend_db_cache_get_filename(ebgw->priv->file_db);
+	cache_file_name = e_book_backend_db_cache_get_filename (ebgw->priv->file_db);
 	g_stat (cache_file_name, &buf);
 	g_free (cache_file_name);
 	mod_time = buf.st_mtime;
@@ -2832,7 +2832,7 @@ update_cache (EBookBackendGroupwise *ebgw)
 		return FALSE;
 	}
 
-	for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
+	for (; gw_items != NULL; gw_items = g_list_next (gw_items)) {
 		const gchar *id;
 
 		contact = e_contact_new ();
@@ -2859,13 +2859,13 @@ update_cache (EBookBackendGroupwise *ebgw)
 			e_book_backend_summary_add_contact (ebgw->priv->summary, contact);
 		}
 
-		g_object_unref(contact);
+		g_object_unref (contact);
 		g_object_unref (gw_items->data);
 	}
 	ebgw->priv->is_cache_ready = TRUE;
 	ebgw->priv->is_summary_ready = TRUE;
 
-	ebgw->priv->file_db->sync(ebgw->priv->file_db, 0);
+	ebgw->priv->file_db->sync (ebgw->priv->file_db, 0);
 
 	if (book_view) {
 		e_data_book_view_notify_complete (book_view, NULL /* Success */);
@@ -2875,7 +2875,7 @@ update_cache (EBookBackendGroupwise *ebgw)
 	g_list_free (gw_items);
 
 	if (enable_debug) {
-		g_get_current_time(&end);
+		g_get_current_time (&end);
 		diff = end.tv_sec * 1000 + end.tv_usec/1000;
 		diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 		printf("updating the cache for %s complated in %ld.%03ld seconds for %d contacts\n",
@@ -2943,7 +2943,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 	}
 
 	/* Read the last sequence and last poa rebuild time from cache */
-	get_sequence_from_cache(priv->file_db, &cache_first_sequence, &cache_last_sequence, &cache_last_po_rebuild_time);
+	get_sequence_from_cache (priv->file_db, &cache_first_sequence, &cache_last_sequence, &cache_last_po_rebuild_time);
 
 	/* check whether the all the sequences are available and also whether the PO is rebuilt */
 	if (server_first_sequence > cache_last_sequence || cache_last_sequence == -1 ||
@@ -2960,7 +2960,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 	}
 
 	if (enable_debug)
-		g_get_current_time(&start);
+		g_get_current_time (&start);
 
 	book_view = find_book_view (ebgw);
 	if (book_view) {
@@ -2975,7 +2975,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 	count = g_strdup_printf ("%d", CURSOR_ITEM_LIMIT);
 
 	/* load summary file */
-	cache_file_name = e_book_backend_db_cache_get_filename(ebgw->priv->file_db);
+	cache_file_name = e_book_backend_db_cache_get_filename (ebgw->priv->file_db);
 	g_stat (cache_file_name, &buf);
 	g_free (cache_file_name);
 	mod_time = buf.st_mtime;
@@ -3008,7 +3008,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 				printf("delete_list size:%d\n", g_list_length(delete_list));
 			}
 
-			for (; delete_list != NULL; delete_list = g_list_next(delete_list)) {
+			for (; delete_list != NULL; delete_list = g_list_next (delete_list)) {
 				const gchar *id;
 
 				/* deleted from the server */
@@ -3035,11 +3035,11 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 					e_book_backend_db_cache_remove_contact (ebgw->priv->file_db, id);
 					e_book_backend_summary_remove_contact (ebgw->priv->summary, id);
 				}
-				g_object_unref(contact);
+				g_object_unref (contact);
 				g_object_unref (delete_list->data);
 			}
 
-			for (; add_list != NULL; add_list = g_list_next(add_list)) {
+			for (; add_list != NULL; add_list = g_list_next (add_list)) {
 				const gchar *id;
 
 				/* newly added to server */
@@ -3092,7 +3092,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 					e_book_backend_summary_add_contact (ebgw->priv->summary, contact);
 				}
 
-				g_object_unref(contact);
+				g_object_unref (contact);
 				g_object_unref (add_list->data);
 			}
 			cache_last_sequence += contact_num;
@@ -3112,7 +3112,7 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 	ebgw->priv->is_summary_ready = TRUE;
 
 	if (sync_required)
-		ebgw->priv->file_db->sync(ebgw->priv->file_db, 0);
+		ebgw->priv->file_db->sync (ebgw->priv->file_db, 0);
 
 	if (book_view) {
 		e_data_book_view_notify_complete (book_view, NULL /* Success */);
@@ -3120,13 +3120,13 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw)
 	}
 
 	if (enable_debug) {
-		g_get_current_time(&end);
+		g_get_current_time (&end);
 		diff = end.tv_sec * 1000 + end.tv_usec/1000;
 		diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 		printf("updating GroupWise system address book cache took %ld.%03ld seconds for %d changes\n",
 			diff / 1000, diff % 1000, contact_num);
 	}
-	g_mutex_unlock(priv->update_mutex);
+	g_mutex_unlock (priv->update_mutex);
 
 	return TRUE;
 }
@@ -3250,7 +3250,7 @@ e_book_backend_groupwise_authenticate_user (EBookBackend *backend,
 			g_free (http_uri);
 		}
 
-		if (!E_IS_GW_CONNECTION(priv->cnc)) {
+		if (!E_IS_GW_CONNECTION (priv->cnc)) {
 
 			if (error.status == E_GW_CONNECTION_STATUS_INVALID_PASSWORD)
 				e_data_book_respond_authenticate_user (book, opid, EDB_ERROR (AUTHENTICATION_FAILED));
@@ -3276,13 +3276,13 @@ e_book_backend_groupwise_authenticate_user (EBookBackend *backend,
 		}
 		if (id != NULL) {
 			priv->container_id = g_strdup (id);
-			g_free(id);
+			g_free (id);
 			e_book_backend_set_is_writable (backend, is_writable);
 			e_book_backend_notify_writable (backend, is_writable);
 			e_book_backend_notify_connection_status (backend, TRUE);
 			priv->is_writable = is_writable;
 			e_gw_connection_get_categories (priv->cnc, &priv->categories_by_id, &priv->categories_by_name);
-			if (!e_gw_connection_get_version(priv->cnc))
+			if (!e_gw_connection_get_version (priv->cnc))
 				e_data_book_respond_authenticate_user (book, opid, EDB_ERROR (INVALID_SERVER_VERSION));
 			else
 				e_data_book_respond_authenticate_user (book, opid, EDB_ERROR (SUCCESS));
@@ -3486,7 +3486,7 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 	tokens = g_strsplit (uri, ";", 2);
 	g_free (uri);
 	if (tokens[0])
-		uri = g_strdup(tokens[0]);
+		uri = g_strdup (tokens[0]);
 	book_name = g_strdup (tokens[1]);
 	if (book_name == NULL) {
 		g_propagate_error (perror, EDB_ERROR_EX (OTHER_ERROR, "No book name recognized for a URI"));
@@ -3522,7 +3522,7 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 		return;
 	}
 
-	g_static_mutex_lock(&global_env_lock);
+	g_static_mutex_lock (&global_env_lock);
 	if (global_env.ref_count > 0) {
 		env = global_env.env;
 		global_env.ref_count++;
@@ -3540,11 +3540,11 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 
 		db_error = env->open (env, NULL, DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_THREAD, 0);
 		if (db_error != 0) {
-			env->close(env, 0);
+			env->close (env, 0);
 			g_warning ("db_env_open failed with %d", db_error);
-			g_static_mutex_unlock(&global_env_lock);
-			g_free(dirname);
-			g_free(filename);
+			g_static_mutex_unlock (&global_env_lock);
+			g_free (dirname);
+			g_free (filename);
 			g_propagate_error (perror, e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, "db_env_open failed with code 0x%x", db_error));
 			return;
 		}
@@ -3554,15 +3554,15 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 		global_env.env = env;
 		global_env.ref_count = 1;
 	}
-	g_static_mutex_unlock(&global_env_lock);
+	g_static_mutex_unlock (&global_env_lock);
 
 	ebgw->priv->env = env;
 
 	db_error = db_create (&db, env, 0);
 	if (db_error != 0) {
 		g_warning ("db_create failed with %d", db_error);
-		g_free(dirname);
-		g_free(filename);
+		g_free (dirname);
+		g_free (filename);
 		g_propagate_error (perror, e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, "db_create failed with code 0x%x", db_error));
 		return;
 	}
@@ -3574,8 +3574,8 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 
 		if (db_error != 0) {
 			g_warning ("db format upgrade failed with %d", db_error);
-			g_free(filename);
-			g_free(dirname);
+			g_free (filename);
+			g_free (dirname);
 			g_propagate_error (perror, e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, "db format upgrade failed with code 0x%x", db_error));
 			return;
 		}
@@ -3612,8 +3612,8 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 
 	if (db_error != 0 || ebgw->priv->file_db == NULL) {
 		ebgw->priv->file_db = NULL;
-		g_free(filename);
-		g_free(dirname);
+		g_free (filename);
+		g_free (dirname);
 		g_propagate_error (perror, EDB_ERROR (OTHER_ERROR));
 		return;
 	}
@@ -3627,7 +3627,7 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 	priv->only_if_exists = only_if_exists;
 
 	e_book_backend_set_is_loaded (E_BOOK_BACKEND (backend), TRUE);
-	e_book_backend_set_is_writable (E_BOOK_BACKEND(backend), FALSE);
+	e_book_backend_set_is_writable (E_BOOK_BACKEND (backend), FALSE);
 	if (priv->mode == E_DATA_BOOK_MODE_LOCAL) {
 		e_book_backend_notify_writable (backend, FALSE);
 		e_book_backend_notify_connection_status (backend, FALSE);
@@ -3647,14 +3647,14 @@ e_book_backend_groupwise_load_source (EBookBackend           *backend,
 	e_book_backend_db_cache_set_filename (ebgw->priv->file_db, filename);
 	if (priv->marked_for_offline)
 		ebgw->priv->is_cache_ready = TRUE;
-	g_free(filename);
-	g_free(dirname);
+	g_free (filename);
+	g_free (dirname);
 	g_free (uri);
 	e_uri_free (parsed_uri);
 
 	/*if (enable_debug) {
 		printf ("summary file name = %s\ncache file name = %s \n",
-			 priv->summary_file_name, e_file_cache_get_filename (E_FILE_CACHE(priv->cache)));
+			 priv->summary_file_name, e_file_cache_get_filename (E_FILE_CACHE (priv->cache)));
 	}*/
 }
 
@@ -3682,7 +3682,7 @@ e_book_backend_groupwise_remove (EBookBackend *backend,
 		e_data_book_respond_remove (book,  opid, EDB_ERROR (SUCCESS));
 	else
 		e_data_book_respond_remove (book,  opid, EDB_ERROR_FAILED_STATUS (OTHER_ERROR, status));
-	g_unlink (e_book_backend_db_cache_get_filename(ebgw->priv->file_db));
+	g_unlink (e_book_backend_db_cache_get_filename (ebgw->priv->file_db));
 }
 
 static gchar *
@@ -3806,13 +3806,13 @@ e_book_backend_groupwise_dispose (GObject *object)
 		if (bgw->priv->file_db)
 			bgw->priv->file_db->close (bgw->priv->file_db, 0);
 
-		g_static_mutex_lock(&global_env_lock);
+		g_static_mutex_lock (&global_env_lock);
 		global_env.ref_count--;
 		if (global_env.ref_count == 0) {
 			global_env.env->close (global_env.env, 0);
 			global_env.env = NULL;
 		}
-		g_static_mutex_unlock(&global_env_lock);
+		g_static_mutex_unlock (&global_env_lock);
 		if (bgw->priv->uri) {
 			g_free (bgw->priv->uri);
 			bgw->priv->uri = NULL;
@@ -3840,7 +3840,7 @@ e_book_backend_groupwise_dispose (GObject *object)
 			bgw->priv->summary_file_name = NULL;
 		}
 		if (bgw->priv->summary) {
-			e_book_backend_summary_save(bgw->priv->summary);
+			e_book_backend_summary_save (bgw->priv->summary);
 			g_object_unref (bgw->priv->summary);
 			bgw->priv->summary = NULL;
 		}
@@ -3908,8 +3908,8 @@ e_book_backend_groupwise_init (EBookBackendGroupwise *backend)
 	priv->cnc = NULL;
 	priv->original_uri = NULL;
 	priv->cache_timeout = 0;
-	priv->update_mutex = g_mutex_new();
-	priv->update_cache_mutex = g_mutex_new();
+	priv->update_mutex = g_mutex_new ();
+	priv->update_cache_mutex = g_mutex_new ();
 	backend->priv = priv;
 
 	if (!priv->dlock) {
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index 5a6ec78..f393ac9 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -79,21 +79,21 @@
 
 #  ifdef UNICODE
 #    define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
-        ldap_compare_extW(ld,dn,a,0,v,sc,cc,msg)
+        ldap_compare_extW (ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,(t),s,msg) \
-        ldap_search_extW(ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+        ldap_search_extW (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
 # if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
 #    define ldap_start_tls_s(ld,sc,cc) \
-        ldap_start_tls_sW(ld,0,0,sc,cc)
+        ldap_start_tls_sW (ld,0,0,sc,cc)
 # endif
 #  else /* !UNICODE */
 #    define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
-        ldap_compare_extA(ld,dn,a,0,v,sc,cc,msg)
+        ldap_compare_extA (ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,t,s,msg) \
-        ldap_search_extA(ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+        ldap_search_extA (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
 # if defined (__MINGW64_VERSION_MAJOR) || defined (_MSC_VER)
 #    define ldap_start_tls_s(ld,sc,cc) \
-        ldap_start_tls_sA(ld,0,0,sc,cc)
+        ldap_start_tls_sA (ld,0,0,sc,cc)
 # endif
 #  endif /* UNICODE */
 
@@ -162,7 +162,7 @@ typedef enum {
 
 static gboolean enable_debug = FALSE;
 
-static const gchar *query_prop_to_ldap(gchar *query_prop);
+static const gchar *query_prop_to_ldap (gchar *query_prop);
 static gchar *e_book_backend_ldap_build_query (EBookBackendLDAP *bl, const gchar *query);
 
 typedef struct LDAPOp LDAPOp;
@@ -281,31 +281,31 @@ static void category_populate (EContact *contact, gchar **values);
 static struct berval** category_ber (EContact *contact);
 static gboolean category_compare (EContact *contact1, EContact *contact2);
 
-static void home_address_populate(EContact * card, gchar **values);
-static struct berval **home_address_ber(EContact * card);
-static gboolean home_address_compare(EContact * ecard1, EContact * ecard2);
+static void home_address_populate (EContact * card, gchar **values);
+static struct berval **home_address_ber (EContact * card);
+static gboolean home_address_compare (EContact * ecard1, EContact * ecard2);
 
-static void work_address_populate(EContact * card, gchar **values);
-static struct berval **work_address_ber(EContact * card);
-static gboolean work_address_compare(EContact * ecard1, EContact * ecard2);
+static void work_address_populate (EContact * card, gchar **values);
+static struct berval **work_address_ber (EContact * card);
+static gboolean work_address_compare (EContact * ecard1, EContact * ecard2);
 
-static void other_address_populate(EContact * card, gchar **values);
-static struct berval **other_address_ber(EContact * card);
-static gboolean other_address_compare(EContact * ecard1, EContact * ecard2);
+static void other_address_populate (EContact * card, gchar **values);
+static struct berval **other_address_ber (EContact * card);
+static gboolean other_address_compare (EContact * ecard1, EContact * ecard2);
 
-static void work_city_populate(EContact * card, gchar **values);
-static void work_state_populate(EContact * card, gchar **values);
-static void work_po_populate(EContact * card, gchar **values);
-static void work_zip_populate(EContact * card, gchar **values);
-static void work_country_populate(EContact * card, gchar **values);
-static void home_city_populate(EContact * card, gchar **values);
-static void home_state_populate(EContact * card, gchar **values);
-static void home_zip_populate(EContact * card, gchar **values);
-static void home_country_populate(EContact * card, gchar **values);
+static void work_city_populate (EContact * card, gchar **values);
+static void work_state_populate (EContact * card, gchar **values);
+static void work_po_populate (EContact * card, gchar **values);
+static void work_zip_populate (EContact * card, gchar **values);
+static void work_country_populate (EContact * card, gchar **values);
+static void home_city_populate (EContact * card, gchar **values);
+static void home_state_populate (EContact * card, gchar **values);
+static void home_zip_populate (EContact * card, gchar **values);
+static void home_country_populate (EContact * card, gchar **values);
 
 static void photo_populate (EContact *contact, struct berval **ber_values);
 static struct berval **photo_ber (EContact * contact);
-static gboolean photo_compare(EContact * ecard1, EContact * ecard2);
+static gboolean photo_compare (EContact * ecard1, EContact * ecard2);
 
 static void cert_populate (EContact *contact, struct berval **ber_values);
 
@@ -452,7 +452,7 @@ find_book_view (EBookBackendLDAP *bl)
 
 	if (e_iterator_is_valid (iter)) {
 		/* just always use the first book view */
-		EDataBookView *v = (EDataBookView*)e_iterator_get(iter);
+		EDataBookView *v = (EDataBookView*)e_iterator_get (iter);
 		if (v)
 			rv = v;
 	}
@@ -514,7 +514,7 @@ add_to_supported_fields (EBookBackendLDAP *bl, gchar **attrs, GHashTable *attr_h
 				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_PHONE_BUSINESS_2)));
 			}
 			else if (!strcmp (query_prop, e_contact_field_name (E_CONTACT_PHONE_HOME))) {
-				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name(E_CONTACT_PHONE_HOME_2)));
+				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_PHONE_HOME_2)));
 			}
 			else if (!strcmp (query_prop, e_contact_field_name (E_CONTACT_CATEGORY_LIST) )) {
 				bl->priv->supported_fields = g_list_append (bl->priv->supported_fields, g_strdup (e_contact_field_name (E_CONTACT_CATEGORIES)));
@@ -852,7 +852,7 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
 			if (bl->priv->ldap_port == LDAPS_PORT && bl->priv->use_tls == E_BOOK_BACKEND_LDAP_TLS_ALWAYS) {
 #ifdef SUNLDAP
 				if (LDAP_SUCCESS == ldap_error) {
-					ldap_set_option(blpriv->ldap, LDAP_OPT_RECONNECT, LDAP_OPT_ON );
+					ldap_set_option (blpriv->ldap, LDAP_OPT_RECONNECT, LDAP_OPT_ON );
 				}
 #else
 #if defined (LDAP_OPT_X_TLS_HARD) && defined (LDAP_OPT_X_TLS)
@@ -868,7 +868,7 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
 			else if (bl->priv->use_tls) {
 #ifdef SUNLDAP
 				if (LDAP_SUCCESS == ldap_error) {
-					ldap_set_option(blpriv->ldap, LDAP_OPT_RECONNECT, LDAP_OPT_ON );
+					ldap_set_option (blpriv->ldap, LDAP_OPT_RECONNECT, LDAP_OPT_ON );
 				}
 #else
 #ifdef _WIN32
@@ -881,7 +881,7 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
 				if (!pldap_start_tls_s)
 					ldap_error = LDAP_NOT_SUPPORTED;
 				else
-					ldap_error = pldap_start_tls_s(blpriv->ldap, NULL, NULL);
+					ldap_error = pldap_start_tls_s (blpriv->ldap, NULL, NULL);
 #else /* !defined(_WIN32) */
 				ldap_error = ldap_start_tls_s (blpriv->ldap, NULL, NULL);
 #endif /* _WIN32 */
@@ -941,7 +941,7 @@ e_book_backend_ldap_connect (EBookBackendLDAP *bl)
 		else
 			ldap_error = query_ldap_root_dse (bl);
 		/* query_ldap_root_dse will cause the actual
-		   connect(), so any tcpip problems will show up
+		   connect (), so any tcpip problems will show up
 		   here */
 
 		/* we can't just check for LDAP_SUCCESS here since in
@@ -1033,7 +1033,7 @@ e_book_backend_ldap_reconnect (EBookBackendLDAP *bl, EDataBookView *book_view, g
 
 		if (bl->priv->auth_dn) {
 			g_static_rec_mutex_lock (&eds_ldap_handler_lock);
-			ldap_error = ldap_simple_bind_s(bl->priv->ldap,
+			ldap_error = ldap_simple_bind_s (bl->priv->ldap,
 							bl->priv->auth_dn,
 							bl->priv->auth_passwd);
 			g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
@@ -1249,7 +1249,7 @@ static GPtrArray*
 build_mods_from_contacts (EBookBackendLDAP *bl, EContact *current, EContact *new, gboolean *new_dn_needed, gchar *ldap_uid)
 {
 	gboolean adding = (current == NULL), is_list = FALSE;
-	GPtrArray *result = g_ptr_array_new();
+	GPtrArray *result = g_ptr_array_new ();
 	gint i;
 
 	if (new_dn_needed)
@@ -1418,7 +1418,7 @@ add_objectclass_mod (EBookBackendLDAP *bl, GPtrArray *mod_array, GList *existing
 		 g_ptr_array_add (objectclasses, g_strdup ((oc)))
 
 	LDAPMod *objectclass_mod;
-	GPtrArray *objectclasses = g_ptr_array_new();
+	GPtrArray *objectclasses = g_ptr_array_new ();
 
 	if (existing_objectclasses) {
 		objectclass_mod = g_new (LDAPMod, 1);
@@ -1461,18 +1461,18 @@ add_objectclass_mod (EBookBackendLDAP *bl, GPtrArray *mod_array, GList *existing
 		objectclass_mod->mod_type = g_strdup ("objectClass");
 
 		if (!is_rename)
-			INSERT(TOP);
+			INSERT (TOP);
 		if (is_list) {
-			INSERT(GROUPOFNAMES);
+			INSERT (GROUPOFNAMES);
 		}
 		else {
-			INSERT(PERSON);
-			INSERT(ORGANIZATIONALPERSON);
-			INSERT(INETORGPERSON);
+			INSERT (PERSON);
+			INSERT (ORGANIZATIONALPERSON);
+			INSERT (INETORGPERSON);
 			if (bl->priv->calEntrySupported)
-				INSERT(CALENTRY);
+				INSERT (CALENTRY);
 			if (bl->priv->evolutionPersonSupported)
-				INSERT(EVOLUTIONPERSON);
+				INSERT (EVOLUTIONPERSON);
 		}
 		g_ptr_array_add (objectclasses, NULL);
 		objectclass_mod->mod_values = (gchar **)objectclasses->pdata;
@@ -1627,8 +1627,8 @@ e_book_backend_ldap_create_contact (EBookBackend *backend,
 			printf ("Sending the following to the server as ADD\n");
 			printf ("Adding DN: %s\n", create_op->dn);
 
-			for (i = 0; g_ptr_array_index(mod_array, i); i++) {
-				LDAPMod *mod = g_ptr_array_index(mod_array, i);
+			for (i = 0; g_ptr_array_index (mod_array, i); i++) {
+				LDAPMod *mod = g_ptr_array_index (mod_array, i);
 				if (mod->mod_op & LDAP_MOD_DELETE)
 					printf ("del ");
 				else if (mod->mod_op & LDAP_MOD_REPLACE)
@@ -2119,8 +2119,8 @@ modify_contact_rename_handler (LDAPOp *op, LDAPMessage *res)
 			gint i;
 			printf ("Sending the following to the server as MOD\n");
 
-			for (i = 0; g_ptr_array_index(modify_op->mod_array, i); i++) {
-				LDAPMod *mod = g_ptr_array_index(modify_op->mod_array, i);
+			for (i = 0; g_ptr_array_index (modify_op->mod_array, i); i++) {
+				LDAPMod *mod = g_ptr_array_index (modify_op->mod_array, i);
 				if (mod->mod_op & LDAP_MOD_DELETE)
 					printf ("del ");
 				else if (mod->mod_op & LDAP_MOD_REPLACE)
@@ -2691,7 +2691,7 @@ static EContactField email_ids[4] = {
 
 /* List property functions */
 static void
-email_populate(EContact *contact, gchar **values)
+email_populate (EContact *contact, gchar **values)
 {
 	gint i;
 	for (i = 0; values[i] && i < 4; i++)
@@ -2699,7 +2699,7 @@ email_populate(EContact *contact, gchar **values)
 }
 
 static struct berval**
-email_ber(EContact *contact)
+email_ber (EContact *contact)
 {
 	struct berval** result;
 	const gchar *emails[4];
@@ -2916,7 +2916,7 @@ member_compare (EContact *contact_new, EContact *contact_current)
 }
 
 static void
-homephone_populate(EContact *contact, gchar **values)
+homephone_populate (EContact *contact, gchar **values)
 {
 	if (values[0]) {
 		e_contact_set (contact, E_CONTACT_PHONE_HOME, values[0]);
@@ -2926,7 +2926,7 @@ homephone_populate(EContact *contact, gchar **values)
 }
 
 static struct berval**
-homephone_ber(EContact *contact)
+homephone_ber (EContact *contact)
 {
 	struct berval** result;
 	const gchar *homephones[3];
@@ -2984,7 +2984,7 @@ homephone_compare (EContact *contact1, EContact *contact2)
 }
 
 static void
-business_populate(EContact *contact, gchar **values)
+business_populate (EContact *contact, gchar **values)
 {
 	if (values[0]) {
 		e_contact_set (contact, E_CONTACT_PHONE_BUSINESS, values[0]);
@@ -2994,7 +2994,7 @@ business_populate(EContact *contact, gchar **values)
 }
 
 static struct berval**
-business_ber(EContact *contact)
+business_ber (EContact *contact)
 {
 	struct berval** result;
 	const gchar *business_phones[3];
@@ -3223,143 +3223,143 @@ category_compare (EContact *contact1, EContact *contact2)
 	return equal;
 }
 
-static EContactAddress * getormakeEContactAddress(EContact * card, EContactField field)
+static EContactAddress * getormakeEContactAddress (EContact * card, EContactField field)
 {
-    EContactAddress *contact_addr = e_contact_get(card, field);
+    EContactAddress *contact_addr = e_contact_get (card, field);
     if (!contact_addr)
-        contact_addr = g_new0(EContactAddress, 1);
+        contact_addr = g_new0 (EContactAddress, 1);
     return contact_addr;
 }
 
 static void
-address_populate(EContact * card, gchar **values, EContactField field, EContactField other_field)
+address_populate (EContact * card, gchar **values, EContactField field, EContactField other_field)
 {
 	if (values[0]) {
 		EContactAddress *contact_addr;
-		gchar *temp = g_strdup(values[0]);
+		gchar *temp = g_strdup (values[0]);
 		gchar *i;
 		for (i = temp; *i != '\0'; i++) {
 			if (*i == '$') {
 				*i = '\n';
 			}
 		}
-		e_contact_set(card, field, temp);
+		e_contact_set (card, field, temp);
 
-		contact_addr = getormakeEContactAddress(card, other_field);
+		contact_addr = getormakeEContactAddress (card, other_field);
 		contact_addr->street = g_strdup (temp);
 		e_contact_set (card, other_field, contact_addr);
 		e_contact_address_free (contact_addr);
 
-		g_free(temp);
+		g_free (temp);
 	}
 }
 
 static void
-work_city_populate(EContact * card, gchar **values)
+work_city_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_WORK);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
         contact_addr->locality = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_WORK, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-work_state_populate(EContact * card, gchar **values)
+work_state_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_WORK);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
         contact_addr->region = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_WORK, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-work_po_populate(EContact * card, gchar **values)
+work_po_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_WORK);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
         contact_addr->po = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_WORK, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-work_zip_populate(EContact * card, gchar **values)
+work_zip_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_WORK);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
         contact_addr->code = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_WORK, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-work_country_populate(EContact * card, gchar **values)
+work_country_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_WORK);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_WORK);
         contact_addr->country = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_WORK, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-home_city_populate(EContact * card, gchar **values)
+home_city_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_HOME);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
         contact_addr->locality = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_HOME, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-home_state_populate(EContact * card, gchar **values)
+home_state_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_HOME);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
         contact_addr->region = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_HOME, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-home_zip_populate(EContact * card, gchar **values)
+home_zip_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_HOME);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
         contact_addr->code = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_HOME, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-home_country_populate(EContact * card, gchar **values)
+home_country_populate (EContact * card, gchar **values)
 {
-	EContactAddress *contact_addr = getormakeEContactAddress(card, E_CONTACT_ADDRESS_HOME);
+	EContactAddress *contact_addr = getormakeEContactAddress (card, E_CONTACT_ADDRESS_HOME);
         contact_addr->country = g_strdup (values[0]);
         e_contact_set (card, E_CONTACT_ADDRESS_HOME, contact_addr);
         e_contact_address_free (contact_addr);
 }
 
 static void
-home_address_populate(EContact * card, gchar **values)
+home_address_populate (EContact * card, gchar **values)
 {
-	address_populate(card, values, E_CONTACT_ADDRESS_LABEL_HOME, E_CONTACT_ADDRESS_HOME);
+	address_populate (card, values, E_CONTACT_ADDRESS_LABEL_HOME, E_CONTACT_ADDRESS_HOME);
 }
 
 static void
-work_address_populate(EContact * card, gchar **values)
+work_address_populate (EContact * card, gchar **values)
 {
-	address_populate(card, values, E_CONTACT_ADDRESS_LABEL_WORK, E_CONTACT_ADDRESS_WORK);
+	address_populate (card, values, E_CONTACT_ADDRESS_LABEL_WORK, E_CONTACT_ADDRESS_WORK);
 }
 
 static void
-other_address_populate(EContact * card, gchar **values)
+other_address_populate (EContact * card, gchar **values)
 {
-	address_populate(card, values, E_CONTACT_ADDRESS_LABEL_OTHER, E_CONTACT_ADDRESS_OTHER);
+	address_populate (card, values, E_CONTACT_ADDRESS_LABEL_OTHER, E_CONTACT_ADDRESS_OTHER);
 }
 
 static struct berval **
-address_ber(EContact * card, EContactField field)
+address_ber (EContact * card, EContactField field)
 {
 	struct berval **result = NULL;
 	gchar *address, *i;
 
-	address = e_contact_get(card, field);
+	address = e_contact_get (card, field);
 	if (address) {
 		for (i = address; *i != '\0'; i++) {
 			if (*i == '\n') {
@@ -3367,10 +3367,10 @@ address_ber(EContact * card, EContactField field)
 			}
 		}
 
-		result = g_new(struct berval *, 2);
-		result[0] = g_new(struct berval, 1);
+		result = g_new (struct berval *, 2);
+		result[0] = g_new (struct berval, 1);
 		result[0]->bv_val = address;
-		result[0]->bv_len = strlen(address);
+		result[0]->bv_len = strlen (address);
 
 		result[1] = NULL;
 	}
@@ -3378,34 +3378,34 @@ address_ber(EContact * card, EContactField field)
 }
 
 static struct berval **
-home_address_ber(EContact * card)
+home_address_ber (EContact * card)
 {
-	return address_ber(card, E_CONTACT_ADDRESS_LABEL_HOME);
+	return address_ber (card, E_CONTACT_ADDRESS_LABEL_HOME);
 }
 
 static struct berval **
-work_address_ber(EContact * card)
+work_address_ber (EContact * card)
 {
-	return address_ber(card, E_CONTACT_ADDRESS_LABEL_WORK);
+	return address_ber (card, E_CONTACT_ADDRESS_LABEL_WORK);
 }
 
 static struct berval **
-other_address_ber(EContact * card)
+other_address_ber (EContact * card)
 {
-	return address_ber(card, E_CONTACT_ADDRESS_LABEL_OTHER);
+	return address_ber (card, E_CONTACT_ADDRESS_LABEL_OTHER);
 }
 
 static gboolean
-address_compare(EContact * ecard1, EContact * ecard2, EContactField field)
+address_compare (EContact * ecard1, EContact * ecard2, EContactField field)
 {
 	const gchar *address1, *address2;
 
 	gboolean equal;
-	address1 = e_contact_get_const(ecard1, field);
-	address2 = e_contact_get_const(ecard2, field);
+	address1 = e_contact_get_const (ecard1, field);
+	address2 = e_contact_get_const (ecard2, field);
 
 	if (address1 && address2)
-		equal = !strcmp(address1, address2);
+		equal = !strcmp (address1, address2);
 	else
 		equal = (!!address1 == !!address2);
 
@@ -3413,21 +3413,21 @@ address_compare(EContact * ecard1, EContact * ecard2, EContactField field)
 }
 
 static gboolean
-home_address_compare(EContact * ecard1, EContact * ecard2)
+home_address_compare (EContact * ecard1, EContact * ecard2)
 {
-	return address_compare(ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_HOME);
+	return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_HOME);
 }
 
 static gboolean
-work_address_compare(EContact * ecard1, EContact * ecard2)
+work_address_compare (EContact * ecard1, EContact * ecard2)
 {
-	return address_compare(ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_WORK);
+	return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_WORK);
 }
 
 static gboolean
-other_address_compare(EContact * ecard1, EContact * ecard2)
+other_address_compare (EContact * ecard1, EContact * ecard2)
 {
-	return address_compare(ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_OTHER);
+	return address_compare (ecard1, ecard2, E_CONTACT_ADDRESS_LABEL_OTHER);
 }
 
 static void
@@ -3450,11 +3450,11 @@ photo_ber (EContact *contact)
 	struct berval **result = NULL;
 	EContactPhoto *photo;
 
-	photo = e_contact_get(contact, E_CONTACT_PHOTO);
+	photo = e_contact_get (contact, E_CONTACT_PHOTO);
 	if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) {
 
-		result = g_new(struct berval *, 2);
-		result[0] = g_new(struct berval, 1);
+		result = g_new (struct berval *, 2);
+		result[0] = g_new (struct berval, 1);
 		result[0]->bv_len = photo->data.inlined.length;
 		result[0]->bv_val = g_malloc (photo->data.inlined.length);
 		memcpy (result[0]->bv_val, photo->data.inlined.data, photo->data.inlined.length);
@@ -3467,13 +3467,13 @@ photo_ber (EContact *contact)
 }
 
 static gboolean
-photo_compare(EContact * ecard1, EContact * ecard2)
+photo_compare (EContact * ecard1, EContact * ecard2)
 {
 	EContactPhoto *photo1, *photo2;
 	gboolean equal;
 
-	photo1 = e_contact_get(ecard1, E_CONTACT_PHOTO);
-	photo2 = e_contact_get(ecard2, E_CONTACT_PHOTO);
+	photo1 = e_contact_get (ecard1, E_CONTACT_PHOTO);
+	photo2 = e_contact_get (ecard2, E_CONTACT_PHOTO);
 
 	if (photo1 && photo2) {
 		if (photo1->type == photo2->type && photo1->type == E_CONTACT_PHOTO_TYPE_INLINED) {
@@ -3518,14 +3518,14 @@ typedef struct {
 
 #define IS_RFC2254_CHAR(c) ((c) == '*' || (c) =='\\' || (c) == '(' || (c) == ')' || (c) == '\0')
 static gchar *
-rfc2254_escape(gchar *str)
+rfc2254_escape (gchar *str)
 {
 	gint i;
-	gint len = strlen(str);
+	gint len = strlen (str);
 	gint newlen = 0;
 
 	for (i = 0; i < len; i++) {
-		if (IS_RFC2254_CHAR(str[i]))
+		if (IS_RFC2254_CHAR (str[i]))
 			newlen += 3;
 		else
 			newlen++;
@@ -3538,7 +3538,7 @@ rfc2254_escape(gchar *str)
 		gchar *newstr = g_malloc0 (newlen + 1);
 		gint j = 0;
 		for (i = 0; i < len; i++) {
-			if (IS_RFC2254_CHAR(str[i])) {
+			if (IS_RFC2254_CHAR (str[i])) {
 				sprintf (newstr + j, "\\%02x", str[i]);
 				j+= 3;
 			}
@@ -3587,7 +3587,7 @@ extend_query_value (gchar *str)
 }
 
 static ESExpResult *
-func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3596,7 +3596,7 @@ func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 	if (argc > 0) {
 		gint i, empty;
 
-		strings = g_new0(gchar *, argc+3);
+		strings = g_new0 (gchar *, argc+3);
 		strings[0] = g_strdup ("(&");
 		strings[argc+3 - 2] = g_strdup (")");
 
@@ -3608,8 +3608,8 @@ func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 			if (strlen (list_head->data) == 0)
 				empty++;
 			strings[argc - i] = list_head->data;
-			ldap_data->list = g_list_remove_link(list_head, list_head);
-			g_list_free_1(list_head);
+			ldap_data->list = g_list_remove_link (list_head, list_head);
+			g_list_free_1 (list_head);
 		}
 
 		if (empty == argc)
@@ -3623,14 +3623,14 @@ func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		g_free (strings);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3639,7 +3639,7 @@ func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 	if (argc > 0) {
 		gint i, empty;
 
-		strings = g_new0(gchar *, argc+3);
+		strings = g_new0 (gchar *, argc+3);
 		strings[0] = g_strdup ("(|");
 		strings[argc+3 - 2] = g_strdup (")");
 
@@ -3651,8 +3651,8 @@ func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 			if (strlen (list_head->data) == 0)
 				empty++;
 			strings[argc - i] = list_head->data;
-			ldap_data->list = g_list_remove_link(list_head, list_head);
-			g_list_free_1(list_head);
+			ldap_data->list = g_list_remove_link (list_head, list_head);
+			g_list_free_1 (list_head);
 		}
 
 		if (empty == argc)
@@ -3666,14 +3666,14 @@ func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		g_free (strings);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3685,14 +3685,14 @@ func_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		g_free (term);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3701,10 +3701,10 @@ func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	    && argv[0]->type == ESEXP_RES_STRING
 	    && argv[1]->type == ESEXP_RES_STRING) {
 		gchar *propname = argv[0]->value.string;
-		gchar *str = extend_query_value( rfc2254_escape (argv[1]->value.string));
+		gchar *str = extend_query_value ( rfc2254_escape (argv[1]->value.string));
 		gboolean one_star = FALSE;
 
-		if (strlen(str) == 0)
+		if (strlen (str) == 0)
 			one_star = TRUE;
 
 		if (!strcmp (propname, "x-evolution-any-field")) {
@@ -3729,7 +3729,7 @@ func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 				query_length += 1 /* strlen ("(") */ + strlen(prop_info[i].ldap_attr) + strlen (match_str);
 			}
 
-			big_query = g_malloc0(query_length + 1);
+			big_query = g_malloc0 (query_length + 1);
 			strcat (big_query, "(|");
 			for (i = 0; i < G_N_ELEMENTS (prop_info); i++) {
 				strcat (big_query, "(");
@@ -3738,15 +3738,15 @@ func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 			}
 			strcat (big_query, ")");
 
-			ldap_data->list = g_list_prepend(ldap_data->list, big_query);
+			ldap_data->list = g_list_prepend (ldap_data->list, big_query);
 
 			g_free (match_str);
 		}
 		else {
-			const gchar *ldap_attr = query_prop_to_ldap(propname);
+			const gchar *ldap_attr = query_prop_to_ldap (propname);
 
 			if (ldap_attr)
-				ldap_data->list = g_list_prepend(ldap_data->list,
+				ldap_data->list = g_list_prepend (ldap_data->list,
 								 g_strdup_printf("(%s=*%s%s)",
 										 ldap_attr,
 										 str,
@@ -3756,14 +3756,14 @@ func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 		g_free (str);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3772,31 +3772,31 @@ func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 	    && argv[0]->type == ESEXP_RES_STRING
 	    && argv[1]->type == ESEXP_RES_STRING) {
 		gchar *propname = argv[0]->value.string;
-		gchar *str = rfc2254_escape(argv[1]->value.string);
-		const gchar *ldap_attr = query_prop_to_ldap(propname);
+		gchar *str = rfc2254_escape (argv[1]->value.string);
+		const gchar *ldap_attr = query_prop_to_ldap (propname);
 
 		if (ldap_attr)
-			ldap_data->list = g_list_prepend(ldap_data->list,
+			ldap_data->list = g_list_prepend (ldap_data->list,
 							 g_strdup_printf("(%s=%s)",
 									 ldap_attr, str));
 		else {
 			g_warning ("unknown query property\n");
 			/* we want something that'll always be false */
-			ldap_data->list = g_list_prepend(ldap_data->list,
+			ldap_data->list = g_list_prepend (ldap_data->list,
 							 g_strdup("objectClass=MyBarnIsBiggerThanYourBarn"));
 		}
 
 		g_free (str);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3805,8 +3805,8 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 	    && argv[0]->type == ESEXP_RES_STRING
 	    && argv[1]->type == ESEXP_RES_STRING) {
 		gchar *propname = argv[0]->value.string;
-		gchar *str = rfc2254_escape(argv[1]->value.string);
-		const gchar *ldap_attr = query_prop_to_ldap(propname);
+		gchar *str = rfc2254_escape (argv[1]->value.string);
+		const gchar *ldap_attr = query_prop_to_ldap (propname);
 
 		if (strlen (str) == 0) {
 			g_free (str);
@@ -3823,22 +3823,22 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 		   and for entries that have no fileAs attribute. */
 		if (ldap_attr) {
 			if (!strcmp (propname, "full_name")) {
-				ldap_data->list = g_list_prepend(ldap_data->list,
-							       g_strdup_printf(
+				ldap_data->list = g_list_prepend (ldap_data->list,
+							       g_strdup_printf (
 								       "(|(cn=%s*)(sn=%s*))",
 								       str, str));
 			}
 			else if (!strcmp (ldap_attr, "fileAs")) {
 				if (ldap_data->bl->priv->evolutionPersonSupported)
-					ldap_data->list = g_list_prepend(ldap_data->list,
+					ldap_data->list = g_list_prepend (ldap_data->list,
 								 g_strdup_printf("(|(fileAs=%s*)(&(!(fileAs=*))(sn=%s*)))",
 										 str, str));
 				else
-					ldap_data->list = g_list_prepend(ldap_data->list,
+					ldap_data->list = g_list_prepend (ldap_data->list,
 									 g_strdup_printf("(sn=%s*)", str));
 			}
 			else {
-				ldap_data->list = g_list_prepend(ldap_data->list,
+				ldap_data->list = g_list_prepend (ldap_data->list,
 								 g_strdup_printf("(%s=%s*)",
 										 ldap_attr,
 										 str));
@@ -3848,14 +3848,14 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 		g_free (str);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3864,25 +3864,25 @@ func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	    && argv[0]->type == ESEXP_RES_STRING
 	    && argv[1]->type == ESEXP_RES_STRING) {
 		gchar *propname = argv[0]->value.string;
-		gchar *str = rfc2254_escape(argv[1]->value.string);
-		const gchar *ldap_attr = query_prop_to_ldap(propname);
+		gchar *str = rfc2254_escape (argv[1]->value.string);
+		const gchar *ldap_attr = query_prop_to_ldap (propname);
 
 		if (ldap_attr)
-			ldap_data->list = g_list_prepend(ldap_data->list,
+			ldap_data->list = g_list_prepend (ldap_data->list,
 							 g_strdup_printf("(%s=*%s)",
 									 ldap_attr,
 									 str));
 		g_free (str);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendLDAPSExpData *ldap_data = data;
 	ESExpResult *r;
@@ -3905,7 +3905,7 @@ func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 				query_length += 1 /* strlen ("(") */ + strlen(prop_info[i].ldap_attr) + strlen (match_str);
 			}
 
-			big_query = g_malloc0(query_length + 1);
+			big_query = g_malloc0 (query_length + 1);
 			strcat (big_query, "(|");
 			for (i = 0; i < G_N_ELEMENTS (prop_info); i++) {
 				strcat (big_query, "(");
@@ -3914,20 +3914,20 @@ func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 			}
 			strcat (big_query, ")");
 
-			ldap_data->list = g_list_prepend(ldap_data->list, big_query);
+			ldap_data->list = g_list_prepend (ldap_data->list, big_query);
 
 			g_free (match_str);
 		}
 		else {
-			const gchar *ldap_attr = query_prop_to_ldap(propname);
+			const gchar *ldap_attr = query_prop_to_ldap (propname);
 
 			if (ldap_attr)
-				ldap_data->list = g_list_prepend(ldap_data->list,
+				ldap_data->list = g_list_prepend (ldap_data->list,
 								 g_strdup_printf("(%s=*)", ldap_attr));
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
@@ -3963,24 +3963,24 @@ e_book_backend_ldap_build_query (EBookBackendLDAP *bl, const gchar *query)
 	data.list = NULL;
 	data.bl = bl;
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, &data);
 		} else {
-			e_sexp_add_function(sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp, 0, symbols[i].name,
 					    symbols[i].func, &data);
 		}
 	}
 
-	e_sexp_input_text(sexp, query, strlen(query));
-	e_sexp_parse(sexp);
+	e_sexp_input_text (sexp, query, strlen (query));
+	e_sexp_parse (sexp);
 
-	r = e_sexp_eval(sexp);
+	r = e_sexp_eval (sexp);
 
-	e_sexp_result_free(sexp, r);
+	e_sexp_result_free (sexp, r);
 	e_sexp_unref (sexp);
 
 	if (data.list) {
@@ -3992,7 +3992,7 @@ e_book_backend_ldap_build_query (EBookBackendLDAP *bl, const gchar *query)
 		else {
 			if (bl->priv->ldap_search_filter && *bl->priv->ldap_search_filter
 				&& g_ascii_strncasecmp(bl->priv->ldap_search_filter,"(objectClass=*)",sizeof(bl->priv->ldap_search_filter))) {
-				strings = g_new0(gchar *, 5);
+				strings = g_new0 (gchar *, 5);
 				strings[0] = g_strdup ("(&");
 				strings[1] = g_strdup_printf ("%s", bl->priv->ldap_search_filter);
 				strings[2] = data.list->data;
@@ -4134,7 +4134,7 @@ build_contact_from_entry (EBookBackendLDAP *bl,
 						else if (info->prop_type & PROP_TYPE_COMPLEX) {
 							/* if it's a list call the contact-populate function,
 							   which calls g_object_set to set the property */
-							info->populate_contact_func(contact,
+							info->populate_contact_func (contact,
 										    values);
 						}
 						else if (info->prop_type & PROP_TYPE_GROUP) {
@@ -4200,7 +4200,7 @@ build_contact_from_entry (EBookBackendLDAP *bl,
 
 								if (ldap_error != LDAP_SUCCESS) {
 									book_view_notify_status (bl, book_view,
-												 ldap_err2string(ldap_error));
+												 ldap_err2string (ldap_error));
 									continue;
 								}
 							}
@@ -4292,7 +4292,7 @@ poll_ldap (EBookBackendLDAP *bl)
 			   protected by the lock? */
 			g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
 
-			ldap_msgfree(res);
+			ldap_msgfree (res);
 		}
 	}
 
@@ -4312,7 +4312,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
 
 	d(printf ("ldap_search_handler (%p)\n", view));
 	if (enable_debug)
-		g_get_current_time(&start);
+		g_get_current_time (&start);
 
 	g_static_rec_mutex_lock (&eds_ldap_handler_lock);
 	if (!bl->priv->ldap) {
@@ -4345,7 +4345,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
 			g_object_unref (contact);
 
 			g_static_rec_mutex_lock (&eds_ldap_handler_lock);
-			e = ldap_next_entry(bl->priv->ldap, e);
+			e = ldap_next_entry (bl->priv->ldap, e);
 			g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
 		}
 	}
@@ -4496,7 +4496,7 @@ e_book_backend_ldap_search (EBookBackendLDAP *bl,
 			g_free (ldap_query);
 
 			if (ldap_err != LDAP_SUCCESS) {
-				book_view_notify_status (bl, view, ldap_err2string(ldap_err));
+				book_view_notify_status (bl, view, ldap_err2string (ldap_err));
 				return;
 			}
 			else if (search_msgid == -1) {
@@ -4513,7 +4513,7 @@ e_book_backend_ldap_search (EBookBackendLDAP *bl,
 				op->aborted = FALSE;
 				e_data_book_view_ref (view);
 
-				ldap_op_add ((LDAPOp*)op, E_BOOK_BACKEND(bl), book, view,
+				ldap_op_add ((LDAPOp*)op, E_BOOK_BACKEND (bl), book, view,
 					     0, search_msgid,
 					     ldap_search_handler, ldap_search_dtor);
 
@@ -4803,7 +4803,7 @@ e_book_backend_ldap_authenticate_user (EBookBackend *backend,
 				entry_dn = ldap_get_dn (bl->priv->ldap, e);
 				bl->priv->connected = FALSE; /* to reconnect with credentials */
 				g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
-				dn = g_strdup(entry_dn);
+				dn = g_strdup (entry_dn);
 
 				ldap_memfree (entry_dn);
 				ldap_msgfree (res);
@@ -4840,7 +4840,7 @@ e_book_backend_ldap_authenticate_user (EBookBackend *backend,
 			}
 		}
 
-		ldap_error = ldap_simple_bind_s(bl->priv->ldap,
+		ldap_error = ldap_simple_bind_s (bl->priv->ldap,
 						bl->priv->auth_dn,
 						bl->priv->auth_passwd);
 		g_static_rec_mutex_unlock (&eds_ldap_handler_lock);
@@ -4978,7 +4978,7 @@ e_book_backend_ldap_get_supported_auth_methods (EBookBackend *backend,
 }
 
 static void
-ldap_cancel_op(gpointer key, gpointer value, gpointer data)
+ldap_cancel_op (gpointer key, gpointer value, gpointer data)
 {
 	EBookBackendLDAP *bl = data;
 	LDAPOp *op = value;
@@ -5053,12 +5053,12 @@ e_book_backend_ldap_load_source (EBookBackend             *backend,
 	ldap_error = ldap_url_parse ((gchar *) uri, &lud);
 
 	if (ldap_error == LDAP_SUCCESS) {
-		bl->priv->ldap_host = g_strdup(lud->lud_host);
+		bl->priv->ldap_host = g_strdup (lud->lud_host);
 		bl->priv->ldap_port = lud->lud_port;
 		/* if a port wasn't specified, default to LDAP_PORT */
 		if (bl->priv->ldap_port == 0)
 			bl->priv->ldap_port = LDAP_PORT;
-		bl->priv->ldap_rootdn = g_strdup(lud->lud_dn);
+		bl->priv->ldap_rootdn = g_strdup (lud->lud_dn);
 		/* in case of migration, filter will be set to NULL and hence the search will fail */
 		if (lud->lud_filter)
 			bl->priv->ldap_search_filter = g_strdup (lud->lud_filter);
@@ -5066,7 +5066,7 @@ e_book_backend_ldap_load_source (EBookBackend             *backend,
 		bl->priv->ldap_timeout = timeout;
 		bl->priv->ldap_scope = lud->lud_scope;
 
-		ldap_free_urldesc(lud);
+		ldap_free_urldesc (lud);
 	} else {
 		if (enable_debug)
 			printf ("e_book_backend_ldap_load_source ... failed to parse the ldap URI %s\n", uri);
diff --git a/addressbook/backends/ldap/openldap-extract.h b/addressbook/backends/ldap/openldap-extract.h
index 17b8e5f..37df943 100644
--- a/addressbook/backends/ldap/openldap-extract.h
+++ b/addressbook/backends/ldap/openldap-extract.h
@@ -126,12 +126,12 @@ typedef struct ldap_objectclass {
 } LDAPObjectClass;
 
 static void
-vfree(gpointer *vec)
+vfree (gpointer *vec)
 {
   gint i;
 
   for (i = 0; vec[i] != NULL; i++)
-    free(vec[i]);
+    free (vec[i]);
 }
 
 /* from schema.c */
@@ -175,7 +175,7 @@ struct token {
 };
 
 static gint
-get_token( const gchar ** sp, gchar ** token_val )
+get_token ( const gchar ** sp, gchar ** token_val )
 {
 	gint kind;
 	const gchar * p;
@@ -208,11 +208,11 @@ get_token( const gchar ** sp, gchar ** token_val )
 			(*sp)++;
 		if (**sp == '\'') {
 			q = *sp;
-			res = LDAP_MALLOC(q-p+1);
+			res = LDAP_MALLOC (q-p+1);
 			if (!res) {
 				kind = TK_OUTOFMEM;
 			} else {
-				strncpy(res,p,q-p);
+				strncpy (res,p,q-p);
 				res[q-p] = '\0';
 				*token_val = res;
 			}
@@ -224,7 +224,7 @@ get_token( const gchar ** sp, gchar ** token_val )
 	default:
 		kind = TK_BAREWORD;
 		p = *sp;
-		while ( !LDAP_SPACE(**sp) &&
+		while ( !LDAP_SPACE (**sp) &&
 			**sp != '(' &&
 			**sp != ')' &&
 			**sp != '$' &&
@@ -232,11 +232,11 @@ get_token( const gchar ** sp, gchar ** token_val )
 			**sp != '\0' )
 			(*sp)++;
 		q = *sp;
-		res = LDAP_MALLOC(q-p+1);
+		res = LDAP_MALLOC (q-p+1);
 		if (!res) {
 			kind = TK_OUTOFMEM;
 		} else {
-			strncpy(res,p,q-p);
+			strncpy (res,p,q-p);
 			res[q-p] = '\0';
 			*token_val = res;
 		}
@@ -250,15 +250,15 @@ get_token( const gchar ** sp, gchar ** token_val )
 
 /* Gobble optional whitespace */
 static void
-parse_whsp(const gchar **sp)
+parse_whsp (const gchar **sp)
 {
-	while (LDAP_SPACE(**sp))
+	while (LDAP_SPACE (**sp))
 		(*sp)++;
 }
 
 /* Parse a sequence of dot-separated decimal strings */
 static gchar *
-ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
+ldap_int_parse_numericoid (const gchar **sp, gint *code, const gint flags)
 {
 	gchar * res = NULL;
 	const gchar * start = *sp;
@@ -273,7 +273,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
 	}
 	/* Each iteration of this loop gets one decimal string */
 	while (**sp) {
-		if (!LDAP_DIGIT(**sp)) {
+		if (!LDAP_DIGIT (**sp)) {
 			/*
 			 * Initial gchar is not a digit or gchar after dot is
 			 * not a digit
@@ -282,7 +282,7 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
 			return NULL;
 		}
 		(*sp)++;
-		while (LDAP_DIGIT(**sp))
+		while (LDAP_DIGIT (**sp))
 			(*sp)++;
 		if (**sp != '.')
 			break;
@@ -302,20 +302,20 @@ ldap_int_parse_numericoid(const gchar **sp, gint *code, const gint flags)
 	if (flags & LDAP_SCHEMA_SKIP) {
 		res = (gchar *)start;
 	} else {
-		res = LDAP_MALLOC(len+1);
+		res = LDAP_MALLOC (len+1);
 		if (!res) {
 			*code = LDAP_SCHERR_OUTOFMEM;
-			return(NULL);
+			return (NULL);
 		}
-		strncpy(res,start,len);
+		strncpy (res,start,len);
 		res[len] = '\0';
 	}
-	return(res);
+	return (res);
 }
 
 /* Parse a qdescr or a list of them enclosed in () */
 static gchar **
-parse_qdescrs(const gchar **sp, gint *code)
+parse_qdescrs (const gchar **sp, gint *code)
 {
 	gchar ** res;
 	gchar ** res1;
@@ -324,58 +324,58 @@ parse_qdescrs(const gchar **sp, gint *code)
 	gint size;
 	gint pos;
 
-	parse_whsp(sp);
-	kind = get_token(sp,&sval);
+	parse_whsp (sp);
+	kind = get_token (sp,&sval);
 	if (kind == TK_LEFTPAREN) {
 		/* Let's presume there will be at least 2 entries */
 		size = 3;
-		res = LDAP_CALLOC(3,sizeof(gchar *));
+		res = LDAP_CALLOC (3,sizeof (gchar *));
 		if (!res) {
 			*code = LDAP_SCHERR_OUTOFMEM;
 			return NULL;
 		}
 		pos = 0;
 		while (1) {
-			parse_whsp(sp);
-			kind = get_token(sp,&sval);
+			parse_whsp (sp);
+			kind = get_token (sp,&sval);
 			if (kind == TK_RIGHTPAREN)
 				break;
 			if (kind == TK_QDESCR) {
 				if (pos == size-2) {
 					size++;
-					res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
+					res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
 					if (!res1) {
-						LDAP_VFREE(res);
-						LDAP_FREE(sval);
+						LDAP_VFREE (res);
+						LDAP_FREE (sval);
 						*code = LDAP_SCHERR_OUTOFMEM;
-						return(NULL);
+						return (NULL);
 					}
 					res = res1;
 				}
 				res[pos++] = sval;
 				res[pos] = NULL;
-				parse_whsp(sp);
+				parse_whsp (sp);
 			} else {
-				LDAP_VFREE(res);
-				LDAP_FREE(sval);
+				LDAP_VFREE (res);
+				LDAP_FREE (sval);
 				*code = LDAP_SCHERR_UNEXPTOKEN;
-				return(NULL);
+				return (NULL);
 			}
 		}
-		parse_whsp(sp);
-		return(res);
+		parse_whsp (sp);
+		return (res);
 	} else if (kind == TK_QDESCR) {
-		res = LDAP_CALLOC(2,sizeof(gchar *));
+		res = LDAP_CALLOC (2,sizeof (gchar *));
 		if (!res) {
 			*code = LDAP_SCHERR_OUTOFMEM;
 			return NULL;
 		}
 		res[0] = sval;
 		res[1] = NULL;
-		parse_whsp(sp);
+		parse_whsp (sp);
 		return res;
 	} else {
-		LDAP_FREE(sval);
+		LDAP_FREE (sval);
 		*code = LDAP_SCHERR_BADNAME;
 		return NULL;
 	}
@@ -383,7 +383,7 @@ parse_qdescrs(const gchar **sp, gint *code)
 
 /* Parse a woid or a $-separated list of them enclosed in () */
 static gchar **
-parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
+parse_oids (const gchar **sp, gint *code, const gint allow_quoted)
 {
 	gchar ** res;
 	gchar ** res1;
@@ -398,48 +398,48 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
 	 * we are very liberal in what we accept as an OID.  Maybe
 	 * refine later.
 	 */
-	parse_whsp(sp);
-	kind = get_token(sp,&sval);
+	parse_whsp (sp);
+	kind = get_token (sp,&sval);
 	if (kind == TK_LEFTPAREN) {
 		/* Let's presume there will be at least 2 entries */
 		size = 3;
-		res = LDAP_CALLOC(3,sizeof(gchar *));
+		res = LDAP_CALLOC (3,sizeof (gchar *));
 		if (!res) {
 			*code = LDAP_SCHERR_OUTOFMEM;
 			return NULL;
 		}
 		pos = 0;
-		parse_whsp(sp);
-		kind = get_token(sp,&sval);
+		parse_whsp (sp);
+		kind = get_token (sp,&sval);
 		if ( kind == TK_BAREWORD ||
 		     ( allow_quoted && kind == TK_QDSTRING ) ) {
 			res[pos++] = sval;
 			res[pos] = NULL;
 		} else {
 			*code = LDAP_SCHERR_UNEXPTOKEN;
-			LDAP_FREE(sval);
-			LDAP_VFREE(res);
+			LDAP_FREE (sval);
+			LDAP_VFREE (res);
 			return NULL;
 		}
-		parse_whsp(sp);
+		parse_whsp (sp);
 		while (1) {
-			kind = get_token(sp,&sval);
+			kind = get_token (sp,&sval);
 			if (kind == TK_RIGHTPAREN)
 				break;
 			if (kind == TK_DOLLAR) {
-				parse_whsp(sp);
-				kind = get_token(sp,&sval);
+				parse_whsp (sp);
+				kind = get_token (sp,&sval);
 				if ( kind == TK_BAREWORD ||
 				     ( allow_quoted &&
 				       kind == TK_QDSTRING ) ) {
 					if (pos == size-2) {
 						size++;
-						res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
+						res1 = LDAP_REALLOC (res,size*sizeof (gchar *));
 						if (!res1) {
-							LDAP_FREE(sval);
-							LDAP_VFREE(res);
+							LDAP_FREE (sval);
+							LDAP_VFREE (res);
 							*code = LDAP_SCHERR_OUTOFMEM;
-							return(NULL);
+							return (NULL);
 						}
 						res = res1;
 					}
@@ -447,53 +447,53 @@ parse_oids(const gchar **sp, gint *code, const gint allow_quoted)
 					res[pos] = NULL;
 				} else {
 					*code = LDAP_SCHERR_UNEXPTOKEN;
-					LDAP_FREE(sval);
-					LDAP_VFREE(res);
+					LDAP_FREE (sval);
+					LDAP_VFREE (res);
 					return NULL;
 				}
-				parse_whsp(sp);
+				parse_whsp (sp);
 			} else {
 				*code = LDAP_SCHERR_UNEXPTOKEN;
-				LDAP_FREE(sval);
-				LDAP_VFREE(res);
+				LDAP_FREE (sval);
+				LDAP_VFREE (res);
 				return NULL;
 			}
 		}
-		parse_whsp(sp);
-		return(res);
+		parse_whsp (sp);
+		return (res);
 	} else if ( kind == TK_BAREWORD ||
 		    ( allow_quoted && kind == TK_QDSTRING ) ) {
-		res = LDAP_CALLOC(2,sizeof(gchar *));
+		res = LDAP_CALLOC (2,sizeof (gchar *));
 		if (!res) {
-			LDAP_FREE(sval);
+			LDAP_FREE (sval);
 			*code = LDAP_SCHERR_OUTOFMEM;
 			return NULL;
 		}
 		res[0] = sval;
 		res[1] = NULL;
-		parse_whsp(sp);
+		parse_whsp (sp);
 		return res;
 	} else {
-		LDAP_FREE(sval);
+		LDAP_FREE (sval);
 		*code = LDAP_SCHERR_BADNAME;
 		return NULL;
 	}
 }
 
 static void
-ldap_objectclass_free(LDAPObjectClass * oc)
+ldap_objectclass_free (LDAPObjectClass * oc)
 {
-	LDAP_FREE(oc->oc_oid);
-	if (oc->oc_names) LDAP_VFREE(oc->oc_names);
-	if (oc->oc_desc) LDAP_FREE(oc->oc_desc);
-	if (oc->oc_sup_oids) LDAP_VFREE(oc->oc_sup_oids);
-	if (oc->oc_at_oids_must) LDAP_VFREE(oc->oc_at_oids_must);
-	if (oc->oc_at_oids_may) LDAP_VFREE(oc->oc_at_oids_may);
-	LDAP_FREE(oc);
+	LDAP_FREE (oc->oc_oid);
+	if (oc->oc_names) LDAP_VFREE (oc->oc_names);
+	if (oc->oc_desc) LDAP_FREE (oc->oc_desc);
+	if (oc->oc_sup_oids) LDAP_VFREE (oc->oc_sup_oids);
+	if (oc->oc_at_oids_must) LDAP_VFREE (oc->oc_at_oids_must);
+	if (oc->oc_at_oids_may) LDAP_VFREE (oc->oc_at_oids_may);
+	LDAP_FREE (oc);
 }
 
 static LDAPObjectClass *
-ldap_str2objectclass( LDAP_CONST gchar * s,
+ldap_str2objectclass ( LDAP_CONST gchar * s,
 	gint * code,
 	LDAP_CONST gchar ** errp,
 	LDAP_CONST unsigned flags )
@@ -519,7 +519,7 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
 	}
 
 	*errp = s;
-	oc = LDAP_CALLOC(1,sizeof(LDAPObjectClass));
+	oc = LDAP_CALLOC (1,sizeof (LDAPObjectClass));
 
 	if (!oc) {
 		*code = LDAP_SCHERR_OUTOFMEM;
@@ -527,11 +527,11 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
 	}
 	oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
 
-	kind = get_token(&ss,&sval);
+	kind = get_token (&ss,&sval);
 	if (kind != TK_LEFTPAREN) {
 		*code = LDAP_SCHERR_NOLEFTPAREN;
-		LDAP_FREE(sval);
-		ldap_objectclass_free(oc);
+		LDAP_FREE (sval);
+		ldap_objectclass_free (oc);
 		return NULL;
 	}
 
@@ -542,14 +542,14 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
 	 * in the wrong format or even no OID at all.  We do our best to
 	 * extract info from those servers.
 	 */
-	parse_whsp(&ss);
+	parse_whsp (&ss);
 	savepos = ss;
-	oc->oc_oid = ldap_int_parse_numericoid(&ss,code,0);
+	oc->oc_oid = ldap_int_parse_numericoid (&ss,code,0);
 	if (!oc->oc_oid) {
 		if ((flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos)) {
 			/* Backtracking */
 			ss = savepos;
-			kind = get_token(&ss,&sval);
+			kind = get_token (&ss,&sval);
 			if (kind == TK_BAREWORD) {
 				if ( !strcasecmp(sval, "NAME") ||
 				     !strcasecmp(sval, "DESC") ||
@@ -567,196 +567,196 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
 					LDAP_SCHEMA_ALLOW_OID_MACRO ) {
 					/* Non-numerical OID, ignore */
 					gint len = ss-savepos;
-					oc->oc_oid = LDAP_MALLOC(len+1);
-					strncpy(oc->oc_oid, savepos, len);
+					oc->oc_oid = LDAP_MALLOC (len+1);
+					strncpy (oc->oc_oid, savepos, len);
 					oc->oc_oid[len] = 0;
 				}
 			}
-			LDAP_FREE(sval);
+			LDAP_FREE (sval);
 		} else {
 			*errp = ss;
-			ldap_objectclass_free(oc);
+			ldap_objectclass_free (oc);
 			return NULL;
 		}
 	}
-	parse_whsp(&ss);
+	parse_whsp (&ss);
 
 	/*
 	 * Beyond this point we will be liberal an accept the items
 	 * in any order.
 	 */
 	while (1) {
-		kind = get_token(&ss,&sval);
+		kind = get_token (&ss,&sval);
 		switch (kind) {
 		case TK_EOS:
 			*code = LDAP_SCHERR_NORIGHTPAREN;
 			*errp = ss;
-			ldap_objectclass_free(oc);
+			ldap_objectclass_free (oc);
 			return NULL;
 		case TK_RIGHTPAREN:
 			return oc;
 		case TK_BAREWORD:
 			if (!strcasecmp(sval,"NAME")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_name) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_name = 1;
-				oc->oc_names = parse_qdescrs(&ss,code);
+				oc->oc_names = parse_qdescrs (&ss,code);
 				if (!oc->oc_names) {
 					if (*code != LDAP_SCHERR_OUTOFMEM)
 						*code = LDAP_SCHERR_BADNAME;
 					*errp = ss;
-					ldap_objectclass_free(oc);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
 			} else if (!strcasecmp(sval,"DESC")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_desc) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_desc = 1;
-				parse_whsp(&ss);
-				kind = get_token(&ss,&sval);
+				parse_whsp (&ss);
+				kind = get_token (&ss,&sval);
 				if (kind != TK_QDSTRING) {
 					*code = LDAP_SCHERR_UNEXPTOKEN;
 					*errp = ss;
-					LDAP_FREE(sval);
-					ldap_objectclass_free(oc);
+					LDAP_FREE (sval);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
 				oc->oc_desc = sval;
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"OBSOLETE")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_obsolete) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_obsolete = 1;
 				oc->oc_obsolete = LDAP_SCHEMA_YES;
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"SUP")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_sup) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_sup = 1;
-				oc->oc_sup_oids = parse_oids(&ss,
+				oc->oc_sup_oids = parse_oids (&ss,
 							     code,
 							     flags);
 				if (!oc->oc_sup_oids) {
 					*errp = ss;
-					ldap_objectclass_free(oc);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
 			} else if (!strcasecmp(sval,"ABSTRACT")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_kind) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_kind = 1;
 				oc->oc_kind = LDAP_SCHEMA_ABSTRACT;
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"STRUCTURAL")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_kind) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_kind = 1;
 				oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"AUXILIARY")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_kind) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_kind = 1;
 				oc->oc_kind = LDAP_SCHEMA_AUXILIARY;
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"MUST")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_must) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_must = 1;
-				oc->oc_at_oids_must = parse_oids(&ss,code,0);
+				oc->oc_at_oids_must = parse_oids (&ss,code,0);
 				if (!oc->oc_at_oids_must) {
 					*errp = ss;
-					ldap_objectclass_free(oc);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (!strcasecmp(sval,"MAY")) {
-				LDAP_FREE(sval);
+				LDAP_FREE (sval);
 				if (seen_may) {
 					*code = LDAP_SCHERR_DUPOPT;
 					*errp = ss;
-					ldap_objectclass_free(oc);
-					return(NULL);
+					ldap_objectclass_free (oc);
+					return (NULL);
 				}
 				seen_may = 1;
-				oc->oc_at_oids_may = parse_oids(&ss,code,0);
+				oc->oc_at_oids_may = parse_oids (&ss,code,0);
 				if (!oc->oc_at_oids_may) {
 					*errp = ss;
-					ldap_objectclass_free(oc);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
-				parse_whsp(&ss);
+				parse_whsp (&ss);
 			} else if (sval[0] == 'X' && sval[1] == '-') {
 				/* Should be parse_qdstrings */
-				ext_vals = parse_qdescrs(&ss, code);
+				ext_vals = parse_qdescrs (&ss, code);
 				if (!ext_vals) {
 					*errp = ss;
-					ldap_objectclass_free(oc);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
 #if 0
-				if ( add_extension(&oc->oc_extensions,
+				if ( add_extension (&oc->oc_extensions,
 						    sval, ext_vals) ) {
 					*code = LDAP_SCHERR_OUTOFMEM;
 					*errp = ss;
-					LDAP_FREE(sval);
-					ldap_objectclass_free(oc);
+					LDAP_FREE (sval);
+					ldap_objectclass_free (oc);
 					return NULL;
 				}
 #endif
 			} else {
 				*code = LDAP_SCHERR_UNEXPTOKEN;
 				*errp = ss;
-				LDAP_FREE(sval);
-				ldap_objectclass_free(oc);
+				LDAP_FREE (sval);
+				ldap_objectclass_free (oc);
 				return NULL;
 			}
 			break;
 		default:
 			*code = LDAP_SCHERR_UNEXPTOKEN;
 			*errp = ss;
-			LDAP_FREE(sval);
-			ldap_objectclass_free(oc);
+			LDAP_FREE (sval);
+			ldap_objectclass_free (oc);
 			return NULL;
 		}
 	}
@@ -769,10 +769,10 @@ ldap_str2objectclass( LDAP_CONST gchar * s,
 #define LDAP_UTF8_INCR(p) ((p)=LDAP_UTF8_NEXT((p)))
 #define ldap_x_utf8_to_ucs4(str) g_utf8_get_char(str)
 
-static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
+static gchar *ldap_utf8_strchr ( const gchar *str, const gchar *chr )
 {
-	for (; *str != '\0'; LDAP_UTF8_INCR(str) ) {
-		if (ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr )) {
+	for (; *str != '\0'; LDAP_UTF8_INCR (str) ) {
+		if (ldap_x_utf8_to_ucs4 ( str ) == ldap_x_utf8_to_ucs4 ( chr )) {
 			return (gchar *) str;
 		}
 	}
@@ -780,14 +780,14 @@ static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
 	return NULL;
 }
 
-static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strcspn ( const gchar *str, const gchar *set )
 {
 	const gchar *cstr;
 	const gchar *cset;
 
-	for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) {
-		for (cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset)) {
-			if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
+	for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) {
+		for (cset = set; *cset != '\0'; LDAP_UTF8_INCR (cset)) {
+			if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) {
 				return cstr - str;
 			}
 		}
@@ -796,18 +796,18 @@ static gsize ldap_utf8_strcspn( const gchar *str, const gchar *set )
 	return cstr - str;
 }
 
-static gsize ldap_utf8_strspn( const gchar *str, const gchar *set )
+static gsize ldap_utf8_strspn ( const gchar *str, const gchar *set )
 {
 	const gchar *cstr;
 	const gchar *cset;
 
-	for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr)) {
-		for (cset = set; ; LDAP_UTF8_INCR(cset)) {
+	for (cstr = str; *cstr != '\0'; LDAP_UTF8_INCR (cstr)) {
+		for (cset = set; ; LDAP_UTF8_INCR (cset)) {
 			if (*cset == '\0') {
 				return cstr - str;
 			}
 
-			if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
+			if (ldap_x_utf8_to_ucs4 ( cstr ) == ldap_x_utf8_to_ucs4 ( cset )) {
 				break;
 			}
 		}
@@ -816,7 +816,7 @@ static gsize ldap_utf8_strspn( const gchar *str, const gchar *set )
 	return cstr - str;
 }
 
-static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
+static gchar *ldap_utf8_strtok (gchar *str, const gchar *sep, gchar **last)
 {
 	gchar *begin;
 	gchar *end;
@@ -825,17 +825,17 @@ static gchar *ldap_utf8_strtok(gchar *str, const gchar *sep, gchar **last)
 
 	begin = str ? str : *last;
 
-	begin += ldap_utf8_strspn( begin, sep );
+	begin += ldap_utf8_strspn ( begin, sep );
 
 	if (*begin == '\0') {
 		*last = NULL;
 		return NULL;
 	}
 
-	end = &begin[ ldap_utf8_strcspn( begin, sep ) ];
+	end = &begin[ ldap_utf8_strcspn ( begin, sep ) ];
 
 	if (*end != '\0') {
-		gchar *next = LDAP_UTF8_NEXT( end );
+		gchar *next = LDAP_UTF8_NEXT ( end );
 		*end = '\0';
 		end = next;
 	}
@@ -885,7 +885,7 @@ typedef struct ldap_url_desc {
 /* from url.c */
 
 static const gchar *
-skip_url_prefix(
+skip_url_prefix (
 	const gchar *url,
 	gint *enclosedp,
 	const gchar **scheme )
@@ -897,7 +897,7 @@ skip_url_prefix(
 	const gchar *p;
 
 	if (url == NULL) {
-		return( NULL );
+		return ( NULL );
 	}
 
 	p = url;
@@ -911,48 +911,48 @@ skip_url_prefix(
 	}
 
 	/* skip leading "URL:" (if any) */
-	if (strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) {
+	if (strncasecmp ( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) {
 		p += LDAP_URL_URLCOLON_LEN;
 	}
 
 	/* check for "ldap://"; prefix */
-	if (strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) {
+	if (strncasecmp ( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) {
 		/* skip over "ldap://"; prefix and return success */
 		p += LDAP_URL_PREFIX_LEN;
 		*scheme = "ldap";
-		return( p );
+		return ( p );
 	}
 
 	/* check for "ldaps://" prefix */
-	if (strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) {
+	if (strncasecmp ( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) {
 		/* skip over "ldaps://" prefix and return success */
 		p += LDAPS_URL_PREFIX_LEN;
 		*scheme = "ldaps";
-		return( p );
+		return ( p );
 	}
 
 	/* check for "ldapi://" prefix */
-	if (strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) {
+	if (strncasecmp ( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) {
 		/* skip over "ldapi://" prefix and return success */
 		p += LDAPI_URL_PREFIX_LEN;
 		*scheme = "ldapi";
-		return( p );
+		return ( p );
 	}
 
 #ifdef LDAP_CONNECTIONLESS
 	/* check for "cldap://"; prefix */
-	if (strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) {
+	if (strncasecmp ( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) {
 		/* skip over "cldap://"; prefix and return success */
 		p += LDAPC_URL_PREFIX_LEN;
 		*scheme = "cldap";
-		return( p );
+		return ( p );
 	}
 #endif
 
-	return( NULL );
+	return ( NULL );
 }
 
-static gint str2scope( const gchar *p )
+static gint str2scope ( const gchar *p )
 {
 	if (strcasecmp( p, "one" ) == 0) {
 		return LDAP_SCOPE_ONELEVEL;
@@ -970,53 +970,53 @@ static gint str2scope( const gchar *p )
 		return LDAP_SCOPE_SUBTREE;
 	}
 
-	return( -1 );
+	return ( -1 );
 }
 
 static void
-ldap_free_urldesc( LDAPURLDesc *ludp )
+ldap_free_urldesc ( LDAPURLDesc *ludp )
 {
 	if (ludp == NULL) {
 		return;
 	}
 
 	if (ludp->lud_scheme != NULL) {
-		LDAP_FREE( ludp->lud_scheme );
+		LDAP_FREE ( ludp->lud_scheme );
 	}
 
 	if (ludp->lud_host != NULL) {
-		LDAP_FREE( ludp->lud_host );
+		LDAP_FREE ( ludp->lud_host );
 	}
 
 	if (ludp->lud_dn != NULL) {
-		LDAP_FREE( ludp->lud_dn );
+		LDAP_FREE ( ludp->lud_dn );
 	}
 
 	if (ludp->lud_filter != NULL) {
-		LDAP_FREE( ludp->lud_filter);
+		LDAP_FREE ( ludp->lud_filter);
 	}
 
 	if (ludp->lud_attrs != NULL) {
-		LDAP_VFREE( ludp->lud_attrs );
+		LDAP_VFREE ( ludp->lud_attrs );
 	}
 
 	if (ludp->lud_exts != NULL) {
-		LDAP_VFREE( ludp->lud_exts );
+		LDAP_VFREE ( ludp->lud_exts );
 	}
 
-	LDAP_FREE( ludp );
+	LDAP_FREE ( ludp );
 }
 
 static gint
-ldap_int_unhex( gint c )
+ldap_int_unhex ( gint c )
 {
-	return( c >= '0' && c <= '9' ? c - '0'
+	return ( c >= '0' && c <= '9' ? c - '0'
 	    : c >= 'A' && c <= 'F' ? c - 'A' + 10
 	    : c - 'a' + 10 );
 }
 
 static void
-ldap_pvt_hex_unescape( gchar *s )
+ldap_pvt_hex_unescape ( gchar *s )
 {
 	/*
 	 * Remove URL hex escapes from s... done in place.  The basic concept for
@@ -1043,7 +1043,7 @@ ldap_pvt_hex_unescape( gchar *s )
 }
 
 static gchar **
-ldap_str2charray( const gchar *str_in, const gchar *brkstr )
+ldap_str2charray ( const gchar *str_in, const gchar *brkstr )
 {
 	gchar	**res;
 	gchar	*str, *s;
@@ -1051,39 +1051,39 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
 	gint	i;
 
 	/* protect the input string from strtok */
-	str = LDAP_STRDUP( str_in );
+	str = LDAP_STRDUP ( str_in );
 	if (str == NULL) {
 		return NULL;
 	}
 
 	i = 1;
 	for (s = str; *s; s++) {
-		if (ldap_utf8_strchr( brkstr, s ) != NULL) {
+		if (ldap_utf8_strchr ( brkstr, s ) != NULL) {
 			i++;
 		}
 	}
 
-	res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) );
+	res = (gchar **) LDAP_MALLOC ( (i + 1) * sizeof (gchar *) );
 
 	if (res == NULL) {
-		LDAP_FREE( str );
+		LDAP_FREE ( str );
 		return NULL;
 	}
 
 	i = 0;
 
-	for (s = ldap_utf8_strtok( str, brkstr, &lasts);
+	for (s = ldap_utf8_strtok ( str, brkstr, &lasts);
 		s != NULL;
-		s = ldap_utf8_strtok( NULL, brkstr, &lasts ) )
+		s = ldap_utf8_strtok ( NULL, brkstr, &lasts ) )
 	{
-		res[i] = LDAP_STRDUP( s );
+		res[i] = LDAP_STRDUP ( s );
 
 		if (res[i] == NULL) {
 			for (--i; i >= 0; i--) {
-				LDAP_FREE( res[i] );
+				LDAP_FREE ( res[i] );
 			}
-			LDAP_FREE( res );
-			LDAP_FREE( str );
+			LDAP_FREE ( res );
+			LDAP_FREE ( str );
 			return NULL;
 		}
 
@@ -1092,12 +1092,12 @@ ldap_str2charray( const gchar *str_in, const gchar *brkstr )
 
 	res[i] = NULL;
 
-	LDAP_FREE( str );
-	return( res );
+	LDAP_FREE ( str );
+	return ( res );
 }
 
 static gint
-ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse_ext ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 {
 /*
  *  Pick apart the pieces of an LDAP URL.
@@ -1116,25 +1116,25 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	*ludpp = NULL;	/* pessimistic */
 
-	url_tmp = skip_url_prefix( url_in, &enclosed, &scheme );
+	url_tmp = skip_url_prefix ( url_in, &enclosed, &scheme );
 
 	if (url_tmp == NULL) {
 		return LDAP_URL_ERR_BADSCHEME;
 	}
 
-	assert( scheme );
+	assert ( scheme );
 
 	/* make working copy of the remainder of the URL */
-	url = LDAP_STRDUP( url_tmp );
+	url = LDAP_STRDUP ( url_tmp );
 	if (url == NULL) {
 		return LDAP_URL_ERR_MEM;
 	}
 
 	if (enclosed) {
-		p = &url[strlen(url)-1];
+		p = &url[strlen (url)-1];
 
 		if (*p != '>') {
-			LDAP_FREE( url );
+			LDAP_FREE ( url );
 			return LDAP_URL_ERR_BADENCLOSURE;
 		}
 
@@ -1142,10 +1142,10 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 	}
 
 	/* allocate return struct */
-	ludp = (LDAPURLDesc *)LDAP_CALLOC( 1, sizeof( LDAPURLDesc ));
+	ludp = (LDAPURLDesc *)LDAP_CALLOC ( 1, sizeof ( LDAPURLDesc ));
 
 	if (ludp == NULL) {
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		return LDAP_URL_ERR_MEM;
 	}
 
@@ -1159,16 +1159,16 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 	ludp->lud_filter = NULL;
 	ludp->lud_exts = NULL;
 
-	ludp->lud_scheme = LDAP_STRDUP( scheme );
+	ludp->lud_scheme = LDAP_STRDUP ( scheme );
 
 	if (ludp->lud_scheme == NULL) {
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_MEM;
 	}
 
 	/* scan forward for '/' that marks end of hostport and begin. of dn */
-	p = strchr( url, '/' );
+	p = strchr ( url, '/' );
 
 	if (p != NULL) {
 		/* terminate hostport; point to start of dn */
@@ -1177,46 +1177,46 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	/* IPv6 syntax with [ip address]:port */
 	if (*url == '[') {
-		r = strchr( url, ']' );
+		r = strchr ( url, ']' );
 		if (r == NULL) {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADURL;
 		}
 		*r++ = '\0';
-		q = strchr( r, ':' );
+		q = strchr ( r, ':' );
 	} else {
-		q = strchr( url, ':' );
+		q = strchr ( url, ':' );
 	}
 
 	if (q != NULL) {
 		gchar	*next;
 
 		*q++ = '\0';
-		ldap_pvt_hex_unescape( q );
+		ldap_pvt_hex_unescape ( q );
 
 		if (*q == '\0') {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADURL;
 		}
 
-		ludp->lud_port = strtol( q, &next, 10 );
+		ludp->lud_port = strtol ( q, &next, 10 );
 		if (next == NULL || next[0] != '\0') {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADURL;
 		}
 	}
 
-	ldap_pvt_hex_unescape( url );
+	ldap_pvt_hex_unescape ( url );
 
 	/* If [ip address]:port syntax, url is [ip and we skip the [ */
-	ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) );
+	ludp->lud_host = LDAP_STRDUP ( url + ( *url == '[' ) );
 
 	if (ludp->lud_host == NULL) {
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_MEM;
 	}
 
@@ -1229,35 +1229,35 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 	 * but we need to account for it. Fortunately it can't be confused with
 	 * anything real.
 	 */
-	if ( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) {
+	if ( (p == NULL) && (q != NULL) && ((q = strchr ( q, '?')) != NULL)) {
 		q++;
 		/* ? immediately followed by question */
 		if ( *q == '?') {
 			q++;
 			if (*q != '\0') {
 				/* parse dn part */
-				ldap_pvt_hex_unescape( q );
-				ludp->lud_dn = LDAP_STRDUP( q );
+				ldap_pvt_hex_unescape ( q );
+				ludp->lud_dn = LDAP_STRDUP ( q );
 			} else {
 				ludp->lud_dn = LDAP_STRDUP( "" );
 			}
 
 			if (ludp->lud_dn == NULL) {
-				LDAP_FREE( url );
-				ldap_free_urldesc( ludp );
+				LDAP_FREE ( url );
+				ldap_free_urldesc ( ludp );
 				return LDAP_URL_ERR_MEM;
 			}
 		}
 	}
 
 	if (p == NULL) {
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		*ludpp = ludp;
 		return LDAP_URL_SUCCESS;
 	}
 
 	/* scan forward for '?' that may marks end of dn */
-	q = strchr( p, '?' );
+	q = strchr ( p, '?' );
 
 	if (q != NULL) {
 		/* terminate dn part */
@@ -1266,28 +1266,28 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	if (*p != '\0') {
 		/* parse dn part */
-		ldap_pvt_hex_unescape( p );
-		ludp->lud_dn = LDAP_STRDUP( p );
+		ldap_pvt_hex_unescape ( p );
+		ludp->lud_dn = LDAP_STRDUP ( p );
 	} else {
 		ludp->lud_dn = LDAP_STRDUP( "" );
 	}
 
 	if (ludp->lud_dn == NULL) {
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_MEM;
 	}
 
 	if (q == NULL) {
 		/* no more */
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		*ludpp = ludp;
 		return LDAP_URL_SUCCESS;
 	}
 
 	/* scan forward for '?' that may marks end of attributes */
 	p = q;
-	q = strchr( p, '?' );
+	q = strchr ( p, '?' );
 
 	if (q != NULL) {
 		/* terminate attributes part */
@@ -1296,26 +1296,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	if (*p != '\0') {
 		/* parse attributes */
-		ldap_pvt_hex_unescape( p );
+		ldap_pvt_hex_unescape ( p );
 		ludp->lud_attrs = ldap_str2charray( p, "," );
 
 		if (ludp->lud_attrs == NULL) {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADATTRS;
 		}
 	}
 
 	if (q == NULL) {
 		/* no more */
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		*ludpp = ludp;
 		return LDAP_URL_SUCCESS;
 	}
 
 	/* scan forward for '?' that may marks end of scope */
 	p = q;
-	q = strchr( p, '?' );
+	q = strchr ( p, '?' );
 
 	if (q != NULL) {
 		/* terminate the scope part */
@@ -1324,26 +1324,26 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	if (*p != '\0') {
 		/* parse the scope */
-		ldap_pvt_hex_unescape( p );
-		ludp->lud_scope = str2scope( p );
+		ldap_pvt_hex_unescape ( p );
+		ludp->lud_scope = str2scope ( p );
 
 		if (ludp->lud_scope == -1) {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADSCOPE;
 		}
 	}
 
 	if (q == NULL) {
 		/* no more */
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		*ludpp = ludp;
 		return LDAP_URL_SUCCESS;
 	}
 
 	/* scan forward for '?' that may marks end of filter */
 	p = q;
-	q = strchr( p, '?' );
+	q = strchr ( p, '?' );
 
 	if (q != NULL) {
 		/* terminate the filter part */
@@ -1352,40 +1352,40 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	if (*p != '\0') {
 		/* parse the filter */
-		ldap_pvt_hex_unescape( p );
+		ldap_pvt_hex_unescape ( p );
 
 		if (!*p) {
 			/* missing filter */
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_BADFILTER;
 		}
 
-		LDAP_FREE( ludp->lud_filter );
-		ludp->lud_filter = LDAP_STRDUP( p );
+		LDAP_FREE ( ludp->lud_filter );
+		ludp->lud_filter = LDAP_STRDUP ( p );
 
 		if (ludp->lud_filter == NULL) {
-			LDAP_FREE( url );
-			ldap_free_urldesc( ludp );
+			LDAP_FREE ( url );
+			ldap_free_urldesc ( ludp );
 			return LDAP_URL_ERR_MEM;
 		}
 	}
 
 	if (q == NULL) {
 		/* no more */
-		LDAP_FREE( url );
+		LDAP_FREE ( url );
 		*ludpp = ludp;
 		return LDAP_URL_SUCCESS;
 	}
 
 	/* scan forward for '?' that may marks end of extensions */
 	p = q;
-	q = strchr( p, '?' );
+	q = strchr ( p, '?' );
 
 	if (q != NULL) {
 		/* extra '?' */
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_BADURL;
 	}
 
@@ -1393,13 +1393,13 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 	ludp->lud_exts = ldap_str2charray( p, "," );
 
 	if (ludp->lud_exts == NULL) {
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_BADEXTS;
 	}
 
 	for (i=0; ludp->lud_exts[i] != NULL; i++) {
-		ldap_pvt_hex_unescape( ludp->lud_exts[i] );
+		ldap_pvt_hex_unescape ( ludp->lud_exts[i] );
 
 		if (*ludp->lud_exts[i] == '!') {
 			/* count the number of critical extensions */
@@ -1409,21 +1409,21 @@ ldap_url_parse_ext( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 
 	if (i == 0) {
 		/* must have 1 or more */
-		LDAP_FREE( url );
-		ldap_free_urldesc( ludp );
+		LDAP_FREE ( url );
+		ldap_free_urldesc ( ludp );
 		return LDAP_URL_ERR_BADEXTS;
 	}
 
 	/* no more */
 	*ludpp = ludp;
-	LDAP_FREE( url );
+	LDAP_FREE ( url );
 	return LDAP_URL_SUCCESS;
 }
 
 static gint
-ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
+ldap_url_parse ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 {
-	gint rc = ldap_url_parse_ext( url_in, ludpp );
+	gint rc = ldap_url_parse_ext ( url_in, ludpp );
 
 	if (rc != LDAP_URL_SUCCESS) {
 		return rc;
@@ -1434,7 +1434,7 @@ ldap_url_parse( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp )
 	}
 
 	if ((*ludpp)->lud_host != NULL && *(*ludpp)->lud_host == '\0') {
-		LDAP_FREE( (*ludpp)->lud_host );
+		LDAP_FREE ( (*ludpp)->lud_host );
 		(*ludpp)->lud_host = NULL;
 	}
 
diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c
index c2911b8..c0a42dc 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf.c
@@ -222,7 +222,7 @@ set_revision (EContact *contact)
 	const struct tm *tm = NULL;
 	time_t t;
 
-	t = time(NULL);
+	t = time (NULL);
 	tm = gmtime (&t);
 	if (tm)
 		strftime (time_string, 100, "%Y-%m-%dT%H:%M:%SZ", tm);
@@ -230,7 +230,7 @@ set_revision (EContact *contact)
 }
 
 static EContact *
-do_create(EBookBackendVCF  *bvcf,
+do_create (EBookBackendVCF  *bvcf,
 	  const gchar     *vcard_req,
 	  gboolean        dirty_the_file)
 {
@@ -246,7 +246,7 @@ do_create(EBookBackendVCF  *bvcf,
 	id = e_book_backend_vcf_create_unique_id ();
 
 	contact = e_contact_new_from_vcard (vcard_req);
-	e_contact_set(contact, E_CONTACT_UID, id);
+	e_contact_set (contact, E_CONTACT_UID, id);
 	g_free (id);
 
 	rev = e_contact_get_const (contact,  E_CONTACT_REV);
@@ -560,7 +560,7 @@ e_book_backend_vcf_get_required_fields (EBookBackendSync *backend,
 {
 	GList *fields = NULL;
 
-	fields = g_list_append (fields , g_strdup(e_contact_field_name (E_CONTACT_FILE_AS)));
+	fields = g_list_append (fields , g_strdup (e_contact_field_name (E_CONTACT_FILE_AS)));
 	*fields_out = fields;
 }
 
@@ -637,7 +637,7 @@ e_book_backend_vcf_load_source (EBookBackend             *backend,
 #ifdef CREATE_DEFAULT_VCARD
 				EContact *contact;
 
-				contact = do_create(bvcf, XIMIAN_VCARD, FALSE);
+				contact = do_create (bvcf, XIMIAN_VCARD, FALSE);
 				save_file (bvcf);
 
 				/* XXX check errors here */
@@ -767,7 +767,7 @@ e_book_backend_vcf_init (EBookBackendVCF *backend)
 	EBookBackendVCFPrivate *priv;
 
 	priv                 = g_new0 (EBookBackendVCFPrivate, 1);
-	priv->mutex = g_mutex_new();
+	priv->mutex = g_mutex_new ();
 
 	backend->priv = priv;
 }
diff --git a/addressbook/backends/webdav/e-book-backend-webdav-factory.c b/addressbook/backends/webdav/e-book-backend-webdav-factory.c
index 49dcb2b..794a59d 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav-factory.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav-factory.c
@@ -28,16 +28,16 @@ E_BOOK_BACKEND_FACTORY_SIMPLE (webdav, Webdav, e_book_backend_webdav_new)
 
 static GType webdav_type;
 
-void eds_module_initialize(GTypeModule *module)
+void eds_module_initialize (GTypeModule *module)
 {
-	webdav_type = _webdav_factory_get_type(module);
+	webdav_type = _webdav_factory_get_type (module);
 }
 
-void eds_module_shutdown(void)
+void eds_module_shutdown (void)
 {
 }
 
-void eds_module_list_types(const GType **types, gint *num_types)
+void eds_module_list_types (const GType **types, gint *num_types)
 {
 	*types     = &webdav_type;
 	*num_types = 1;
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index bff0879..322f5b0 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -109,87 +109,87 @@ webdav_debug_setup (SoupSession *session)
 }
 
 static void
-closure_destroy(WebdavBackendSearchClosure *closure)
+closure_destroy (WebdavBackendSearchClosure *closure)
 {
-	e_flag_free(closure->running);
-	g_free(closure);
+	e_flag_free (closure->running);
+	g_free (closure);
 }
 
 static WebdavBackendSearchClosure*
-init_closure(EDataBookView *book_view, EBookBackendWebdav *webdav)
+init_closure (EDataBookView *book_view, EBookBackendWebdav *webdav)
 {
 	WebdavBackendSearchClosure *closure = g_new (WebdavBackendSearchClosure, 1);
 
 	closure->webdav  = webdav;
 	closure->thread  = NULL;
-	closure->running = e_flag_new();
+	closure->running = e_flag_new ();
 
-	g_object_set_data_full(G_OBJECT(book_view), WEBDAV_CLOSURE_NAME, closure,
+	g_object_set_data_full (G_OBJECT (book_view), WEBDAV_CLOSURE_NAME, closure,
 			(GDestroyNotify)closure_destroy);
 
 	return closure;
 }
 
 static WebdavBackendSearchClosure*
-get_closure(EDataBookView *book_view)
+get_closure (EDataBookView *book_view)
 {
-	return g_object_get_data(G_OBJECT(book_view), WEBDAV_CLOSURE_NAME);
+	return g_object_get_data (G_OBJECT (book_view), WEBDAV_CLOSURE_NAME);
 }
 
 static EContact*
-download_contact(EBookBackendWebdav *webdav, const gchar *uri)
+download_contact (EBookBackendWebdav *webdav, const gchar *uri)
 {
 	SoupMessage *message;
 	const gchar  *etag;
 	EContact    *contact;
 	guint        status;
 
-	message = soup_message_new(SOUP_METHOD_GET, uri);
+	message = soup_message_new (SOUP_METHOD_GET, uri);
 	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
 	soup_message_headers_append (message->request_headers, "Connection", "close");
 
-	status = soup_session_send_message(webdav->priv->session, message);
+	status = soup_session_send_message (webdav->priv->session, message);
 	if (status != 200) {
 		g_warning("Couldn't load '%s' (http status %d)", uri, status);
-		g_object_unref(message);
+		g_object_unref (message);
 		return NULL;
 	}
 
 	if (message->response_body == NULL) {
 		g_message("no response body after requesting '%s'", uri);
-		g_object_unref(message);
+		g_object_unref (message);
 		return NULL;
 	}
 
 	if (message->response_body->length <= 11 || 0 != g_ascii_strncasecmp ((const gchar *) message->response_body->data, "BEGIN:VCARD", 11)) {
-		g_object_unref(message);
+		g_object_unref (message);
 		return NULL;
 	}
 
 	etag = soup_message_headers_get(message->response_headers, "ETag");
 
-	contact = e_contact_new_from_vcard(message->response_body->data);
+	contact = e_contact_new_from_vcard (message->response_body->data);
 	if (contact == NULL) {
 		g_warning("Invalid vcard at '%s'", uri);
-		g_object_unref(message);
+		g_object_unref (message);
 		return NULL;
 	}
 
 	/* we use our URI as UID
 	 * the etag is rememebered in the revision field */
-	e_contact_set(contact, E_CONTACT_UID, (gconstpointer) uri);
+	e_contact_set (contact, E_CONTACT_UID, (gconstpointer) uri);
 	if (etag != NULL) {
-		e_contact_set(contact, E_CONTACT_REV, (gconstpointer) etag);
+		e_contact_set (contact, E_CONTACT_REV, (gconstpointer) etag);
 	}
 
-	g_object_unref(message);
+	g_object_unref (message);
 	return contact;
 }
 
 static guint
-upload_contact(EBookBackendWebdav *webdav, EContact *contact)
+upload_contact (EBookBackendWebdav *webdav, EContact *contact)
 {
-	ESource     *source = e_book_backend_get_source(E_BOOK_BACKEND(webdav));
+	ESource     *source = e_book_backend_get_source (E_BOOK_BACKEND (webdav));
 	SoupMessage *message;
 	gchar       *uri;
 	gchar       *etag;
@@ -199,13 +199,13 @@ upload_contact(EBookBackendWebdav *webdav, EContact *contact)
 	const gchar  *property;
 	gboolean     avoid_ifmatch;
 
-	uri = e_contact_get(contact, E_CONTACT_UID);
+	uri = e_contact_get (contact, E_CONTACT_UID);
 	if (uri == NULL) {
 		g_warning("can't upload contact without UID");
 		return 400;
 	}
 
-	message = soup_message_new(SOUP_METHOD_PUT, uri);
+	message = soup_message_new (SOUP_METHOD_PUT, uri);
 	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
 	soup_message_headers_append (message->request_headers, "Connection", "close");
 
@@ -220,34 +220,34 @@ upload_contact(EBookBackendWebdav *webdav, EContact *contact)
 	 * we can leave it out */
 	if (!avoid_ifmatch) {
 		/* only override if etag is still the same on the server */
-		etag = e_contact_get(contact, E_CONTACT_REV);
+		etag = e_contact_get (contact, E_CONTACT_REV);
 		if (etag == NULL) {
-			soup_message_headers_append(message->request_headers,
+			soup_message_headers_append (message->request_headers,
 						    "If-None-Match", "*");
 		} else if (etag[0] == 'W' && etag[1] == '/') {
 			g_warning("we only have a weak ETag, don't use If-Match synchronisation");
 		} else {
-			soup_message_headers_append(message->request_headers,
+			soup_message_headers_append (message->request_headers,
 						    "If-Match", etag);
-			g_free(etag);
+			g_free (etag);
 		}
 	}
 
 	/* don't upload the UID and REV fields, they're only interesting inside
 	 * evolution and not on the webdav server */
-	e_contact_set(contact, E_CONTACT_UID, NULL);
-	e_contact_set(contact, E_CONTACT_REV, NULL);
-	request = e_vcard_to_string(E_VCARD(contact), EVC_FORMAT_VCARD_30);
+	e_contact_set (contact, E_CONTACT_UID, NULL);
+	e_contact_set (contact, E_CONTACT_REV, NULL);
+	request = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
 	soup_message_set_request(message, "text/vcard", SOUP_MEMORY_TEMPORARY,
-				 request, strlen(request));
+				 request, strlen (request));
 
-	status   = soup_session_send_message(webdav->priv->session, message);
+	status   = soup_session_send_message (webdav->priv->session, message);
 	new_etag = soup_message_headers_get(message->response_headers, "ETag");
 
 	redir_uri = soup_message_headers_get (message->response_headers, "Location");
 
 	/* set UID and REV fields */
-	e_contact_set(contact, E_CONTACT_REV, (gconstpointer) new_etag);
+	e_contact_set (contact, E_CONTACT_REV, (gconstpointer) new_etag);
 	if (redir_uri && *redir_uri) {
 		if (!strstr (redir_uri, "://")) {
 			/* it's a relative URI */
@@ -268,22 +268,22 @@ upload_contact(EBookBackendWebdav *webdav, EContact *contact)
 		e_contact_set (contact, E_CONTACT_UID, uri);
 	}
 
-	g_object_unref(message);
-	g_free(request);
-	g_free(uri);
+	g_object_unref (message);
+	g_free (request);
+	g_free (uri);
 
 	return status;
 }
 
 static GError *
-webdav_handle_auth_request(EBookBackendWebdav *webdav)
+webdav_handle_auth_request (EBookBackendWebdav *webdav)
 {
 	EBookBackendWebdavPrivate *priv = webdav->priv;
 
 	if (priv->username != NULL) {
-		g_free(priv->username);
+		g_free (priv->username);
 		priv->username = NULL;
-		g_free(priv->password);
+		g_free (priv->password);
 		priv->password = NULL;
 
 		return EDB_ERROR (AUTHENTICATION_FAILED);
@@ -293,7 +293,7 @@ webdav_handle_auth_request(EBookBackendWebdav *webdav)
 }
 
 static void
-e_book_backend_webdav_create_contact(EBookBackend *backend,
+e_book_backend_webdav_create_contact (EBookBackend *backend,
 		EDataBook *book, guint32 opid, const gchar *vcard)
 {
 	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
@@ -307,20 +307,20 @@ e_book_backend_webdav_create_contact(EBookBackend *backend,
 		return;
 	}
 
-	contact = e_contact_new_from_vcard(vcard);
+	contact = e_contact_new_from_vcard (vcard);
 
 	/* do 3 rand() calls to construct a unique ID... poor way but should be
 	 * good enough for us */
 	uid = g_strdup_printf("%s%08X-%08X-%08X.vcf", priv->uri, rand(), rand(),
-			      rand());
-	e_contact_set(contact, E_CONTACT_UID, uid);
+			      rand ());
+	e_contact_set (contact, E_CONTACT_UID, uid);
 
 	/* kill revision field (might have been set by some other backend) */
-	e_contact_set(contact, E_CONTACT_REV, NULL);
+	e_contact_set (contact, E_CONTACT_REV, NULL);
 
-	status = upload_contact(webdav, contact);
+	status = upload_contact (webdav, contact);
 	if (status != 201 && status != 204) {
-		g_object_unref(contact);
+		g_object_unref (contact);
 		if (status == 401 || status == 407) {
 			e_data_book_respond_create (book, opid, webdav_handle_auth_request (webdav), NULL);
 		} else {
@@ -329,57 +329,57 @@ e_book_backend_webdav_create_contact(EBookBackend *backend,
 						_("Create resource '%s' failed with HTTP status: %d"), uid, status),
 					NULL);
 		}
-		g_free(uid);
+		g_free (uid);
 		return;
 	}
 	/* PUT request didn't return an etag? try downloading to get one */
-	if (e_contact_get_const(contact, E_CONTACT_REV) == NULL) {
+	if (e_contact_get_const (contact, E_CONTACT_REV) == NULL) {
 		const gchar *new_uid;
 		EContact *new_contact;
 
 		g_warning("Server didn't return etag for new address resource");
 		new_uid = e_contact_get_const (contact, E_CONTACT_UID);
 		new_contact = download_contact (webdav, new_uid);
-		g_object_unref(contact);
+		g_object_unref (contact);
 
 		if (new_contact == NULL) {
 			e_data_book_respond_create (book, opid,
 					EDB_ERROR (OTHER_ERROR), NULL);
-			g_free(uid);
+			g_free (uid);
 			return;
 		}
 		contact = new_contact;
 	}
 
-	e_book_backend_cache_add_contact(priv->cache, contact);
+	e_book_backend_cache_add_contact (priv->cache, contact);
 	e_data_book_respond_create (book, opid, EDB_ERROR (SUCCESS), contact);
 
 	if (contact)
-		g_object_unref(contact);
-	g_free(uid);
+		g_object_unref (contact);
+	g_free (uid);
 }
 
 static guint
-delete_contact(EBookBackendWebdav *webdav, const gchar *uri)
+delete_contact (EBookBackendWebdav *webdav, const gchar *uri)
 {
 	SoupMessage *message;
 	guint        status;
 
-	message = soup_message_new(SOUP_METHOD_DELETE, uri);
+	message = soup_message_new (SOUP_METHOD_DELETE, uri);
 	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
 	soup_message_headers_append (message->request_headers, "Connection", "close");
 
-	status = soup_session_send_message(webdav->priv->session, message);
-	g_object_unref(message);
+	status = soup_session_send_message (webdav->priv->session, message);
+	g_object_unref (message);
 
 	return status;
 }
 
 static void
-e_book_backend_webdav_remove_contacts(EBookBackend *backend,
+e_book_backend_webdav_remove_contacts (EBookBackend *backend,
 		EDataBook *book, guint32 opid, GList *id_list)
 {
-	EBookBackendWebdav        *webdav      = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav      = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv        = webdav->priv;
 	GList                     *deleted_ids = NULL;
 	GList                     *list;
@@ -394,7 +394,7 @@ e_book_backend_webdav_remove_contacts(EBookBackend *backend,
 		const gchar *uid = (const gchar *) list->data;
 		guint       status;
 
-		status = delete_contact(webdav, uid);
+		status = delete_contact (webdav, uid);
 		if (status != 204) {
 			if (status == 401 || status == 407) {
 				e_data_book_respond_remove_contacts (book, opid, webdav_handle_auth_request (webdav),
@@ -404,7 +404,7 @@ e_book_backend_webdav_remove_contacts(EBookBackend *backend,
 			}
 			continue;
 		}
-		e_book_backend_cache_remove_contact(priv->cache, uid);
+		e_book_backend_cache_remove_contact (priv->cache, uid);
 		deleted_ids = g_list_append (deleted_ids, list->data);
 	}
 
@@ -413,27 +413,27 @@ e_book_backend_webdav_remove_contacts(EBookBackend *backend,
 }
 
 static void
-e_book_backend_webdav_modify_contact(EBookBackend *backend,
+e_book_backend_webdav_modify_contact (EBookBackend *backend,
 		EDataBook *book, guint32 opid, const gchar *vcard)
 {
-	EBookBackendWebdav        *webdav  = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav  = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv    = webdav->priv;
-	EContact                  *contact = e_contact_new_from_vcard(vcard);
+	EContact                  *contact = e_contact_new_from_vcard (vcard);
 	const gchar                *uid;
 	const gchar                *etag;
 	guint status;
 
 	if (priv->mode == E_DATA_BOOK_MODE_LOCAL) {
-		e_data_book_respond_create(book, opid,
+		e_data_book_respond_create (book, opid,
 				EDB_ERROR (REPOSITORY_OFFLINE), NULL);
-		g_object_unref(contact);
+		g_object_unref (contact);
 		return;
 	}
 
 	/* modify contact */
-	status = upload_contact(webdav, contact);
+	status = upload_contact (webdav, contact);
 	if (status != 201 && status != 204) {
-		g_object_unref(contact);
+		g_object_unref (contact);
 		if (status == 401 || status == 407) {
 			e_data_book_respond_remove_contacts (book, opid, webdav_handle_auth_request (webdav), NULL);
 			return;
@@ -455,45 +455,45 @@ e_book_backend_webdav_modify_contact(EBookBackend *backend,
 		return;
 	}
 
-	uid = e_contact_get_const(contact, E_CONTACT_UID);
-	e_book_backend_cache_remove_contact(priv->cache, uid);
+	uid = e_contact_get_const (contact, E_CONTACT_UID);
+	e_book_backend_cache_remove_contact (priv->cache, uid);
 
-	etag = e_contact_get_const(contact, E_CONTACT_REV);
+	etag = e_contact_get_const (contact, E_CONTACT_REV);
 
 	/* PUT request didn't return an etag? try downloading to get one */
 	if (etag == NULL || (etag[0] == 'W' && etag[1] == '/')) {
 		EContact *new_contact;
 
 		g_warning("Server didn't return etag for modified address resource");
-		new_contact = download_contact(webdav, uid);
+		new_contact = download_contact (webdav, uid);
 		if (new_contact != NULL) {
 			contact = new_contact;
 		}
 	}
-	e_book_backend_cache_add_contact(priv->cache, contact);
+	e_book_backend_cache_add_contact (priv->cache, contact);
 
 	e_data_book_respond_modify (book, opid, EDB_ERROR (SUCCESS), contact);
 
-	g_object_unref(contact);
+	g_object_unref (contact);
 }
 
 static void
-e_book_backend_webdav_get_contact(EBookBackend *backend, EDataBook *book,
+e_book_backend_webdav_get_contact (EBookBackend *backend, EDataBook *book,
 		guint32 opid, const gchar *uid)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 	EContact                  *contact;
 	gchar                      *vcard;
 
 	if (priv->mode == E_DATA_BOOK_MODE_LOCAL) {
-		contact = e_book_backend_cache_get_contact(priv->cache, uid);
+		contact = e_book_backend_cache_get_contact (priv->cache, uid);
 	} else {
-		contact = download_contact(webdav, uid);
+		contact = download_contact (webdav, uid);
 		/* update cache as we possibly have changes */
 		if (contact != NULL) {
-			e_book_backend_cache_remove_contact(priv->cache, uid);
-			e_book_backend_cache_add_contact(priv->cache, contact);
+			e_book_backend_cache_remove_contact (priv->cache, uid);
+			e_book_backend_cache_add_contact (priv->cache, contact);
 		}
 	}
 
@@ -502,10 +502,10 @@ e_book_backend_webdav_get_contact(EBookBackend *backend, EDataBook *book,
 		return;
 	}
 
-	vcard = e_vcard_to_string(E_VCARD(contact), EVC_FORMAT_VCARD_30);
+	vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
 	e_data_book_respond_get_contact (book, opid, EDB_ERROR (SUCCESS), vcard);
-	g_free(vcard);
-	g_object_unref(contact);
+	g_free (vcard);
+	g_object_unref (contact);
 }
 
 typedef struct parser_strings_t {
@@ -526,57 +526,57 @@ struct response_element_t {
 };
 
 static response_element_t*
-parse_response_tag(const parser_strings_t *strings, xmlTextReaderPtr reader)
+parse_response_tag (const parser_strings_t *strings, xmlTextReaderPtr reader)
 {
 	xmlChar            *href  = NULL;
 	xmlChar            *etag  = NULL;
-	gint                 depth = xmlTextReaderDepth(reader);
+	gint                 depth = xmlTextReaderDepth (reader);
 	response_element_t *element;
 
-	while (xmlTextReaderRead(reader) && xmlTextReaderDepth(reader) > depth) {
+	while (xmlTextReaderRead (reader) && xmlTextReaderDepth (reader) > depth) {
 		const xmlChar *tag_name;
-		if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT)
+		if (xmlTextReaderNodeType (reader) != XML_READER_TYPE_ELEMENT)
 			continue;
 
-		if (xmlTextReaderConstNamespaceUri(reader) != strings->dav)
+		if (xmlTextReaderConstNamespaceUri (reader) != strings->dav)
 			continue;
 
-		tag_name = xmlTextReaderConstLocalName(reader);
+		tag_name = xmlTextReaderConstLocalName (reader);
 		if (tag_name == strings->href) {
 			if (href != NULL) {
 				/* multiple href elements?!? */
-				xmlFree(href);
+				xmlFree (href);
 			}
-			href = xmlTextReaderReadString(reader);
+			href = xmlTextReaderReadString (reader);
 		} else if (tag_name == strings->propstat) {
 			/* find <propstat><prop><getetag> hierarchy */
-			gint depth2 = xmlTextReaderDepth(reader);
-			while (xmlTextReaderRead(reader)
-					&& xmlTextReaderDepth(reader) > depth2) {
+			gint depth2 = xmlTextReaderDepth (reader);
+			while (xmlTextReaderRead (reader)
+					&& xmlTextReaderDepth (reader) > depth2) {
 				gint depth3;
-				if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT)
+				if (xmlTextReaderNodeType (reader) != XML_READER_TYPE_ELEMENT)
 					continue;
 
-				if (xmlTextReaderConstNamespaceUri(reader) != strings->dav
-						|| xmlTextReaderConstLocalName(reader) != strings->prop)
+				if (xmlTextReaderConstNamespaceUri (reader) != strings->dav
+						|| xmlTextReaderConstLocalName (reader) != strings->prop)
 					continue;
 
-				depth3 = xmlTextReaderDepth(reader);
-				while (xmlTextReaderRead(reader)
-						&& xmlTextReaderDepth(reader) > depth3) {
-					if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT)
+				depth3 = xmlTextReaderDepth (reader);
+				while (xmlTextReaderRead (reader)
+						&& xmlTextReaderDepth (reader) > depth3) {
+					if (xmlTextReaderNodeType (reader) != XML_READER_TYPE_ELEMENT)
 						continue;
 
-					if (xmlTextReaderConstNamespaceUri(reader) != strings->dav
-							|| xmlTextReaderConstLocalName(reader)
+					if (xmlTextReaderConstNamespaceUri (reader) != strings->dav
+							|| xmlTextReaderConstLocalName (reader)
 							!= strings->getetag)
 						continue;
 
 					if (etag != NULL) {
 						/* multiple etag elements?!? */
-						xmlFree(etag);
+						xmlFree (etag);
 					}
-					etag = xmlTextReaderReadString(reader);
+					etag = xmlTextReaderReadString (reader);
 				}
 			}
 		}
@@ -588,14 +588,14 @@ parse_response_tag(const parser_strings_t *strings, xmlTextReaderPtr reader)
 	}
 
 	/* append element to list */
-	element = g_malloc(sizeof(element[0]));
+	element = g_malloc (sizeof (element[0]));
 	element->href = href;
 	element->etag = etag;
 	return element;
 }
 
 static response_element_t*
-parse_propfind_response(xmlTextReaderPtr reader)
+parse_propfind_response (xmlTextReaderPtr reader)
 {
 	parser_strings_t    strings;
 	response_element_t *elements;
@@ -611,12 +611,12 @@ parse_propfind_response(xmlTextReaderPtr reader)
 	strings.prop        = xmlTextReaderConstString(reader, BAD_CAST "prop");
 	strings.getetag     = xmlTextReaderConstString(reader, BAD_CAST "getetag");
 
-	while (xmlTextReaderRead(reader)
-			&& xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT) {
+	while (xmlTextReaderRead (reader)
+			&& xmlTextReaderNodeType (reader) != XML_READER_TYPE_ELEMENT) {
 	}
 
-	if (xmlTextReaderConstLocalName(reader) != strings.multistatus
-			|| xmlTextReaderConstNamespaceUri(reader) != strings.dav) {
+	if (xmlTextReaderConstLocalName (reader) != strings.multistatus
+			|| xmlTextReaderConstNamespaceUri (reader) != strings.dav) {
 		g_warning("webdav PROPFIND result is not <DAV:multistatus>");
 		return NULL;
 	}
@@ -624,17 +624,17 @@ parse_propfind_response(xmlTextReaderPtr reader)
 	elements = NULL;
 
 	/* parse all DAV:response tags */
-	while (xmlTextReaderRead(reader) && xmlTextReaderDepth(reader) > 0) {
+	while (xmlTextReaderRead (reader) && xmlTextReaderDepth (reader) > 0) {
 		response_element_t *element;
 
-		if (xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT)
+		if (xmlTextReaderNodeType (reader) != XML_READER_TYPE_ELEMENT)
 			continue;
 
-		if (xmlTextReaderConstLocalName(reader) != strings.response
-				|| xmlTextReaderConstNamespaceUri(reader) != strings.dav)
+		if (xmlTextReaderConstLocalName (reader) != strings.response
+				|| xmlTextReaderConstNamespaceUri (reader) != strings.dav)
 			continue;
 
-		element = parse_response_tag(&strings, reader);
+		element = parse_response_tag (&strings, reader);
 		if (element == NULL)
 			continue;
 
@@ -646,7 +646,7 @@ parse_propfind_response(xmlTextReaderPtr reader)
 }
 
 static SoupMessage*
-send_propfind(EBookBackendWebdav *webdav)
+send_propfind (EBookBackendWebdav *webdav)
 {
 	SoupMessage               *message;
 	EBookBackendWebdavPrivate *priv    = webdav->priv;
@@ -654,14 +654,14 @@ send_propfind(EBookBackendWebdav *webdav)
 		"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
 		"<propfind xmlns=\"DAV:\"><prop><getetag/></prop></propfind>";
 
-	message = soup_message_new(SOUP_METHOD_PROPFIND, priv->uri);
+	message = soup_message_new (SOUP_METHOD_PROPFIND, priv->uri);
 	soup_message_headers_append (message->request_headers, "User-Agent", USERAGENT);
 	soup_message_headers_append (message->request_headers, "Connection", "close");
 	soup_message_headers_append(message->request_headers, "Depth", "1");
 	soup_message_set_request(message, "text/xml", SOUP_MEMORY_TEMPORARY,
-			(gchar *) request, strlen(request));
+			(gchar *) request, strlen (request));
 
-	soup_session_send_message(priv->session, message);
+	soup_session_send_message (priv->session, message);
 
 	return message;
 }
@@ -811,7 +811,7 @@ check_addressbook_changed (EBookBackendWebdav *webdav, gchar **new_ctag)
 }
 
 static GError *
-download_contacts(EBookBackendWebdav *webdav, EFlag *running,
+download_contacts (EBookBackendWebdav *webdav, EFlag *running,
                   EDataBookView *book_view)
 {
 	EBookBackendWebdavPrivate *priv = webdav->priv;
@@ -844,36 +844,36 @@ download_contacts(EBookBackendWebdav *webdav, EFlag *running,
 	}
 
 	if (book_view != NULL) {
-		e_data_book_view_notify_status_message(book_view,
+		e_data_book_view_notify_status_message (book_view,
 				"Loading Addressbook summary...");
 	}
 
-	message = send_propfind(webdav);
+	message = send_propfind (webdav);
 	status  = message->status_code;
 
 	if (status == 401 || status == 407) {
-		g_object_unref(message);
+		g_object_unref (message);
 		g_free (new_ctag);
 		return webdav_handle_auth_request (webdav);
 	}
 	if (status != 207) {
-		g_object_unref(message);
+		g_object_unref (message);
 		g_free (new_ctag);
 		return e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, "PROPFIND on webdav failed with HTTP status %d", status);
 	}
 	if (message->response_body == NULL) {
 		g_warning("No response body in webdav PROPFIND result");
-		g_object_unref(message);
+		g_object_unref (message);
 		g_free (new_ctag);
 		return e_data_book_create_error_fmt (E_DATA_BOOK_STATUS_OTHER_ERROR, "No response body in webdav PROPFIND result");
 	}
 
 	/* parse response */
-	reader = xmlReaderForMemory(message->response_body->data,
+	reader = xmlReaderForMemory (message->response_body->data,
 				    message->response_body->length, NULL, NULL,
 				    XML_PARSE_NOWARNING);
 
-	elements = parse_propfind_response(reader);
+	elements = parse_propfind_response (reader);
 
 	/* count contacts */
 	count = 0;
@@ -890,63 +890,63 @@ download_contacts(EBookBackendWebdav *webdav, EFlag *running,
 		gchar *complete_uri;
 
 		/* stop downloading if search was aborted */
-		if (running != NULL && !e_flag_is_set(running))
+		if (running != NULL && !e_flag_is_set (running))
 			break;
 
 		if (book_view != NULL) {
 			gfloat percent = 100.0 / count * i;
 			gchar buf[100];
 			snprintf(buf, sizeof(buf), "Loading Contacts (%d%%)", (gint)percent);
-			e_data_book_view_notify_status_message(book_view, buf);
+			e_data_book_view_notify_status_message (book_view, buf);
 		}
 
 		/* skip collections */
 		uri = (const gchar *) element->href;
-		if (uri[strlen(uri)-1] == '/')
+		if (uri[strlen (uri)-1] == '/')
 			continue;
 
 		/* uri might be relative, construct complete one */
 		if (uri[0] == '/') {
-			SoupURI *soup_uri = soup_uri_new(priv->uri);
-			soup_uri->path    = g_strdup(uri);
+			SoupURI *soup_uri = soup_uri_new (priv->uri);
+			soup_uri->path    = g_strdup (uri);
 
-			complete_uri = soup_uri_to_string(soup_uri, 0);
-			soup_uri_free(soup_uri);
+			complete_uri = soup_uri_to_string (soup_uri, 0);
+			soup_uri_free (soup_uri);
 		} else {
-			complete_uri = g_strdup(uri);
+			complete_uri = g_strdup (uri);
 		}
 
 		etag = (const gchar *) element->etag;
 
-		contact = e_book_backend_cache_get_contact(priv->cache, complete_uri);
+		contact = e_book_backend_cache_get_contact (priv->cache, complete_uri);
 		/* download contact if it is not cached or its ETag changed */
 		if (contact == NULL || etag == NULL ||
-				strcmp(e_contact_get_const(contact, E_CONTACT_REV),etag) != 0) {
-			contact = download_contact(webdav, complete_uri);
+				strcmp (e_contact_get_const (contact, E_CONTACT_REV),etag) != 0) {
+			contact = download_contact (webdav, complete_uri);
 			if (contact != NULL) {
-				e_book_backend_cache_remove_contact(priv->cache, complete_uri);
-				e_book_backend_cache_add_contact(priv->cache, contact);
+				e_book_backend_cache_remove_contact (priv->cache, complete_uri);
+				e_book_backend_cache_add_contact (priv->cache, contact);
 			}
 		}
 
 		if (contact != NULL && book_view != NULL) {
-			e_data_book_view_notify_update(book_view, contact);
+			e_data_book_view_notify_update (book_view, contact);
 		}
 
-		g_free(complete_uri);
+		g_free (complete_uri);
 	}
 
 	/* free element list */
 	for (element = elements; element != NULL; element = next) {
 		next = element->next;
 
-		xmlFree(element->href);
-		xmlFree(element->etag);
-		g_free(element);
+		xmlFree (element->href);
+		xmlFree (element->etag);
+		g_free (element);
 	}
 
-	xmlFreeTextReader(reader);
-	g_object_unref(message);
+	xmlFreeTextReader (reader);
+	g_object_unref (message);
 
 	if (new_ctag) {
 		if (!e_file_cache_replace_object (E_FILE_CACHE (priv->cache), WEBDAV_CTAG_KEY, new_ctag))
@@ -958,18 +958,18 @@ download_contacts(EBookBackendWebdav *webdav, EFlag *running,
 }
 
 static gpointer
-book_view_thread(gpointer data)
+book_view_thread (gpointer data)
 {
 	EDataBookView                          *book_view = data;
-	WebdavBackendSearchClosure             *closure   = get_closure(book_view);
+	WebdavBackendSearchClosure             *closure   = get_closure (book_view);
 	EBookBackendWebdav                     *webdav    = closure->webdav;
 	GError *error;
 
-	e_flag_set(closure->running);
+	e_flag_set (closure->running);
 
 	/* ref the book view because it'll be removed and unrefed when/if
 	 * it's stopped */
-	e_data_book_view_ref(book_view);
+	e_data_book_view_ref (book_view);
 
 	error = download_contacts (webdav, closure->running, book_view);
 
@@ -983,63 +983,63 @@ book_view_thread(gpointer data)
 }
 
 static void
-e_book_backend_webdav_start_book_view(EBookBackend *backend,
+e_book_backend_webdav_start_book_view (EBookBackend *backend,
                                       EDataBookView *book_view)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 
 	if (priv->mode == E_DATA_BOOK_MODE_REMOTE) {
 		WebdavBackendSearchClosure *closure
-			= init_closure(book_view, E_BOOK_BACKEND_WEBDAV(backend));
+			= init_closure (book_view, E_BOOK_BACKEND_WEBDAV (backend));
 
 		closure->thread
-			= g_thread_create(book_view_thread, book_view, TRUE, NULL);
+			= g_thread_create (book_view_thread, book_view, TRUE, NULL);
 
-		e_flag_wait(closure->running);
+		e_flag_wait (closure->running);
 	} else {
-		const gchar *query = e_data_book_view_get_card_query(book_view);
-		GList *contacts = e_book_backend_cache_get_contacts(priv->cache, query);
+		const gchar *query = e_data_book_view_get_card_query (book_view);
+		GList *contacts = e_book_backend_cache_get_contacts (priv->cache, query);
 		GList *l;
 
-		for (l = contacts; l != NULL; l = g_list_next(l)) {
+		for (l = contacts; l != NULL; l = g_list_next (l)) {
 			EContact *contact = l->data;
-			e_data_book_view_notify_update(book_view, contact);
-			g_object_unref(contact);
+			e_data_book_view_notify_update (book_view, contact);
+			g_object_unref (contact);
 		}
-		g_list_free(contacts);
+		g_list_free (contacts);
 		e_data_book_view_notify_complete (book_view, NULL /* Success */);
 	}
 }
 
 static void
-e_book_backend_webdav_stop_book_view(EBookBackend *backend,
+e_book_backend_webdav_stop_book_view (EBookBackend *backend,
                                      EDataBookView *book_view)
 {
-	EBookBackendWebdav         *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav         *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	WebdavBackendSearchClosure *closure;
 	gboolean                    need_join;
 
 	if (webdav->priv->mode == E_DATA_BOOK_MODE_LOCAL)
 		return;
 
-	closure = get_closure(book_view);
+	closure = get_closure (book_view);
 	if (closure == NULL)
 		return;
 
-	need_join = e_flag_is_set(closure->running);
-	e_flag_clear(closure->running);
+	need_join = e_flag_is_set (closure->running);
+	e_flag_clear (closure->running);
 
 	if (need_join) {
-		g_thread_join(closure->thread);
+		g_thread_join (closure->thread);
 	}
 }
 
 static void
-e_book_backend_webdav_get_contact_list(EBookBackend *backend, EDataBook *book,
+e_book_backend_webdav_get_contact_list (EBookBackend *backend, EDataBook *book,
 		guint32 opid, const gchar *query)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 	GList                     *contact_list;
 	GList                     *vcard_list;
@@ -1056,43 +1056,43 @@ e_book_backend_webdav_get_contact_list(EBookBackend *backend, EDataBook *book,
 	}
 
 	/* answer query from cache */
-	contact_list = e_book_backend_cache_get_contacts(priv->cache, query);
+	contact_list = e_book_backend_cache_get_contacts (priv->cache, query);
 	vcard_list   = NULL;
-	for (c = contact_list; c != NULL; c = g_list_next(c)) {
+	for (c = contact_list; c != NULL; c = g_list_next (c)) {
 		EContact *contact = c->data;
 		gchar     *vcard
-			= e_vcard_to_string(E_VCARD(contact), EVC_FORMAT_VCARD_30);
-		vcard_list = g_list_append(vcard_list, vcard);
-		g_object_unref(contact);
+			= e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
+		vcard_list = g_list_append (vcard_list, vcard);
+		g_object_unref (contact);
 	}
-	g_list_free(contact_list);
+	g_list_free (contact_list);
 
 	e_data_book_respond_get_contact_list (book, opid, EDB_ERROR (SUCCESS), vcard_list);
 }
 
 static void
-e_book_backend_webdav_authenticate_user(EBookBackend *backend, EDataBook *book,
+e_book_backend_webdav_authenticate_user (EBookBackend *backend, EDataBook *book,
 		guint32 opid, const gchar *user, const gchar *password,
 		const gchar *auth_method)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 	SoupMessage               *message;
 	guint                      status;
 
-	priv->username = g_strdup(user);
-	priv->password = g_strdup(password);
+	priv->username = g_strdup (user);
+	priv->password = g_strdup (password);
 
 	/* Evolution API requires a direct feedback on the authentication,
 	 * so we send a PROPFIND to test wether user/password is correct */
-	message = send_propfind(webdav);
+	message = send_propfind (webdav);
 	status  = message->status_code;
-	g_object_unref(message);
+	g_object_unref (message);
 
 	if (status == 401 || status == 407) {
-		g_free(priv->username);
+		g_free (priv->username);
 		priv->username = NULL;
-		g_free(priv->password);
+		g_free (priv->password);
 		priv->password = NULL;
 
 		e_data_book_respond_authenticate_user (book, opid, EDB_ERROR (AUTHENTICATION_FAILED));
@@ -1102,7 +1102,7 @@ e_book_backend_webdav_authenticate_user(EBookBackend *backend, EDataBook *book,
 }
 
 static void
-e_book_backend_webdav_get_supported_fields(EBookBackend *backend,
+e_book_backend_webdav_get_supported_fields (EBookBackend *backend,
 		EDataBook *book, guint32 opid)
 {
 	GList *fields = NULL;
@@ -1110,16 +1110,16 @@ e_book_backend_webdav_get_supported_fields(EBookBackend *backend,
 
 	/* we support everything */
 	for (i = 1; i < E_CONTACT_FIELD_LAST; ++i) {
-		fields = g_list_append(fields, g_strdup(e_contact_field_name(i)));
+		fields = g_list_append (fields, g_strdup (e_contact_field_name (i)));
 	}
 
 	e_data_book_respond_get_supported_fields (book, opid, EDB_ERROR (SUCCESS), fields);
-	g_list_foreach(fields, (GFunc) g_free, NULL);
-	g_list_free(fields);
+	g_list_foreach (fields, (GFunc) g_free, NULL);
+	g_list_free (fields);
 }
 
 static void
-e_book_backend_webdav_get_supported_auth_methods(EBookBackend *backend,
+e_book_backend_webdav_get_supported_auth_methods (EBookBackend *backend,
 		EDataBook *book, guint32 opid)
 {
 	GList *auth_methods = NULL;
@@ -1128,26 +1128,26 @@ e_book_backend_webdav_get_supported_auth_methods(EBookBackend *backend,
 
 	e_data_book_respond_get_supported_auth_methods (book, opid, EDB_ERROR (SUCCESS), auth_methods);
 
-	g_list_foreach(auth_methods, (GFunc) g_free, NULL);
-	g_list_free(auth_methods);
+	g_list_foreach (auth_methods, (GFunc) g_free, NULL);
+	g_list_free (auth_methods);
 }
 
 static void
-e_book_backend_webdav_get_required_fields(EBookBackend *backend,
+e_book_backend_webdav_get_required_fields (EBookBackend *backend,
 		EDataBook *book, guint32 opid)
 {
 	GList       *fields = NULL;
 	const gchar *field_name;
 
-	field_name = e_contact_field_name(E_CONTACT_FILE_AS);
-	fields     = g_list_append(fields , g_strdup(field_name));
+	field_name = e_contact_field_name (E_CONTACT_FILE_AS);
+	fields     = g_list_append (fields , g_strdup (field_name));
 
 	e_data_book_respond_get_supported_fields (book, opid, EDB_ERROR (SUCCESS), fields);
 	g_list_free (fields);
 }
 
 /** authentication callback for libsoup */
-static void soup_authenticate(SoupSession *session, SoupMessage *message,
+static void soup_authenticate (SoupSession *session, SoupMessage *message,
                               SoupAuth *auth, gboolean retrying, gpointer data)
 {
 	EBookBackendWebdav        *webdav = data;
@@ -1157,8 +1157,8 @@ static void soup_authenticate(SoupSession *session, SoupMessage *message,
 		return;
 
 	if (priv->username != NULL) {
-		soup_auth_authenticate(auth, g_strdup(priv->username),
-				       g_strdup(priv->password));
+		soup_auth_authenticate (auth, g_strdup (priv->username),
+				       g_strdup (priv->password));
 	}
 }
 
@@ -1180,10 +1180,10 @@ proxy_settings_changed (EProxy *proxy, gpointer user_data)
 }
 
 static void
-e_book_backend_webdav_load_source(EBookBackend *backend,
+e_book_backend_webdav_load_source (EBookBackend *backend,
                                   ESource *source, gboolean only_if_exists, GError **perror)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 	gchar                     *uri;
 	const gchar               *cache_dir;
@@ -1198,7 +1198,7 @@ e_book_backend_webdav_load_source(EBookBackend *backend,
 
 	cache_dir = e_book_backend_get_cache_dir (backend);
 
-	uri = e_source_get_uri(source);
+	uri = e_source_get_uri (source);
 	if (uri == NULL) {
 		g_propagate_error (perror, EDB_ERROR_EX (OTHER_ERROR, "No uri given for addressbook"));
 		return;
@@ -1271,7 +1271,7 @@ e_book_backend_webdav_load_source(EBookBackend *backend,
 	priv->cache = e_book_backend_cache_new (filename);
 	g_free (filename);
 
-	session = soup_session_sync_new();
+	session = soup_session_sync_new ();
 	g_signal_connect(session, "authenticate", G_CALLBACK(soup_authenticate),
 			 webdav);
 
@@ -1282,47 +1282,47 @@ e_book_backend_webdav_load_source(EBookBackend *backend,
 	proxy_settings_changed (priv->proxy, priv);
 	webdav_debug_setup (priv->session);
 
-	e_book_backend_notify_auth_required(backend);
-	e_book_backend_set_is_loaded(backend, TRUE);
-	e_book_backend_notify_connection_status(backend, TRUE);
-	e_book_backend_set_is_writable(backend, TRUE);
-	e_book_backend_notify_writable(backend, TRUE);
+	e_book_backend_notify_auth_required (backend);
+	e_book_backend_set_is_loaded (backend, TRUE);
+	e_book_backend_notify_connection_status (backend, TRUE);
+	e_book_backend_set_is_writable (backend, TRUE);
+	e_book_backend_notify_writable (backend, TRUE);
 
 	soup_uri_free (suri);
 }
 
 static void
-e_book_backend_webdav_remove(EBookBackend *backend,	EDataBook *book,
+e_book_backend_webdav_remove (EBookBackend *backend,	EDataBook *book,
 		guint32 opid)
 {
 	e_data_book_respond_remove (book, opid, EDB_ERROR (SUCCESS));
 }
 
 static void
-e_book_backend_webdav_set_mode(EBookBackend *backend,
+e_book_backend_webdav_set_mode (EBookBackend *backend,
                                EDataBookMode mode)
 {
-	EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV(backend);
+	EBookBackendWebdav *webdav = E_BOOK_BACKEND_WEBDAV (backend);
 
 	webdav->priv->mode = mode;
 
 	/* set_mode is called before the backend is loaded */
-	if (!e_book_backend_is_loaded(backend))
+	if (!e_book_backend_is_loaded (backend))
 		return;
 
 	if (mode == E_DATA_BOOK_MODE_LOCAL) {
-		e_book_backend_set_is_writable(backend, FALSE);
-		e_book_backend_notify_writable(backend, FALSE);
-		e_book_backend_notify_connection_status(backend, FALSE);
+		e_book_backend_set_is_writable (backend, FALSE);
+		e_book_backend_notify_writable (backend, FALSE);
+		e_book_backend_notify_connection_status (backend, FALSE);
 	} else if (mode == E_DATA_BOOK_MODE_REMOTE) {
-		e_book_backend_set_is_writable(backend, TRUE);
-		e_book_backend_notify_writable(backend, TRUE);
-		e_book_backend_notify_connection_status(backend, TRUE);
+		e_book_backend_set_is_writable (backend, TRUE);
+		e_book_backend_notify_writable (backend, TRUE);
+		e_book_backend_notify_connection_status (backend, TRUE);
 	}
 }
 
 static gchar *
-e_book_backend_webdav_get_static_capabilities(EBookBackend *backend)
+e_book_backend_webdav_get_static_capabilities (EBookBackend *backend)
 {
 	return g_strdup("net,do-initial-query,contact-lists");
 }
@@ -1334,36 +1334,36 @@ e_book_backend_webdav_cancel_operation (EBookBackend *backend, EDataBook *book,
 }
 
 EBookBackend *
-e_book_backend_webdav_new(void)
+e_book_backend_webdav_new (void)
 {
 	return g_object_new (E_TYPE_BOOK_BACKEND_WEBDAV, NULL);
 }
 
 static void
-e_book_backend_webdav_dispose(GObject *object)
+e_book_backend_webdav_dispose (GObject *object)
 {
-	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV(object);
+	EBookBackendWebdav        *webdav = E_BOOK_BACKEND_WEBDAV (object);
 	EBookBackendWebdavPrivate *priv   = webdav->priv;
 
-	g_object_unref(priv->session);
+	g_object_unref (priv->session);
 	g_object_unref (priv->proxy);
-	g_object_unref(priv->cache);
-	g_free(priv->uri);
-	g_free(priv->username);
-	g_free(priv->password);
+	g_object_unref (priv->cache);
+	g_free (priv->uri);
+	g_free (priv->username);
+	g_free (priv->password);
 
-	G_OBJECT_CLASS(parent_class)->dispose(object);
+	G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 static void
-e_book_backend_webdav_class_init(EBookBackendWebdavClass *klass)
+e_book_backend_webdav_class_init (EBookBackendWebdavClass *klass)
 {
-	GObjectClass      *object_class = G_OBJECT_CLASS(klass);
+	GObjectClass      *object_class = G_OBJECT_CLASS (klass);
 	EBookBackendClass *backend_class;
 
-	parent_class = g_type_class_peek_parent(klass);
+	parent_class = g_type_class_peek_parent (klass);
 
-	backend_class = E_BOOK_BACKEND_CLASS(klass);
+	backend_class = E_BOOK_BACKEND_CLASS (klass);
 
 	/* Set the virtual methods. */
 	backend_class->load_source                = e_book_backend_webdav_load_source;
@@ -1386,13 +1386,13 @@ e_book_backend_webdav_class_init(EBookBackendWebdavClass *klass)
 
 	object_class->dispose                     = e_book_backend_webdav_dispose;
 
-	g_type_class_add_private(object_class, sizeof(EBookBackendWebdavPrivate));
+	g_type_class_add_private (object_class, sizeof (EBookBackendWebdavPrivate));
 }
 
 static void
-e_book_backend_webdav_init(EBookBackendWebdav *backend)
+e_book_backend_webdav_init (EBookBackendWebdav *backend)
 {
-	backend->priv = G_TYPE_INSTANCE_GET_PRIVATE(backend,
+	backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (backend,
 			E_TYPE_BOOK_BACKEND_WEBDAV, EBookBackendWebdavPrivate);
 }
 
diff --git a/addressbook/libebook/e-address-western.c b/addressbook/libebook/e-address-western.c
index 2c23f2c..5cc10cd 100644
--- a/addressbook/libebook/e-address-western.c
+++ b/addressbook/libebook/e-address-western.c
@@ -31,7 +31,7 @@ e_address_western_is_line_blank (gchar *line)
 
 	/* A blank line consists of whitespace only, or a NULL line. */
 	for (cntr = 0; line[cntr] != '\0'; cntr++ ) {
-		if (!isspace(line[cntr])) {
+		if (!isspace (line[cntr])) {
 			blank = FALSE;
 			break;
 		}
@@ -96,8 +96,8 @@ e_address_western_is_po_box (gchar *line)
 	state = FIRSTCHAR;
 	for (cntr = 0; line[cntr] != '\0'; cntr++) {
 		if (state == FIRSTCHAR)	{
-			if (isalnum(line[cntr])) {
-				if (tolower(line[cntr]) == 'p')
+			if (isalnum (line[cntr])) {
+				if (tolower (line[cntr]) == 'p')
 					state = SECONDCHAR;
 				else {
 					retval = FALSE;
@@ -107,7 +107,7 @@ e_address_western_is_po_box (gchar *line)
 		}
 		else if (state == SECONDCHAR) {
 			if (isalnum (line[cntr])) {
-				if (tolower(line[cntr]) == 'o')
+				if (tolower (line[cntr]) == 'o')
 					state = WHITESPACE;
 				else {
 					retval = FALSE;
@@ -148,20 +148,20 @@ e_address_western_is_postal (gchar *line)
 		 a letter. */
 		index = strcspn (line, ",");
 		index++;
-		while (isspace(line[index]))
+		while (isspace (line[index]))
 			index++;
 
 		if (!isalpha (line[index]))
 			return FALSE;   /* FIXME: ugly control flow. */
 
-		cntr = strlen(line) - 1;
+		cntr = strlen (line) - 1;
 
 		/* Go to the character immediately following the last
 		  whitespace character. */
-		while (cntr >= 0 && isspace(line[cntr]))
+		while (cntr >= 0 && isspace (line[cntr]))
 			cntr--;
 
-		while (cntr >= 0 && !isspace(line[cntr]))
+		while (cntr >= 0 && !isspace (line[cntr]))
 			cntr--;
 
 		if (cntr == 0)
@@ -186,10 +186,10 @@ e_address_western_extract_po_box (gchar *line)
 	gint index;
 
 	index = 0;
-	while (!isdigit(line[index]))
+	while (!isdigit (line[index]))
 		index++;
 
-	while (isgraph(line[index]))
+	while (isgraph (line[index]))
 		index++;
 
 	return g_strndup (line, index);
@@ -219,10 +219,10 @@ e_address_western_extract_region (gchar *line)
 
 	start = strcspn (line, ",");
 	start++;
-	while (isspace(line[start]))
+	while (isspace (line[start]))
 		start++;
 
-	end = strlen(line) - 1;
+	end = strlen (line) - 1;
 	while (isspace (line[end]))
 		end--;
 
@@ -250,13 +250,13 @@ e_address_western_extract_postal_code (gchar *line)
 	gint start, end;
 
 	end = strlen (line) - 1;
-	while (isspace(line[end]))
+	while (isspace (line[end]))
 		end--;
 
 	start = end;
 	end++;
 
-	while (!isspace(line[start]))
+	while (!isspace (line[start]))
 		start--;
 	start++;
 
@@ -310,7 +310,7 @@ e_address_western_parse (const gchar *in_address)
 	if (in_address == NULL)
 		return NULL;
 
-	eaw = (EAddressWestern *)g_malloc (sizeof(EAddressWestern));
+	eaw = (EAddressWestern *)g_malloc (sizeof (EAddressWestern));
 	eaw->po_box = NULL;
 	eaw->extended = NULL;
 	eaw->street = NULL;
@@ -335,7 +335,7 @@ e_address_western_parse (const gchar *in_address)
 	}
 
 	/* ... tally them. */
-	lines = (gchar **)g_malloc (sizeof(gchar *) * (linecntr+3));
+	lines = (gchar **)g_malloc (sizeof (gchar *) * (linecntr+3));
 	lineindex = 0;
 	lines[0] = &address[0];
 	linecntr = 1;
@@ -424,19 +424,19 @@ e_address_western_free (EAddressWestern *eaw)
 		return;
 
 	if (eaw->po_box != NULL)
-		g_free(eaw->po_box);
+		g_free (eaw->po_box);
 	if (eaw->extended != NULL)
-		g_free(eaw->extended);
+		g_free (eaw->extended);
 	if (eaw->street != NULL)
-		g_free(eaw->street);
+		g_free (eaw->street);
 	if (eaw->locality != NULL)
-		g_free(eaw->locality);
+		g_free (eaw->locality);
 	if (eaw->region != NULL)
-		g_free(eaw->region);
+		g_free (eaw->region);
 	if (eaw->postal_code != NULL)
-		g_free(eaw->postal_code);
+		g_free (eaw->postal_code);
 	if (eaw->country != NULL)
-		g_free(eaw->country);
+		g_free (eaw->country);
 
 	g_free (eaw);
 }
diff --git a/addressbook/libebook/e-book-query.c b/addressbook/libebook/e-book-query.c
index d57c858..a3b3747 100644
--- a/addressbook/libebook/e-book-query.c
+++ b/addressbook/libebook/e-book-query.c
@@ -349,7 +349,7 @@ e_book_query_ref (EBookQuery *q)
 }
 
 static ESExpResult *
-func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_and (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -358,7 +358,7 @@ func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 	if (argc > 0) {
 		gint i;
 
-		qs = g_new0(EBookQuery*, argc);
+		qs = g_new0 (EBookQuery*, argc);
 
 		for (i = 0; i < argc; i++) {
 			GList *list_head = *list;
@@ -374,14 +374,14 @@ func_and(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		g_free (qs);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_or (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -390,7 +390,7 @@ func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 	if (argc > 0) {
 		gint i;
 
-		qs = g_new0(EBookQuery*, argc);
+		qs = g_new0 (EBookQuery*, argc);
 
 		for (i = 0; i < argc; i++) {
 			GList *list_head = *list;
@@ -406,14 +406,14 @@ func_or(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		g_free (qs);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -424,14 +424,14 @@ func_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 		(*list)->data = e_book_query_not (term, TRUE);
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -459,14 +459,14 @@ func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -488,14 +488,14 @@ func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 										str));
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -517,14 +517,14 @@ func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointe
 										str));
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -546,14 +546,14 @@ func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 										str));
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
 }
 
 static ESExpResult *
-func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	GList **list = data;
 	ESExpResult *r;
@@ -569,7 +569,7 @@ func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 			*list = g_list_prepend (*list, e_book_query_vcard_field_exists (propname));
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = FALSE;
 
 	return r;
@@ -609,24 +609,24 @@ e_book_query_from_string  (const gchar *query_string)
 	GList *list = NULL;
 	gint i;
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, &list);
 		} else {
-			e_sexp_add_function(sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp, 0, symbols[i].name,
 					    symbols[i].func, &list);
 		}
 	}
 
-	e_sexp_input_text(sexp, query_string, strlen(query_string));
-	e_sexp_parse(sexp);
+	e_sexp_input_text (sexp, query_string, strlen (query_string));
+	e_sexp_parse (sexp);
 
-	r = e_sexp_eval(sexp);
+	r = e_sexp_eval (sexp);
 
-	e_sexp_result_free(sexp, r);
+	e_sexp_result_free (sexp, r);
 	e_sexp_unref (sexp);
 
 	if (list) {
@@ -704,7 +704,7 @@ e_book_query_to_string    (EBookQuery *q)
 		case E_BOOK_QUERY_BEGINS_WITH: cs = "beginswith"; break;
 		case E_BOOK_QUERY_ENDS_WITH: cs = "endswith"; break;
 		default:
-			g_assert_not_reached();
+			g_assert_not_reached ();
 			break;
 		}
 
diff --git a/addressbook/libebook/e-book-view.c b/addressbook/libebook/e-book-view.c
index 2d1bab4..5b11620 100644
--- a/addressbook/libebook/e-book-view.c
+++ b/addressbook/libebook/e-book-view.c
@@ -28,7 +28,7 @@
 #include "libedata-book/e-data-book-types.h"
 #include "e-gdbus-egdbusbookview.h"
 
-G_DEFINE_TYPE(EBookView, e_book_view, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EBookView, e_book_view, G_TYPE_OBJECT);
 
 #define E_BOOK_VIEW_GET_PRIVATE(o)					\
 	(G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_BOOK_VIEW, EBookViewPrivate))
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index fa8fa8d..3d2d96e 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -49,12 +49,12 @@
 
 #define E_DATA_BOOK_FACTORY_SERVICE_NAME "org.gnome.evolution.dataserver.AddressBook"
 
-static gchar ** flatten_stringlist(GList *list);
+static gchar ** flatten_stringlist (GList *list);
 static GList *array_to_stringlist (gchar **list);
 static EList *array_to_elist (gchar **list);
 static gboolean unwrap_gerror (GError *error, GError **client_error);
 
-G_DEFINE_TYPE(EBook, e_book, G_TYPE_OBJECT)
+G_DEFINE_TYPE (EBook, e_book, G_TYPE_OBJECT)
 #define E_BOOK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_BOOK, EBookPrivate))
 
 enum {
@@ -2849,7 +2849,7 @@ e_book_get_self (EContact **contact, EBook **book, GError **error)
 		return FALSE;
 	}
 
-	gconf = gconf_client_get_default();
+	gconf = gconf_client_get_default ();
 	uid = gconf_client_get_string (gconf, SELF_UID_KEY, NULL);
 	g_object_unref (gconf);
 
@@ -2899,7 +2899,7 @@ e_book_set_self (EBook *book, EContact *contact, GError **error)
 	e_return_error_if_fail (E_IS_BOOK (book), E_BOOK_ERROR_INVALID_ARG);
 	e_return_error_if_fail (E_IS_CONTACT (contact), E_BOOK_ERROR_INVALID_ARG);
 
-	gconf = gconf_client_get_default();
+	gconf = gconf_client_get_default ();
 	gconf_client_set_string (gconf, SELF_UID_KEY, e_contact_get_const (contact, E_CONTACT_UID), NULL);
 	g_object_unref (gconf);
 
@@ -2925,7 +2925,7 @@ e_book_is_self (EContact *contact)
 	   need a GError** arg for that */
 	g_return_val_if_fail (contact && E_IS_CONTACT (contact), FALSE);
 
-	gconf = gconf_client_get_default();
+	gconf = gconf_client_get_default ();
 	uid = gconf_client_get_string (gconf, SELF_UID_KEY, NULL);
 	g_object_unref (gconf);
 
@@ -3041,7 +3041,7 @@ e_book_get_addressbooks (ESourceList **addressbook_sources, GError **error)
 
 	e_return_error_if_fail (addressbook_sources, E_BOOK_ERROR_INVALID_ARG);
 
-	gconf = gconf_client_get_default();
+	gconf = gconf_client_get_default ();
 	*addressbook_sources = e_source_list_new_for_gconf (gconf, "/apps/evolution/addressbook/sources");
 	g_object_unref (gconf);
 
@@ -3461,7 +3461,7 @@ array_to_stringlist (gchar **list)
 	while (*i != NULL) {
 		l = g_list_prepend (l, g_strdup (*i++));
 	}
-	return g_list_reverse(l);
+	return g_list_reverse (l);
 }
 
 static EList *
diff --git a/addressbook/libebook/e-contact.c b/addressbook/libebook/e-contact.c
index d3a74b2..b1fc2bc 100644
--- a/addressbook/libebook/e-contact.c
+++ b/addressbook/libebook/e-contact.c
@@ -323,7 +323,7 @@ e_contact_class_init (EContactClass *klass)
 	GObjectClass *object_class;
 	gint i;
 
-	object_class = G_OBJECT_CLASS(klass);
+	object_class = G_OBJECT_CLASS (klass);
 
 	parent_class = g_type_class_ref (E_TYPE_VCARD);
 
@@ -355,7 +355,7 @@ e_contact_class_init (EContactClass *klass)
 			pspec = g_param_spec_boxed (field_info[i].field_name,
 						    _(field_info[i].pretty_name),
 						    field_info[i].pretty_name,
-						    field_info[i].boxed_type_getter(),
+						    field_info[i].boxed_type_getter (),
 						     (field_info[i].read_only ? G_PARAM_READABLE : G_PARAM_READWRITE)
 						     | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB);
 		else
@@ -1494,7 +1494,7 @@ e_contact_get (EContact *contact, EContactField field_id)
 			rv = info->struct_getter (contact, attr);
 
 		if (info->t & E_CONTACT_FIELD_TYPE_STRUCT)
-			return (gpointer)info->boxed_type_getter();
+			return (gpointer)info->boxed_type_getter ();
 		else if (!rv)
 			return NULL;
 		else
@@ -1661,7 +1661,7 @@ e_contact_get_attributes (EContact *contact, EContactField field_id)
 		}
 	}
 
-	return g_list_reverse(l);
+	return g_list_reverse (l);
 }
 
 /**
@@ -1713,7 +1713,7 @@ e_contact_name_new (void)
  * Returns: The string representation of @name.
  **/
 gchar *
-e_contact_name_to_string(const EContactName *name)
+e_contact_name_to_string (const EContactName *name)
 {
 	gchar *strings[6], **stringptr = strings;
 
@@ -1744,7 +1744,7 @@ e_contact_name_to_string(const EContactName *name)
 EContactName*
 e_contact_name_from_string (const gchar *name_str)
 {
-	EContactName *name = e_contact_name_new();
+	EContactName *name = e_contact_name_new ();
 	ENameWestern *western;
 
 	g_return_val_if_fail (name_str != NULL, NULL);
@@ -1757,7 +1757,7 @@ e_contact_name_from_string (const gchar *name_str)
 	name->family     = g_strdup (western->last  );
 	name->suffixes   = g_strdup (western->suffix);
 
-	e_name_western_free(western);
+	e_name_western_free (western);
 
 	return name;
 }
@@ -1777,7 +1777,7 @@ e_contact_name_copy (EContactName *n)
 
 	g_return_val_if_fail (n != NULL, NULL);
 
-	name = e_contact_name_new();
+	name = e_contact_name_new ();
 
 	name->prefixes   = g_strdup (n->prefixes);
 	name->given      = g_strdup (n->given);
@@ -1847,12 +1847,12 @@ e_contact_date_from_string (const gchar *str)
 
 	g_return_val_if_fail (str != NULL, NULL);
 
-	date = e_contact_date_new();
+	date = e_contact_date_new ();
 	/* ignore time part */
 	if ((t = strchr (str, 'T')) != NULL)
 		length = t - str;
 	else
-		length = strlen(str);
+		length = strlen (str);
 
 	if (length == 10 ) {
 		date->year = str[0] * 1000 + str[1] * 100 + str[2] * 10 + str[3] - '0' * 1111;
@@ -1881,9 +1881,9 @@ e_contact_date_to_string (EContactDate *dt)
 {
 	if (dt)
 		return g_strdup_printf ("%04d-%02d-%02d",
-					CLAMP(dt->year, 1000, 9999),
-					CLAMP(dt->month, 1, 12),
-					CLAMP(dt->day, 1, 31));
+					CLAMP (dt->year, 1000, 9999),
+					CLAMP (dt->month, 1, 12),
+					CLAMP (dt->day, 1, 31));
 	else
 		return NULL;
 }
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index b6f6c4a..06190c1 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -96,8 +96,8 @@ static GObjectClass *parent_class;
 static gint
 utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
 {
-	gchar *s1 = g_utf8_casefold(str1, len);
-	gchar *s2 = g_utf8_casefold(str2, len);
+	gchar *s1 = g_utf8_casefold (str1, len);
+	gchar *s2 = g_utf8_casefold (str2, len);
 	gint rv;
 
 	rv = g_utf8_collate (s1, s2);
@@ -211,7 +211,7 @@ e_destination_copy (const EDestination *dest)
 	}
 
 	/* XXX other settings? */
-        new_dest->priv->raw = g_strdup(dest->priv->raw);
+        new_dest->priv->raw = g_strdup (dest->priv->raw);
 
 	return new_dest;
 }
diff --git a/addressbook/libebook/e-error.h b/addressbook/libebook/e-error.h
index 0a4d453..1b02dcd 100644
--- a/addressbook/libebook/e-error.h
+++ b/addressbook/libebook/e-error.h
@@ -6,7 +6,7 @@
  * Since: 2.30
  **/
 #define e_return_error_if_fail(expr,error_code)	G_STMT_START{		\
-     if G_LIKELY(expr) { } else						\
+     if G_LIKELY (expr) { } else						\
        {								\
 	 g_log (G_LOG_DOMAIN,						\
 		G_LOG_LEVEL_CRITICAL,					\
diff --git a/addressbook/libebook/e-name-western.c b/addressbook/libebook/e-name-western.c
index 5d7c31a..3611541 100644
--- a/addressbook/libebook/e-name-western.c
+++ b/addressbook/libebook/e-name-western.c
@@ -54,17 +54,17 @@ e_name_western_cleanup_string (gchar **str)
 
 	/* skip any spaces and commas at the start of the string */
 	p = *str;
-	while (g_unichar_isspace (g_utf8_get_char(p)) || *p == ',')
+	while (g_unichar_isspace (g_utf8_get_char (p)) || *p == ',')
 		p = g_utf8_next_char (p);
 
 	/* make the copy we're going to return */
 	newstr = g_strdup (p);
 
-	if ( strlen(newstr) > 0) {
+	if ( strlen (newstr) > 0) {
 		/* now search from the back, skipping over any spaces and commas */
 		p = newstr + strlen (newstr);
 		p = g_utf8_prev_char (p);
-		while (g_unichar_isspace (g_utf8_get_char(p)) || *p == ',')
+		while (g_unichar_isspace (g_utf8_get_char (p)) || *p == ',')
 			p = g_utf8_prev_char (p);
 		/* advance p to after the character that caused us to exit the
 		   previous loop, and end the string. */
diff --git a/addressbook/libebook/e-vcard.c b/addressbook/libebook/e-vcard.c
index d6719a9..8fa79c3 100644
--- a/addressbook/libebook/e-vcard.c
+++ b/addressbook/libebook/e-vcard.c
@@ -89,7 +89,7 @@ e_vcard_class_init (EVCardClass *klass)
 {
 	GObjectClass *object_class;
 
-	object_class = G_OBJECT_CLASS(klass);
+	object_class = G_OBJECT_CLASS (klass);
 
 	parent_class = g_type_class_ref (G_TYPE_OBJECT);
 
@@ -205,15 +205,15 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
 
 	/* read in the value */
 	str = g_string_new ("");
-	for (lp =  skip_newline( *p, quoted_printable);
+	for (lp =  skip_newline ( *p, quoted_printable);
 	     *lp != '\n' && *lp != '\r' && *lp != '\0';
-	     lp = skip_newline( lp, quoted_printable ) ) {
+	     lp = skip_newline ( lp, quoted_printable ) ) {
 
 		if (*lp == '=' && quoted_printable) {
 			gchar a, b;
 			if ((a = *(++lp)) == '\0') break;
 			if ((b = *(++lp)) == '\0') break;
-			if (isxdigit(a) && isxdigit (b)) {
+			if (isxdigit (a) && isxdigit (b)) {
 				gchar c;
 
 				a = tolower (a);
@@ -235,7 +235,7 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
 		} else if (*lp == '\\') {
 			/* convert back to the non-escaped version of
 			   the characters */
-			lp = g_utf8_next_char(lp);
+			lp = g_utf8_next_char (lp);
 			if (*lp == '\0') {
 				g_string_append_c (str, '\\');
 				break;
@@ -257,10 +257,10 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
 			default:
 				g_warning ("invalid escape, passing it through");
 				g_string_append_c (str, '\\');
-				g_string_append_unichar (str, g_utf8_get_char(lp));
+				g_string_append_unichar (str, g_utf8_get_char (lp));
 				break;
 			}
-			lp = g_utf8_next_char(lp);
+			lp = g_utf8_next_char (lp);
 		}
 		else if ((*lp == ';') ||
 			 (*lp == ',' && !g_ascii_strcasecmp (attr->name, "CATEGORIES"))) {
@@ -276,11 +276,11 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
 
 			e_vcard_attribute_add_value (attr, str->str);
 			g_string_assign (str, "");
-			lp = g_utf8_next_char(lp);
+			lp = g_utf8_next_char (lp);
 		}
 		else {
 			g_string_append_unichar (str, g_utf8_get_char (lp));
-			lp = g_utf8_next_char(lp);
+			lp = g_utf8_next_char (lp);
 		}
 	}
 	if (str) {
@@ -298,7 +298,7 @@ read_attribute_value (EVCardAttribute *attr, gchar **p, gboolean quoted_printabl
 		g_string_free (str, TRUE);
 	}
 
-	skip_to_next_line( &lp );
+	skip_to_next_line ( &lp );
 
 	*p = lp;
 }
@@ -312,9 +312,9 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
 	gboolean in_quote = FALSE;
 
 	str = g_string_new ("");
-	for (lp =  skip_newline( *p, *quoted_printable);
+	for (lp =  skip_newline ( *p, *quoted_printable);
 	     *lp != '\n' && *lp != '\r' && *lp != '\0';
-	     lp = skip_newline( lp, *quoted_printable ) ) {
+	     lp = skip_newline ( lp, *quoted_printable ) ) {
 
 		if (*lp == '"') {
 			in_quote = !in_quote;
@@ -345,7 +345,7 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
 					/* do nothing */
 
 				} else {
-					skip_to_next_line( &lp );
+					skip_to_next_line ( &lp );
 					break;
 				}
 			}
@@ -449,7 +449,7 @@ read_attribute_params (EVCardAttribute *attr, gchar **p, gboolean *quoted_printa
 			g_string_assign (str, "");
 			/*			skip_until (&lp, ":;"); */
 
-			skip_to_next_line( &lp );
+			skip_to_next_line ( &lp );
 		}
 	}
 
@@ -474,9 +474,9 @@ read_attribute (gchar **p)
 
 	/* first read in the group/name */
 	str = g_string_new ("");
-	for (lp =  skip_newline( *p, is_qp);
+	for (lp =  skip_newline ( *p, is_qp);
 	     *lp != '\n' && *lp != '\r' && *lp != '\0';
-	     lp = skip_newline( lp, is_qp ) ) {
+	     lp = skip_newline ( lp, is_qp ) ) {
 
 		if (*lp == ':' || *lp == ';') {
 			if (str->len != 0) {
@@ -494,7 +494,7 @@ read_attribute (gchar **p)
 				 */
 				g_string_free (str, TRUE);
 				*p = lp;
-				skip_to_next_line(p);
+				skip_to_next_line (p);
 				goto lose;
 			}
 		}
@@ -517,11 +517,11 @@ read_attribute (gchar **p)
 			g_warning ("invalid character found in attribute group/name");
 			g_string_free (str, TRUE);
 			*p = lp;
-			skip_to_next_line(p);
+			skip_to_next_line (p);
 			goto lose;
 		}
 
-		lp = g_utf8_next_char(lp);
+		lp = g_utf8_next_char (lp);
 	}
 
 	if (!attr_name) {
@@ -535,14 +535,14 @@ read_attribute (gchar **p)
 
 	if (*lp == ';') {
 		/* skip past the ';' */
-		lp = g_utf8_next_char(lp);
+		lp = g_utf8_next_char (lp);
 		read_attribute_params (attr, &lp, &is_qp, &charset);
 		if (is_qp)
 			attr->encoding = EVC_ENCODING_RAW;
 	}
 	if (*lp == ':') {
 		/* skip past the ':' */
-		lp = g_utf8_next_char(lp);
+		lp = g_utf8_next_char (lp);
 		read_attribute_value (attr, &lp, is_qp, charset);
 	}
 
@@ -612,9 +612,9 @@ parse (EVCard *evc, const gchar *str)
 	buf = make_valid_utf8 (str);
 
 	d(printf ("BEFORE FOLDING:\n"));
-	d(printf (str));
+	d (printf (str));
 	d(printf ("\n\nAFTER FOLDING:\n"));
-	d(printf (buf));
+	d (printf (buf));
 
 	p = buf;
 
@@ -733,7 +733,7 @@ e_vcard_unescape_string (const gchar *s)
 			default:
 				g_warning ("invalid escape, passing it through");
 				g_string_append_c (str, '\\');
-				g_string_append_unichar (str, g_utf8_get_char(p));
+				g_string_append_unichar (str, g_utf8_get_char (p));
 				break;
 			}
 		}
@@ -1423,7 +1423,7 @@ e_vcard_attribute_remove_param (EVCardAttribute *attr, const gchar *param_name)
 		if (g_ascii_strcasecmp (e_vcard_attribute_param_get_name (param),
 					param_name) == 0) {
 			attr->params = g_list_delete_link (attr->params, l);
-			e_vcard_attribute_param_free(param);
+			e_vcard_attribute_param_free (param);
 			break;
 		}
 	}
diff --git a/addressbook/libebook/e-vcard.h b/addressbook/libebook/e-vcard.h
index 4defa67..06eb837 100644
--- a/addressbook/libebook/e-vcard.h
+++ b/addressbook/libebook/e-vcard.h
@@ -169,7 +169,7 @@ void             e_vcard_remove_attributes           (EVCard *evc, const gchar *
 void             e_vcard_remove_attribute            (EVCard *evc, EVCardAttribute *attr);
 void             e_vcard_append_attribute            (EVCard *evc, EVCardAttribute *attr);
 void             e_vcard_append_attribute_with_value (EVCard *evcard, EVCardAttribute *attr, const gchar *value);
-void             e_vcard_append_attribute_with_values(EVCard *evcard, EVCardAttribute *attr, ...);
+void             e_vcard_append_attribute_with_values (EVCard *evcard, EVCardAttribute *attr, ...);
 void             e_vcard_add_attribute               (EVCard *evc, EVCardAttribute *attr);
 void             e_vcard_add_attribute_with_value    (EVCard *evcard, EVCardAttribute *attr, const gchar *value);
 void             e_vcard_add_attribute_with_values   (EVCard *evcard, EVCardAttribute *attr, ...);
diff --git a/addressbook/libedata-book/e-book-backend-cache.c b/addressbook/libedata-book/e-book-backend-cache.c
index f7fd2dd..857c6d3 100644
--- a/addressbook/libedata-book/e-book-backend-cache.c
+++ b/addressbook/libedata-book/e-book-backend-cache.c
@@ -121,7 +121,7 @@ e_book_backend_cache_add_contact (EBookBackendCache *cache,
 	priv = cache->priv;
 
 	uid = e_contact_get_const (contact, E_CONTACT_UID);
-	vcard_str = e_vcard_to_string (E_VCARD(contact), EVC_FORMAT_VCARD_30);
+	vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
 
 	if (e_file_cache_get_object (E_FILE_CACHE (cache), uid))
 		retval = e_file_cache_replace_object (E_FILE_CACHE (cache), uid, vcard_str);
@@ -226,7 +226,7 @@ e_book_backend_cache_get_contacts (EBookBackendCache *cache, const gchar *query)
                 if (vcard_str && !strncmp (vcard_str, "BEGIN:VCARD", 11)) {
                         contact = e_contact_new_from_vcard (vcard_str);
 			uid = e_contact_get_const (contact, E_CONTACT_UID);
-                        if (contact && uid && *uid &&(query && e_book_backend_sexp_match_contact(sexp, contact)))
+                        if (contact && uid && *uid &&(query && e_book_backend_sexp_match_contact (sexp, contact)))
 				list = g_list_prepend (list, contact);
 			else
 				g_object_unref (contact);
diff --git a/addressbook/libedata-book/e-book-backend-cache.h b/addressbook/libedata-book/e-book-backend-cache.h
index 83daa26..a2e82d6 100644
--- a/addressbook/libedata-book/e-book-backend-cache.h
+++ b/addressbook/libedata-book/e-book-backend-cache.h
@@ -63,9 +63,9 @@ struct _EBookBackendCacheClass {
 GType		e_book_backend_cache_get_type	(void);
 EBookBackendCache *
 		e_book_backend_cache_new	(const gchar *filename);
-EContact *	e_book_backend_cache_get_contact(EBookBackendCache *cache,
+EContact *	e_book_backend_cache_get_contact (EBookBackendCache *cache,
 						 const gchar *uid);
-gboolean	e_book_backend_cache_add_contact(EBookBackendCache *cache,
+gboolean	e_book_backend_cache_add_contact (EBookBackendCache *cache,
 						 EContact *contact);
 gboolean	e_book_backend_cache_remove_contact
 						(EBookBackendCache *cache,
diff --git a/addressbook/libedata-book/e-book-backend-db-cache.c b/addressbook/libedata-book/e-book-backend-db-cache.c
index ee02c4f..fa22c87 100644
--- a/addressbook/libedata-book/e-book-backend-db-cache.c
+++ b/addressbook/libedata-book/e-book-backend-db-cache.c
@@ -30,11 +30,11 @@
 #include "e-book-backend-sexp.h"
 
 void
-string_to_dbt(const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str, DBT *dbt)
 {
-	memset(dbt, 0, sizeof(dbt));
+	memset (dbt, 0, sizeof (dbt));
 	dbt->data = (gpointer)str;
-	dbt->size = strlen(str) + 1;
+	dbt->size = strlen (str) + 1;
 	dbt->flags = DB_DBT_USERMEM;
 }
 
@@ -67,7 +67,7 @@ get_filename_from_uri (const gchar *uri)
  **/
 
 void
-e_book_backend_db_cache_set_filename(DB *db, const gchar *filename)
+e_book_backend_db_cache_set_filename (DB *db, const gchar *filename)
 {
 	DBT uid_dbt, vcard_dbt;
 	gint db_error;
@@ -90,14 +90,14 @@ e_book_backend_db_cache_set_filename(DB *db, const gchar *filename)
  **/
 
 gchar *
-e_book_backend_db_cache_get_filename(DB *db)
+e_book_backend_db_cache_get_filename (DB *db)
 {
 	DBT  uid_dbt, vcard_dbt;
 	gint db_error;
 	gchar *filename;
 
 	string_to_dbt ("filename", &uid_dbt);
-	memset (&vcard_dbt, 0 , sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0 , sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
@@ -133,7 +133,7 @@ e_book_backend_db_cache_get_contact (DB *db, const gchar *uid)
 	g_return_val_if_fail (uid != NULL, NULL);
 
 	string_to_dbt (uid, &uid_dbt);
-	memset (&vcard_dbt, 0 , sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0 , sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt,0);
@@ -175,7 +175,7 @@ e_book_backend_db_cache_add_contact (DB *db,
 	}
 	string_to_dbt (uid, &uid_dbt);
 
-	vcard_str = e_vcard_to_string (E_VCARD(contact), EVC_FORMAT_VCARD_30);
+	vcard_str = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
 	string_to_dbt (vcard_str, &vcard_dbt);
 
 	/* db_error = db->del (db, NULL, &uid_dbt, 0); */
@@ -240,7 +240,7 @@ e_book_backend_db_cache_check_contact (DB *db, const gchar *uid)
 	g_return_val_if_fail (uid != NULL, FALSE);
 
 	string_to_dbt (uid, &uid_dbt);
-	memset (&vcard_dbt, 0 , sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0 , sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt,0);
@@ -287,15 +287,15 @@ e_book_backend_db_cache_get_contacts (DB *db, const gchar *query)
 		return NULL;
 	}
 
-	memset(&vcard_dbt, 0 , sizeof(vcard_dbt));
-	memset(&uid_dbt, 0, sizeof(uid_dbt));
-	db_error = dbc->c_get(dbc, &uid_dbt, &vcard_dbt, DB_FIRST);
+	memset (&vcard_dbt, 0 , sizeof (vcard_dbt));
+	memset (&uid_dbt, 0, sizeof (uid_dbt));
+	db_error = dbc->c_get (dbc, &uid_dbt, &vcard_dbt, DB_FIRST);
 
 	while (db_error == 0) {
 		if (vcard_dbt.data && !strncmp (vcard_dbt.data, "BEGIN:VCARD", 11)) {
 			contact = e_contact_new_from_vcard (vcard_dbt.data);
 
-			if (e_book_backend_sexp_match_contact(sexp, contact))
+			if (e_book_backend_sexp_match_contact (sexp, contact))
 				list = g_list_prepend (list, contact);
 			else
 				g_object_unref (contact);
@@ -403,7 +403,7 @@ e_book_backend_db_cache_is_populated (DB *db)
 	gint	db_error;
 
 	string_to_dbt ("populated", &uid_dbt);
-	memset(&vcard_dbt, 0, sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
@@ -411,7 +411,7 @@ e_book_backend_db_cache_is_populated (DB *db)
 		return FALSE;
 	}
 	else {
-		free(vcard_dbt.data);
+		free (vcard_dbt.data);
 		return TRUE;
 	}
 }
@@ -422,7 +422,7 @@ e_book_backend_db_cache_is_populated (DB *db)
  * Since: 2.26
  **/
 void
-e_book_backend_db_cache_set_time(DB *db, const gchar *t)
+e_book_backend_db_cache_set_time (DB *db, const gchar *t)
 {
 	DBT uid_dbt, vcard_dbt;
 	gint db_error;
@@ -449,7 +449,7 @@ e_book_backend_db_cache_get_time (DB *db)
 	gchar *t = NULL;
 
 	string_to_dbt ("last_update_time", &uid_dbt);
-	memset (&vcard_dbt, 0, sizeof(vcard_dbt));
+	memset (&vcard_dbt, 0, sizeof (vcard_dbt));
 	vcard_dbt.flags = DB_DBT_MALLOC;
 
 	db_error = db->get (db, NULL, &uid_dbt, &vcard_dbt, 0);
diff --git a/addressbook/libedata-book/e-book-backend-db-cache.h b/addressbook/libedata-book/e-book-backend-db-cache.h
index c72d071..634c4d2 100644
--- a/addressbook/libedata-book/e-book-backend-db-cache.h
+++ b/addressbook/libedata-book/e-book-backend-db-cache.h
@@ -28,9 +28,9 @@
 G_BEGIN_DECLS
 
 EContact* e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
-void string_to_dbt(const gchar *str, DBT *dbt);
-gchar *e_book_backend_db_cache_get_filename(DB *db);
-void e_book_backend_db_cache_set_filename(DB *db, const gchar *filename);
+void string_to_dbt (const gchar *str, DBT *dbt);
+gchar *e_book_backend_db_cache_get_filename (DB *db);
+void e_book_backend_db_cache_set_filename (DB *db, const gchar *filename);
 gboolean e_book_backend_db_cache_add_contact (DB *db,
 					   EContact *contact);
 gboolean e_book_backend_db_cache_remove_contact (DB *db,
@@ -41,7 +41,7 @@ gboolean e_book_backend_db_cache_exists (const gchar *uri);
 void     e_book_backend_db_cache_set_populated (DB *db);
 gboolean e_book_backend_db_cache_is_populated (DB *db);
 GPtrArray* e_book_backend_db_cache_search (DB *db, const gchar *query);
-void e_book_backend_db_cache_set_time(DB *db, const gchar *t);
+void e_book_backend_db_cache_set_time (DB *db, const gchar *t);
 gchar * e_book_backend_db_cache_get_time (DB *db);
 
 G_END_DECLS
diff --git a/addressbook/libedata-book/e-book-backend-sexp.c b/addressbook/libedata-book/e-book-backend-sexp.c
index 492ec20..33927d5 100644
--- a/addressbook/libedata-book/e-book-backend-sexp.c
+++ b/addressbook/libedata-book/e-book-backend-sexp.c
@@ -128,7 +128,7 @@ compare_email (EContact *contact, const gchar *str,
 	for (i = E_CONTACT_EMAIL_1; i <= E_CONTACT_EMAIL_4; i++) {
 		const gchar *email = e_contact_get_const (contact, i);
 
-		if (email && compare(email, str))
+		if (email && compare (email, str))
 			return TRUE;
 	}
 
@@ -145,7 +145,7 @@ compare_phone (EContact *contact, const gchar *str,
 	for (i = E_CONTACT_FIRST_PHONE_ID; i <= E_CONTACT_LAST_PHONE_ID; i++) {
 		gchar *phone = e_contact_get (contact, i);
 
-		rv = phone && compare(phone, str);
+		rv = phone && compare (phone, str);
 		g_free (phone);
 
 		if (rv)
@@ -191,13 +191,13 @@ compare_address (EContact *contact, const gchar *str,
 	for (i = E_CONTACT_FIRST_ADDRESS_ID; i <= E_CONTACT_LAST_ADDRESS_ID; i++) {
 		EContactAddress *address = e_contact_get (contact, i);
 		if (address) {
-			rv =  (address->po && compare(address->po, str)) ||
-				(address->street && compare(address->street, str)) ||
-				(address->ext && compare(address->ext, str)) ||
-				(address->locality && compare(address->locality, str)) ||
-				(address->region && compare(address->region, str)) ||
-				(address->code && compare(address->code, str)) ||
-				(address->country && compare(address->country, str));
+			rv =  (address->po && compare (address->po, str)) ||
+				(address->street && compare (address->street, str)) ||
+				(address->ext && compare (address->ext, str)) ||
+				(address->locality && compare (address->locality, str)) ||
+				(address->region && compare (address->region, str)) ||
+				(address->code && compare (address->code, str)) ||
+				(address->country && compare (address->country, str));
 
 			e_contact_address_free (address);
 
@@ -223,7 +223,7 @@ compare_category (EContact *contact, const gchar *str,
 	for (iterator = categories; iterator; iterator = iterator->next) {
 		const gchar *category = iterator->data;
 
-		if (compare(category, str)) {
+		if (compare (category, str)) {
 			ret_val = TRUE;
 			break;
 		}
@@ -290,7 +290,7 @@ static struct prop_info {
 };
 
 static ESExpResult *
-entry_compare(SearchContext *ctx, struct _ESExp *f,
+entry_compare (SearchContext *ctx, struct _ESExp *f,
 	      gint argc, struct _ESExpResult **argv,
 	      gchar *(*compare)(const gchar *, const gchar *))
 {
@@ -328,7 +328,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
 
 					prop = e_contact_get_const (ctx->contact, info->field_id);
 
-					if (prop && compare(prop, argv[1]->value.string)) {
+					if (prop && compare (prop, argv[1]->value.string)) {
 						truth = TRUE;
 					}
 					if ((!prop) && compare("", argv[1]->value.string)) {
@@ -383,7 +383,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
 			}
 		}
 	}
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -574,7 +574,7 @@ contains_helper (const gchar *s1, const gchar *s2)
 }
 
 static ESExpResult *
-func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 
@@ -601,7 +601,7 @@ is_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 
@@ -629,7 +629,7 @@ endswith_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 
@@ -643,7 +643,7 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
 	gchar *s1 = e_util_utf8_remove_accents (ps1);
 	gchar *s2 = e_util_utf8_remove_accents (ps2);
 
-	if ((p = (gchar *) e_util_utf8_strstrcase(s1, s2))
+	if ((p = (gchar *) e_util_utf8_strstrcase (s1, s2))
 	    && (p == s1))
 		res = (gchar *)ps1;
 	else
@@ -656,7 +656,7 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 
@@ -679,7 +679,7 @@ exists_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 	ESExpResult *r;
@@ -743,14 +743,14 @@ func_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 			}
 		}
 	}
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
 }
 
 static ESExpResult *
-func_exists_vcard(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_exists_vcard (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	SearchContext *ctx = data;
 	ESExpResult *r;
@@ -775,7 +775,7 @@ func_exists_vcard(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -818,13 +818,13 @@ e_book_backend_sexp_match_contact (EBookBackendSExp *sexp, EContact *contact)
 
 	sexp->priv->search_context->contact = g_object_ref (contact);
 
-	r = e_sexp_eval(sexp->priv->search_sexp);
+	r = e_sexp_eval (sexp->priv->search_sexp);
 
 	retval = (r && r->type == ESEXP_RES_BOOL && r->value.boolean);
 
-	g_object_unref(sexp->priv->search_context->contact);
+	g_object_unref (sexp->priv->search_context->contact);
 
-	e_sexp_result_free(sexp->priv->search_sexp, r);
+	e_sexp_result_free (sexp->priv->search_sexp, r);
 
 	return retval;
 }
@@ -848,7 +848,7 @@ e_book_backend_sexp_match_vcard (EBookBackendSExp *sexp, const gchar *vcard)
 
 	retval = e_book_backend_sexp_match_contact (sexp, contact);
 
-	g_object_unref(contact);
+	g_object_unref (contact);
 
 	return retval;
 }
@@ -870,21 +870,21 @@ e_book_backend_sexp_new (const gchar *text)
 	gint esexp_error;
 	gint i;
 
-	sexp->priv->search_sexp = e_sexp_new();
+	sexp->priv->search_sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp->priv->search_sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp->priv->search_sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, sexp->priv->search_context);
 		}
 		else {
-			e_sexp_add_function(sexp->priv->search_sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp->priv->search_sexp, 0, symbols[i].name,
 					    symbols[i].func, sexp->priv->search_context);
 		}
 	}
 
-	e_sexp_input_text(sexp->priv->search_sexp, text, strlen(text));
-	esexp_error = e_sexp_parse(sexp->priv->search_sexp);
+	e_sexp_input_text (sexp->priv->search_sexp, text, strlen (text));
+	esexp_error = e_sexp_parse (sexp->priv->search_sexp);
 
 	if (esexp_error == -1) {
 		g_object_unref (sexp);
@@ -900,7 +900,7 @@ e_book_backend_sexp_dispose (GObject *object)
 	EBookBackendSExp *sexp = E_BOOK_BACKEND_SEXP (object);
 
 	if (sexp->priv) {
-		e_sexp_unref(sexp->priv->search_sexp);
+		e_sexp_unref (sexp->priv->search_sexp);
 
 		g_free (sexp->priv->search_context);
 		g_free (sexp->priv);
diff --git a/addressbook/libedata-book/e-book-backend-summary.c b/addressbook/libedata-book/e-book-backend-summary.c
index d83c3dc..545e433 100644
--- a/addressbook/libedata-book/e-book-backend-summary.c
+++ b/addressbook/libedata-book/e-book-backend-summary.c
@@ -219,7 +219,7 @@ e_book_backend_summary_init (EBookBackendSummary *summary)
 {
 	EBookBackendSummaryPrivate *priv;
 
-	priv             = g_new(EBookBackendSummaryPrivate, 1);
+	priv             = g_new (EBookBackendSummaryPrivate, 1);
 
 	summary->priv = priv;
 
@@ -227,7 +227,7 @@ e_book_backend_summary_init (EBookBackendSummary *summary)
 	priv->fp = NULL;
 	priv->dirty = FALSE;
 	priv->upgraded = FALSE;
-	priv->items = g_ptr_array_new();
+	priv->items = g_ptr_array_new ();
 	priv->id_to_item = g_hash_table_new (g_str_hash, g_str_equal);
 	priv->flush_timeout_millis = 0;
 	priv->flush_timeout = 0;
@@ -617,7 +617,7 @@ e_book_backend_summary_save_item (EBookBackendSummary *summary, FILE *fp, EBookB
 	disk_item.list = item->list;
 	disk_item.list_show_addresses = item->list_show_addresses;
 
-	rv = fwrite (&disk_item, sizeof(disk_item), 1, fp);
+	rv = fwrite (&disk_item, sizeof (disk_item), 1, fp);
 	if (rv != 1)
 		return FALSE;
 
@@ -904,7 +904,7 @@ e_book_backend_summary_is_up_to_date (EBookBackendSummary *summary, time_t t)
 /* we only want to do summary queries if the query is over the set fields in the summary */
 
 static ESExpResult *
-func_check(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_check (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	gint truth = FALSE;
@@ -922,7 +922,7 @@ func_check(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer dat
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -963,30 +963,30 @@ e_book_backend_summary_is_summary_query (EBookBackendSummary *summary, const gch
 
 	g_return_val_if_fail (summary != NULL, FALSE);
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (check_symbols); i++) {
 		if (check_symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp, 0, check_symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, check_symbols[i].name,
 					     (ESExpIFunc *)check_symbols[i].func, summary);
 		} else {
-			e_sexp_add_function(sexp, 0, check_symbols[i].name,
+			e_sexp_add_function (sexp, 0, check_symbols[i].name,
 					    check_symbols[i].func, summary);
 		}
 	}
 
-	e_sexp_input_text(sexp, query, strlen(query));
-	esexp_error = e_sexp_parse(sexp);
+	e_sexp_input_text (sexp, query, strlen (query));
+	esexp_error = e_sexp_parse (sexp);
 
 	if (esexp_error == -1) {
 		return FALSE;
 	}
 
-	r = e_sexp_eval(sexp);
+	r = e_sexp_eval (sexp);
 
 	retval = (r && r->type == ESEXP_RES_BOOL && r->value.boolean);
 
-	e_sexp_result_free(sexp, r);
+	e_sexp_result_free (sexp, r);
 
 	e_sexp_unref (sexp);
 
@@ -1045,7 +1045,7 @@ do_compare (EBookBackendSummary *summary, struct _ESExp *f, gint argc,
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+	r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 	r->value.ptrarray = result;
 
 	return r;
@@ -1067,7 +1067,7 @@ contains_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendSummary *summary = data;
 
@@ -1093,7 +1093,7 @@ is_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_is(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_is (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendSummary *summary = data;
 
@@ -1121,7 +1121,7 @@ endswith_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_endswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendSummary *summary = data;
 
@@ -1135,7 +1135,7 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
 	gchar *s1 = e_util_utf8_remove_accents (ps1);
 	gchar *s2 = e_util_utf8_remove_accents (ps2);
 
-	if ((p = (gchar *) e_util_utf8_strstrcase(s1, s2))
+	if ((p = (gchar *) e_util_utf8_strstrcase (s1, s2))
 	    && (p == s1))
 		res = (gchar *)ps1;
 	else
@@ -1148,7 +1148,7 @@ beginswith_helper (const gchar *ps1, const gchar *ps2)
 }
 
 static ESExpResult *
-func_beginswith(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+func_beginswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	EBookBackendSummary *summary = data;
 
@@ -1188,27 +1188,27 @@ e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query)
 
 	g_return_val_if_fail (summary != NULL, NULL);
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, summary);
 		} else {
-			e_sexp_add_function(sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp, 0, symbols[i].name,
 					    symbols[i].func, summary);
 		}
 	}
 
-	e_sexp_input_text(sexp, query, strlen(query));
-	esexp_error = e_sexp_parse(sexp);
+	e_sexp_input_text (sexp, query, strlen (query));
+	esexp_error = e_sexp_parse (sexp);
 
 	if (esexp_error == -1) {
 		return NULL;
 	}
 
 	retval = g_ptr_array_new ();
-	r = e_sexp_eval(sexp);
+	r = e_sexp_eval (sexp);
 
 	if (r && r->type == ESEXP_RES_ARRAY_PTR && r->value.ptrarray) {
 		GPtrArray *ptrarray = r->value.ptrarray;
@@ -1218,7 +1218,7 @@ e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query)
 			g_ptr_array_add (retval, g_ptr_array_index (ptrarray, i));
 	}
 
-	e_sexp_result_free(sexp, r);
+	e_sexp_result_free (sexp, r);
 
 	e_sexp_unref (sexp);
 
@@ -1236,7 +1236,7 @@ e_book_backend_summary_search (EBookBackendSummary *summary, const gchar *query)
  * Returns: A new VCard, or %NULL if the contact summary didn't exist.
  **/
 gchar *
-e_book_backend_summary_get_summary_vcard(EBookBackendSummary *summary, const gchar *id)
+e_book_backend_summary_get_summary_vcard (EBookBackendSummary *summary, const gchar *id)
 {
 	EBookBackendSummaryItem *item;
 
diff --git a/addressbook/libedata-book/e-data-book-factory.c b/addressbook/libedata-book/e-data-book-factory.c
index 17d98a3..f5f0f7f 100644
--- a/addressbook/libedata-book/e-data-book-factory.c
+++ b/addressbook/libedata-book/e-data-book-factory.c
@@ -49,7 +49,7 @@ static GMainLoop *loop;
 		}							\
 	}G_STMT_END
 
-G_DEFINE_TYPE(EDataBookFactory, e_data_book_factory, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EDataBookFactory, e_data_book_factory, G_TYPE_OBJECT);
 
 #define E_DATA_BOOK_FACTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_DATA_BOOK_FACTORY, EDataBookFactoryPrivate))
 
@@ -476,7 +476,7 @@ die (const gchar *prefix, GError *error)
 {
 	g_error("%s: %s", prefix, error->message);
 	g_error_free (error);
-	exit(1);
+	exit (1);
 }
 
 static void
diff --git a/addressbook/libedata-book/e-data-book.h b/addressbook/libedata-book/e-data-book.h
index d938ec6..5ea18a0 100644
--- a/addressbook/libedata-book/e-data-book.h
+++ b/addressbook/libedata-book/e-data-book.h
@@ -88,7 +88,7 @@ const gchar *e_data_book_status_to_string (EDataBookStatus status);
  **/
 #define e_return_data_book_error_if_fail(expr, _code)				\
 	G_STMT_START {								\
-		if (G_LIKELY(expr)) {						\
+		if (G_LIKELY (expr)) {						\
 		} else {							\
 			g_log (G_LOG_DOMAIN,					\
 				G_LOG_LEVEL_CRITICAL,				\
diff --git a/addressbook/tests/ebook/ebook-test-utils.c b/addressbook/tests/ebook/ebook-test-utils.c
index 12045fe..2566912 100644
--- a/addressbook/tests/ebook/ebook-test-utils.c
+++ b/addressbook/tests/ebook/ebook-test-utils.c
@@ -55,7 +55,7 @@ ebook_test_utils_new_vcard_from_test_case (const gchar *case_name)
         if (!g_file_load_contents (file, NULL, &vcard, NULL, NULL, &error)) {
                 g_warning ("failed to read test contact file '%s': %s",
                                 filename, error->message);
-                exit(1);
+                exit (1);
         }
 
         g_free (case_filename);
@@ -123,7 +123,7 @@ ebook_test_utils_book_add_contact (EBook    *book,
                 uri = e_book_get_uri (book);
                 g_warning ("failed to add contact to addressbook: `%s': %s",
                                 uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return e_contact_get_const (contact, E_CONTACT_UID);
@@ -163,7 +163,7 @@ ebook_test_utils_book_async_add_contact (EBook       *book,
         if (!e_book_add_contact_async (book, contact,
                                 (EBookIdAsyncCallback) add_contact_cb, closure)) {
                 g_warning ("failed to set up contact add");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -181,7 +181,7 @@ ebook_test_utils_book_commit_contact (EBook    *book,
                 uri = e_book_get_uri (book);
                 g_warning ("failed to commit changes to contact '%s' to addressbook: `%s': %s",
                                 uid, uri, error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -218,7 +218,7 @@ ebook_test_utils_book_async_commit_contact (EBook       *book,
         if (!e_book_commit_contact_async (book, contact,
                                 (EBookAsyncCallback) commit_contact_cb, closure)) {
                 g_warning ("failed to set up contact commit");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -235,7 +235,7 @@ ebook_test_utils_book_get_contact (EBook      *book,
                 uri = e_book_get_uri (book);
                 g_warning ("failed to get contact '%s' in addressbook: `%s': "
                                 "%s", uid, uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return contact;
@@ -280,7 +280,7 @@ ebook_test_utils_book_async_get_contact (EBook       *book,
                                 (EBookContactAsyncCallback) get_contact_cb,
                                 closure)) {
                 g_warning ("failed to set up async getContact");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -296,7 +296,7 @@ ebook_test_utils_book_get_required_fields (EBook *book)
                 uri = e_book_get_uri (book);
                 g_warning ("failed to get required fields for addressbook "
                                 "`%s': %s", uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return fields;
@@ -338,7 +338,7 @@ ebook_test_utils_book_async_get_required_fields (EBook       *book,
                                 (EBookEListAsyncCallback) get_required_fields_cb,
                                 closure)) {
                 g_warning ("failed to set up async getRequiredFields");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -354,7 +354,7 @@ ebook_test_utils_book_get_static_capabilities (EBook *book)
                 uri = e_book_get_uri (book);
                 g_warning ("failed to get capabilities for addressbook: `%s': "
                                 "%s", uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return caps;
@@ -372,7 +372,7 @@ ebook_test_utils_book_get_supported_auth_methods (EBook *book)
                 uri = e_book_get_uri (book);
                 g_warning ("failed to get supported auth methods for "
                                 "addressbook `%s': %s", uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return fields;
@@ -415,7 +415,7 @@ ebook_test_utils_book_async_get_supported_auth_methods (EBook       *book,
                                 (EBookEListAsyncCallback) get_supported_auth_methods_cb,
                                 closure)) {
                 g_warning ("failed to set up async getSupportedAuthMethods");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -431,7 +431,7 @@ ebook_test_utils_book_get_supported_fields (EBook *book)
                 uri = e_book_get_uri (book);
                 g_warning ("failed to get supported fields for addressbook "
                                 "`%s': %s", uri, error->message);
-                exit(1);
+                exit (1);
         }
 
         return fields;
@@ -473,7 +473,7 @@ ebook_test_utils_book_async_get_supported_fields (EBook       *book,
                                 (EBookEListAsyncCallback) get_supported_fields_cb,
                                 closure)) {
                 g_warning ("failed to set up async getSupportedFields");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -489,7 +489,7 @@ ebook_test_utils_book_remove_contact (EBook      *book,
                 uri = e_book_get_uri (book);
                 g_warning ("failed to remove contact '%s' from addressbook: `%s': %s",
                                 uid, uri, error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -527,7 +527,7 @@ ebook_test_utils_book_async_remove_contact (EBook       *book,
                                 (EBookAsyncCallback) remove_contact_cb,
                                 closure)) {
                 g_warning ("failed to set up async removeContacts (for a single contact)");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -565,7 +565,7 @@ ebook_test_utils_book_async_remove_contact_by_id (EBook       *book,
                                 (EBookAsyncCallback) remove_contact_by_id_cb,
                                 closure)) {
                 g_warning ("failed to set up async removeContacts (by id)");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -581,7 +581,7 @@ ebook_test_utils_book_remove_contacts (EBook *book,
                 uri = e_book_get_uri (book);
                 g_warning ("failed to remove contacts from addressbook: `%s': %s",
                                 uri, error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -619,7 +619,7 @@ ebook_test_utils_book_async_remove_contacts (EBook       *book,
                                 (EBookAsyncCallback) remove_contacts_cb,
                                 closure)) {
                 g_warning ("failed to set up async removeContacts");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -680,7 +680,7 @@ ebook_test_utils_book_open (EBook    *book,
 
                 g_warning ("failed to open addressbook: `%s': %s", uri,
                                 error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -691,7 +691,7 @@ ebook_test_utils_book_remove (EBook *book)
 
         if (!e_book_remove (book, &error)) {
                 g_warning ("failed to remove book; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully removed the temporary addressbook\n");
 
@@ -725,7 +725,7 @@ ebook_test_utils_book_async_remove (EBook       *book,
         closure->user_data = user_data;
         if (!e_book_remove_async (book, (EBookAsyncCallback) remove_cb, closure)) {
                 g_warning ("failed to set up book removal");
-                exit(1);
+                exit (1);
         }
 }
 
@@ -743,7 +743,7 @@ ebook_test_utils_book_get_book_view (EBook       *book,
 
                 g_warning ("failed to get view for addressbook: `%s': %s", uri,
                                 error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -779,6 +779,6 @@ ebook_test_utils_book_async_get_book_view (EBook       *book,
         closure->user_data = user_data;
         if (!e_book_get_book_view_async (book, query, NULL, -1, (EBookBookViewAsyncCallback) get_book_view_cb, closure)) {
                 g_warning ("failed to set up book view retrieval");
-                exit(1);
+                exit (1);
         }
 }
diff --git a/addressbook/tests/ebook/test-changes.c b/addressbook/tests/ebook/test-changes.c
index e68633e..1e0dc9e 100644
--- a/addressbook/tests/ebook/test-changes.c
+++ b/addressbook/tests/ebook/test-changes.c
@@ -30,7 +30,7 @@ main (gint argc, gchar **argv)
 	/* get an initial change set */
 	if (!e_book_get_changes (book, "changeidtest", &changes, &error)) {
 		printf ("failed to get changes: %s\n", error->message);
-		exit(0);
+		exit (0);
 	}
 
 	/* make a change to the book */
@@ -40,19 +40,19 @@ main (gint argc, gchar **argv)
 	/* get another change set */
 	if (!e_book_get_changes (book, "changeidtest", &changes, &error)) {
 		printf ("failed to get second set of changes: %s\n", error->message);
-		exit(0);
+		exit (0);
 	}
 
 	/* make sure that 1 change has occurred */
 	if (g_list_length (changes) != 1) {
 		printf ("got back %d changes, was expecting 1\n", g_list_length (changes));
-		exit(0);
+		exit (0);
 	}
 
 	change = changes->data;
 	if (change->change_type != E_BOOK_CHANGE_CARD_ADDED) {
 		printf ("was expecting a CARD_ADDED change, but didn't get it.\n");
-		exit(0);
+		exit (0);
 	}
 
 	printf ("got changed vcard back: %s\n", (gchar *)e_contact_get_const (change->contact, E_CONTACT_UID));
diff --git a/addressbook/tests/ebook/test-ebook.c b/addressbook/tests/ebook/test-ebook.c
index f8d5998..77f79e8 100644
--- a/addressbook/tests/ebook/test-ebook.c
+++ b/addressbook/tests/ebook/test-ebook.c
@@ -40,7 +40,7 @@ print_all_emails (EBook *book)
 
 	if (status == FALSE) {
 		printf ("error %d getting card list\n", status);
-		exit(0);
+		exit (0);
 	}
 
 	for (c = cards; c; c = c->next) {
@@ -85,7 +85,7 @@ main (gint argc, gchar **argv)
 	book = e_book_new_system_addressbook (NULL);
 	if (!book) {
 		printf ("failed to create local addressbook\n");
-		exit(0);
+		exit (0);
 	}
 
         ebook_test_utils_book_open (book, FALSE);
diff --git a/addressbook/tests/ebook/test-nonexistent-id.c b/addressbook/tests/ebook/test-nonexistent-id.c
index 9408a54..821fb5c 100644
--- a/addressbook/tests/ebook/test-nonexistent-id.c
+++ b/addressbook/tests/ebook/test-nonexistent-id.c
@@ -9,12 +9,12 @@ gint main (gint argc, gchar **argv)
 	book = e_book_new_system_addressbook (NULL);
 	if (!book) {
 		printf ("failed to create local addressbook\n");
-		exit(0);
+		exit (0);
 	}
 
 	if (!e_book_open (book, FALSE, NULL)) {
 		printf ("failed to open local addressbook\n");
-		exit(0);
+		exit (0);
 	}
 
 	printf ("removing nonexistant contact\n");
diff --git a/addressbook/tests/ebook/test-search.c b/addressbook/tests/ebook/test-search.c
index d96c2e0..4dcd0ed 100644
--- a/addressbook/tests/ebook/test-search.c
+++ b/addressbook/tests/ebook/test-search.c
@@ -27,19 +27,19 @@ main (gint argc, gchar **argv)
 	book = e_book_new_system_addressbook (NULL);
 	if (!book) {
 		printf ("failed to create ebook\n");
-		exit(0);
+		exit (0);
 	}
 
 	status = e_book_open (book, TRUE, NULL);
 	if (status == FALSE) {
 		printf ("failed to open addressbook\n");
-		exit(0);
+		exit (0);
 	}
 
 	status = e_book_get_contacts (book, query, &contacts, NULL);
 	if (status == FALSE) {
 		printf ("failed to get contacts\n");
-		exit(0);
+		exit (0);
 	}
 
 	for (c = contacts; c; c = c->next) {
diff --git a/addressbook/tests/ebook/test-stress-bookviews.c b/addressbook/tests/ebook/test-stress-bookviews.c
index 4f6e871..92ff79f 100644
--- a/addressbook/tests/ebook/test-stress-bookviews.c
+++ b/addressbook/tests/ebook/test-stress-bookviews.c
@@ -68,13 +68,13 @@ main (gint argc, gchar **argv)
 	book = e_book_new_system_addressbook (NULL);
 	if (!book) {
 		printf ("failed to create ebook\n");
-		exit(0);
+		exit (0);
 	}
 
 	status = e_book_open (book, FALSE, NULL);
 	if (status == FALSE) {
 		printf ("failed to open local addressbook\n");
-		exit(0);
+		exit (0);
 	}
 
 	query = e_book_query_any_field_contains ("");
diff --git a/addressbook/tests/ebook/test-untyped-phones.c b/addressbook/tests/ebook/test-untyped-phones.c
index b999e6e..8ebb8f9 100644
--- a/addressbook/tests/ebook/test-untyped-phones.c
+++ b/addressbook/tests/ebook/test-untyped-phones.c
@@ -16,7 +16,7 @@ TEL;FAX:321-321-4321\r\n\
 END:vCard"
 
 static void
-check(gboolean test, const gchar *msg)
+check (gboolean test, const gchar *msg)
 {
 	printf ("%s - %s\n", test ? "passed" : "failed", msg);
 }
diff --git a/addressbook/tests/vcard/dump-vcard.c b/addressbook/tests/vcard/dump-vcard.c
index 22c2573..307d34e 100644
--- a/addressbook/tests/vcard/dump-vcard.c
+++ b/addressbook/tests/vcard/dump-vcard.c
@@ -4,7 +4,7 @@
 #include <libebook/e-vcard.h>
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	FILE *fp;
 	EVCard *vcard;
@@ -20,7 +20,7 @@ main(gint argc, gchar **argv)
 
 	while (!feof (fp)) {
 		gchar buf[1024];
-		if (fgets (buf, sizeof(buf), fp))
+		if (fgets (buf, sizeof (buf), fp))
 			str = g_string_append (str, buf);
 	}
 	fclose (fp);
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index ce3d9c7..ae0a394 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -2746,8 +2746,8 @@ convert_to_inline_attachment (ECalBackendCalDAV *cbdav, icalcomponent *icalcomp)
 			 */
 			encoded = g_base64_encode ((guchar *) content, len);
 			attach = icalattach_new_from_data ((guchar *) encoded, NULL, NULL);
-			g_free(content);
-			g_free(encoded);
+			g_free (content);
+			g_free (encoded);
 
 			prop = icalproperty_new_attach (attach);
 			icalattach_unref (attach);
@@ -3397,7 +3397,7 @@ do_modify_object (ECalBackendCalDAV *cbdav, const gchar *calobj, CalObjModType m
 				/* this is only a master object, thus make is a VCALENDAR component */
 				icalcomponent *icomp;
 
-				icomp = e_cal_util_new_top_level();
+				icomp = e_cal_util_new_top_level ();
 				icalcomponent_add_component (icomp, cache_comp);
 
 				/* no need to free the cache_comp, as it is inside icomp */
@@ -4027,7 +4027,7 @@ caldav_get_object_list (ECalBackendSync  *backend,
 
 	*objects = NULL;
 
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(sexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -4080,7 +4080,7 @@ caldav_start_query (ECalBackend  *backend,
 	} else {
 		do_search = TRUE;
 	}
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(sexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp,
 									    &occur_start,
 									    &occur_end);
 
diff --git a/calendar/backends/contacts/e-cal-backend-contacts.c b/calendar/backends/contacts/e-cal-backend-contacts.c
index 6866497..ef7122e 100644
--- a/calendar/backends/contacts/e-cal-backend-contacts.c
+++ b/calendar/backends/contacts/e-cal-backend-contacts.c
@@ -489,7 +489,7 @@ contacts_removed_cb (EBookView *book_view, const GList *contact_ids, gpointer us
 static struct icaltimetype
 cdate_to_icaltime (EContactDate *cdate)
 {
-	struct icaltimetype ret = icaltime_null_time();
+	struct icaltimetype ret = icaltime_null_time ();
 
 	ret.year = cdate->year;
 	ret.month = cdate->month;
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index b35f7d5..30275a3 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -1800,7 +1800,7 @@ e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, con
 
 	g_static_rec_mutex_lock (&priv->idle_save_rmutex);
 
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(match_data.obj_sexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (match_data.obj_sexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -1813,7 +1813,7 @@ e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, con
 		objs_occuring_in_tw = e_intervaltree_search (priv->interval_tree,
 							    occur_start, occur_end);
 
-		g_list_foreach(objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
+		g_list_foreach (objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
 			       &match_data);
 	}
 
@@ -1822,7 +1822,7 @@ e_cal_backend_file_get_object_list (ECalBackendSync *backend, EDataCal *cal, con
 	*objects = match_data.obj_list;
 
 	if (objs_occuring_in_tw) {
-		g_list_foreach(objs_occuring_in_tw, (GFunc)g_object_unref, NULL);
+		g_list_foreach (objs_occuring_in_tw, (GFunc)g_object_unref, NULL);
 		g_list_free (objs_occuring_in_tw);
 	}
 
@@ -1869,7 +1869,7 @@ e_cal_backend_file_start_query (ECalBackend *backend, EDataCalView *query)
 		g_error_free (error);
 		return;
 	}
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(match_data.obj_sexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (match_data.obj_sexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -1884,13 +1884,13 @@ e_cal_backend_file_start_query (ECalBackend *backend, EDataCalView *query)
 
 		e_debug_log(FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES,  "---;%p;QUERY-ITEMS;%s;%s;%d", query,
 			    e_data_cal_view_get_text (query), G_OBJECT_TYPE_NAME (backend),
-			    g_hash_table_size(priv->comp_uid_hash));
+			    g_hash_table_size (priv->comp_uid_hash));
 	} else {
 		/* matches objects in new "interval tree" way */
 		/* events occuring in time window */
 		objs_occuring_in_tw = e_intervaltree_search (priv->interval_tree, occur_start, occur_end);
 
-		g_list_foreach(objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
+		g_list_foreach (objs_occuring_in_tw, (GFunc) match_object_sexp_to_component,
 			       &match_data);
 
 		e_debug_log(FALSE, E_DEBUG_LOG_DOMAIN_CAL_QUERIES,  "---;%p;QUERY-ITEMS;%s;%s;%d", query,
@@ -1910,7 +1910,7 @@ e_cal_backend_file_start_query (ECalBackend *backend, EDataCalView *query)
 	}
 
 	if (objs_occuring_in_tw) {
-		g_list_foreach(objs_occuring_in_tw, (GFunc)g_object_unref, NULL);
+		g_list_foreach (objs_occuring_in_tw, (GFunc)g_object_unref, NULL);
 		g_list_free (objs_occuring_in_tw);
 	}
 	g_object_unref (match_data.obj_sexp);
@@ -3164,7 +3164,7 @@ e_cal_backend_file_receive_objects (ECalBackendSync *backend, EDataCal *cal, con
 
         /* check and patch timezones */
         if (!err) {
-            if (!e_cal_check_timezones(toplevel_comp,
+            if (!e_cal_check_timezones (toplevel_comp,
                                        NULL,
                                        e_cal_tzlookup_icomp,
                                        priv->icalcomp,
@@ -3523,7 +3523,7 @@ test_query (ECalBackendFile* cbfile, const gchar * query)
 	if (objects == NULL)
 	{
 		g_message (G_STRLOC " failed to get objects\n");
-		exit(0);
+		exit (0);
 	}
 
 	if (g_list_length (objects) < g_list_length (all_objects) )
@@ -3540,9 +3540,9 @@ test_query (ECalBackendFile* cbfile, const gchar * query)
 		exit (-1);
 	}
 
-	g_list_foreach(objects, (GFunc) g_free, NULL);
+	g_list_foreach (objects, (GFunc) g_free, NULL);
 	g_list_free (objects);
-	g_list_foreach(all_objects, (GFunc) g_free, NULL);
+	g_list_foreach (all_objects, (GFunc) g_free, NULL);
 	g_list_free (all_objects);
 }
 
@@ -3558,10 +3558,10 @@ execute_query (ECalBackendFile* cbfile, const gchar * query)
 	if (objects == NULL)
 	{
 		g_message (G_STRLOC " failed to get objects\n");
-		exit(0);
+		exit (0);
 	}
 
-	g_list_foreach(objects, (GFunc) g_free, NULL);
+	g_list_foreach (objects, (GFunc) g_free, NULL);
 	g_list_free (objects);
 }
 
@@ -3636,7 +3636,7 @@ private_getline (gchar **lineptr, gsize *n, FILE *stream)
 }
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	gchar * line = NULL;
 	gsize len = 0;
@@ -3690,17 +3690,17 @@ main(gint argc, gchar **argv)
 		fin = stdin;
 	}
 
-	while ((read = private_getline(&line, &len, fin)) != -1) {
+	while ((read = private_getline (&line, &len, fin)) != -1) {
 		g_print ("Query %d: %s", num++, line);
 
 		if (only_execute)
-			execute_query(cbfile, line);
+			execute_query (cbfile, line);
 		else
-			test_query(cbfile, line);
+			test_query (cbfile, line);
 	}
 
 	if (line)
-		free(line);
+		free (line);
 
 	if (fname)
 		fclose (fin);
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
index 9a24381..c164e73 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
@@ -118,14 +118,14 @@ set_categories_for_gw_item (EGwItem *item, GSList *category_names, ECalBackendGr
 	g_return_if_fail (categories_by_id != NULL || categories_by_name != NULL || cnc != NULL);
 
 	for (; category_names != NULL; category_names = g_slist_next (category_names)) {
-                     if (!category_names->data || strlen(category_names->data) == 0 )
+                     if (!category_names->data || strlen (category_names->data) == 0 )
                              continue;
                      id = g_hash_table_lookup (categories_by_name, category_names->data);
                      if (id)
                             category_ids = g_list_append (category_ids, g_strdup (id));
                      else {
                              EGwItem *category_item;
-                            category_item = e_gw_item_new_empty();
+                            category_item = e_gw_item_new_empty ();
                              e_gw_item_set_item_type (category_item,  E_GW_ITEM_TYPE_CATEGORY);
                              e_gw_item_set_category_name (category_item, category_names->data);
                              status = e_gw_connection_create_item (cnc, category_item, &id);
@@ -133,11 +133,11 @@ set_categories_for_gw_item (EGwItem *item, GSList *category_names, ECalBackendGr
                                      gchar **components = g_strsplit (id, "@", -1);
                                      gchar *temp_id = components[0];
 
-                                     g_hash_table_insert (categories_by_name, g_strdup (category_names->data), g_strdup(temp_id));
-                                     g_hash_table_insert (categories_by_id, g_strdup(temp_id), g_strdup (category_names->data));
-                                     category_ids = g_list_append (category_ids, g_strdup(temp_id));
+                                     g_hash_table_insert (categories_by_name, g_strdup (category_names->data), g_strdup (temp_id));
+                                     g_hash_table_insert (categories_by_id, g_strdup (temp_id), g_strdup (category_names->data));
+                                     category_ids = g_list_append (category_ids, g_strdup (temp_id));
                                      g_free (id);
-                                     g_strfreev(components);
+                                     g_strfreev (components);
                              }
                              g_object_unref (category_item);
                      }
@@ -342,7 +342,7 @@ e_cal_backend_groupwise_set_attachments_from_comp (ECalComponent *comp,
 		 * Should be fixed in e-gw-item*/
 		attach_item->contentType = get_mime_type ((gchar *)l->data);
 
-		attach_item->name = g_strdup (filename + strlen(uid) + 1);
+		attach_item->name = g_strdup (filename + strlen (uid) + 1);
 		/* do a base64 encoding so it can be embedded in a soap
 		 * message */
 		encoded_data = g_base64_encode ((guchar *) file_contents, file_len);
@@ -460,7 +460,7 @@ set_attendees_to_item (EGwItem *item, ECalComponent *comp, icaltimezone *default
 			recipient_list = g_slist_append (recipient_list, recipient);
 		}
 
-		e_cal_component_free_attendee_list(attendee_list);
+		e_cal_component_free_attendee_list (attendee_list);
 
 		/* recipient_list shouldn't be freed. Look into the function below. */
 		e_gw_item_set_recipient_list (item, recipient_list);
@@ -1206,7 +1206,7 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
 
 		if (!is_allday && (item_type != E_GW_ITEM_TYPE_NOTE)) {
 			if (!icaltime_get_timezone (itt_utc))
-				icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone());
+				icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone ());
 			if (default_zone) {
 				itt = icaltime_convert_to_zone (itt_utc, default_zone);
 				icaltime_set_timezone (&itt, default_zone);
@@ -1356,7 +1356,7 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
 
 			if (!is_allday) {
 				if (!icaltime_get_timezone (itt_utc))
-					icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone());
+					icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone ());
 				if (default_zone) {
 					itt = icaltime_convert_to_zone (itt_utc, default_zone);
 					icaltime_set_timezone (&itt, default_zone);
@@ -1400,7 +1400,7 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
 		if (t) {
 			itt_utc = icaltime_from_string (t);
 			if (!icaltime_get_timezone (itt_utc))
-				icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone());
+				icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone ());
 			if (default_zone) {
 				itt = icaltime_convert_to_zone (itt_utc, default_zone);
 				icaltime_set_timezone (&itt, default_zone);
@@ -1434,7 +1434,7 @@ e_gw_item_to_cal_component (EGwItem *item, ECalBackendGroupwise *cbgw)
 			if (t) {
 				itt_utc = icaltime_from_string (t);
 				if (!icaltime_get_timezone (itt_utc))
-					icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone());
+					icaltime_set_timezone (&itt_utc, icaltimezone_get_utc_timezone ());
 				if (default_zone) {
 					itt = icaltime_convert_to_zone (itt_utc, default_zone);
 					icaltime_set_timezone (&itt, default_zone);
@@ -1939,7 +1939,7 @@ e_gw_connection_get_freebusy_info (ECalBackendGroupwise *cbgw, GList *users, tim
 			ipt.end = eitt;
 			icalprop = icalproperty_new_freebusy (ipt);
 			icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE");
-			icalcomponent_add_property(icalcomp, icalprop);
+			icalcomponent_add_property (icalcomp, icalprop);
 		}
 
 		for (;
@@ -1987,7 +1987,7 @@ e_gw_connection_get_freebusy_info (ECalBackendGroupwise *cbgw, GList *users, tim
 					icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE");
 				g_free (accept_level);
 			}
-			icalcomponent_add_property(icalcomp, icalprop);
+			icalcomponent_add_property (icalcomp, icalprop);
 		}
 
 		e_cal_component_commit_sequence (comp);
@@ -2079,19 +2079,19 @@ e_gw_item_set_changes (EGwItem *item, EGwItem *cache_item)
 
 	/* TODO assert the types of the items are the same */
 
-	SET_DELTA(subject);
-	SET_DELTA(message);
-	SET_DELTA(classification);
+	SET_DELTA (subject);
+	SET_DELTA (message);
+	SET_DELTA (classification);
 
-	SET_DELTA(start_date);
+	SET_DELTA (start_date);
 	set_categories_changes (item, cache_item);
 	/*FIXME  recipient_list modifications need go here after server starts
 	 * supporting retraction */
 	if (e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_APPOINTMENT) {
 
-		SET_DELTA(end_date);
-		SET_DELTA(accept_level);
-		SET_DELTA(place);
+		SET_DELTA (end_date);
+		SET_DELTA (accept_level);
+		SET_DELTA (place);
 		trigger = e_gw_item_get_trigger (item);
 		cache_trigger = e_gw_item_get_trigger (cache_item);
 		if (cache_trigger) {
@@ -2109,8 +2109,8 @@ e_gw_item_set_changes (EGwItem *item, EGwItem *cache_item)
 			e_gw_item_set_change (item, E_GW_ITEM_CHANGE_TYPE_UPDATE, "allDayEvent", &is_allday);
 	}
 	else if ( e_gw_item_get_item_type (item) == E_GW_ITEM_TYPE_TASK) {
-		SET_DELTA(due_date);
-		SET_DELTA(task_priority);
+		SET_DELTA (due_date);
+		SET_DELTA (task_priority);
 	}
 }
 
diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c
index b4b2978..7b04e04 100644
--- a/calendar/backends/groupwise/e-cal-backend-groupwise.c
+++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c
@@ -309,7 +309,7 @@ populate_cache (ECalBackendGroupwise *cbgw)
 				e_cal_backend_groupwise_notify_error_code (cbgw, status);
 				return status;
 			}
-			for (l = list; l != NULL; l = g_list_next(l)) {
+			for (l = list; l != NULL; l = g_list_next (l)) {
 				EGwItem *item;
 				gchar *progress_string = NULL;
 
@@ -477,7 +477,7 @@ get_deltas (gpointer handle)
 
 	e_cal_backend_store_freeze_changes (store);
 
-	for (; item_list != NULL; item_list = g_list_next(item_list)) {
+	for (; item_list != NULL; item_list = g_list_next (item_list)) {
 		EGwItem *item = NULL;
 		ECalComponent *modified_comp = NULL, *cache_comp = NULL;
 		gchar *cache_comp_str = NULL, *modif_comp_str, *rid = NULL;
@@ -485,7 +485,7 @@ get_deltas (gpointer handle)
 		const gchar *uid;
 		gint r_key;
 
-		item = E_GW_ITEM(item_list->data);
+		item = E_GW_ITEM (item_list->data);
 		modified_comp = e_gw_item_to_cal_component (item, cbgw);
 		if (!modified_comp) {
 			continue;
@@ -1047,7 +1047,7 @@ connect_to_server (ECalBackendGroupwise *cbgw, GError **perror)
 
 		priv->cnc = e_gw_connection_get_proxy_connection (cnc, parent_user, priv->password, priv->username, &permissions);
 
-		g_object_unref(cnc);
+		g_object_unref (cnc);
 
 		if (!priv->cnc) {
 			g_propagate_error (perror, EDC_ERROR (AuthenticationFailed));
@@ -1253,7 +1253,7 @@ e_cal_backend_groupwise_is_read_only (ECalBackendSync *backend, EDataCal *cal, g
 {
 	ECalBackendGroupwise *cbgw;
 
-	cbgw = E_CAL_BACKEND_GROUPWISE(backend);
+	cbgw = E_CAL_BACKEND_GROUPWISE (backend);
 	*read_only = cbgw->priv->read_only;
 }
 
@@ -1264,7 +1264,7 @@ e_cal_backend_groupwise_get_cal_address (ECalBackendSync *backend, EDataCal *cal
 	ECalBackendGroupwise *cbgw;
 	ECalBackendGroupwisePrivate *priv;
 
-	cbgw = E_CAL_BACKEND_GROUPWISE(backend);
+	cbgw = E_CAL_BACKEND_GROUPWISE (backend);
 	priv = cbgw->priv;
 
 	if (priv->mode == CAL_MODE_REMOTE) {
@@ -1469,7 +1469,7 @@ e_cal_backend_groupwise_set_mode (ECalBackend *backend, CalMode mode)
 		e_cal_backend_notify_mode (backend, ModeSet, Remote);
 		e_cal_backend_notify_readonly (backend, priv->read_only);
 		if (e_cal_backend_groupwise_is_loaded (backend))
-			      e_cal_backend_notify_auth_required(backend);
+			      e_cal_backend_notify_auth_required (backend);
 		break;
 
 	case CAL_MODE_LOCAL : /* go offline */
@@ -1653,7 +1653,7 @@ e_cal_backend_groupwise_get_object_list (ECalBackendSync *backend, EDataCal *cal
 
 	*objects = NULL;
 
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(cbsexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
 									    &occur_start,
 									    &occur_end);
 	components = prunning_by_time ?
@@ -1956,7 +1956,7 @@ e_cal_backend_groupwise_create_object (ECalBackendSync *backend, EDataCal *cal,
 	e_return_data_cal_error_if_fail (calobj != NULL && *calobj != NULL, InvalidArg);
 
 	if (priv->mode == CAL_MODE_LOCAL) {
-		in_offline(cbgw);
+		in_offline (cbgw);
 		g_propagate_error (error, EDC_ERROR (RepositoryOffline));
 		return;
 	}
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 36e9465..7e1b1c9 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -342,7 +342,7 @@ retrieval_done (SoupSession *session, SoupMessage *msg, ECalBackendHttp *cbhttp)
 				uri_parsed = soup_uri_new (priv->uri);
 				soup_uri_set_path (uri_parsed, newuri);
 				soup_uri_set_query (uri_parsed, NULL);
-				// g_free(newuri);
+				// g_free (newuri);
 
 				newuri = soup_uri_to_string (uri_parsed, FALSE);
 				g_message ("Translated URI: %s\n", newuri);
@@ -953,7 +953,7 @@ e_cal_backend_http_get_object_list (ECalBackendSync *backend, EDataCal *cal, con
 	cbsexp = e_cal_backend_sexp_new (sexp);
 
 	*objects = NULL;
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(cbsexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -1000,7 +1000,7 @@ e_cal_backend_http_start_query (ECalBackend *backend, EDataCalView *query)
 	cbsexp = e_cal_backend_sexp_new (e_data_cal_view_get_text (query));
 
 	objects = NULL;
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(cbsexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (cbsexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -1116,7 +1116,7 @@ create_user_free_busy (ECalBackendHttp *cbhttp, const gchar *address, const gcha
         if (!obj_sexp)
                 return vfb;
 
-        slist = e_cal_backend_store_get_components(store);
+        slist = e_cal_backend_store_get_components (store);
 
         for (l = slist; l; l = g_slist_next (l)) {
                 ECalComponent *comp = l->data;
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index fd3891f..cba40a8 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -303,7 +303,7 @@ getCategory (WeatherInfo *report)
 
 	for (i = 0; categories[i].description; i++) {
 		if (!g_ascii_strncasecmp (categories[i].icon_name,
-					      icon_name, strlen(icon_name)))
+					      icon_name, strlen (icon_name)))
 			return _(categories[i].description);
 	}
 
@@ -633,7 +633,7 @@ e_cal_backend_weather_get_object_list (ECalBackendSync *backend, EDataCal *cal,
 
 	*objects = NULL;
 	components = e_cal_backend_store_get_components (priv->store);
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(sexp,
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp,
 									    &occur_start,
 									    &occur_end);
 
@@ -783,7 +783,7 @@ static void e_cal_backend_weather_start_query (ECalBackend *backend, EDataCalVie
 	}
 
 	objects = NULL;
-	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times(sexp, &occur_start, &occur_end);
+	prunning_by_time = e_cal_backend_sexp_evaluate_occur_times (sexp, &occur_start, &occur_end);
 	components = prunning_by_time ?
 		e_cal_backend_store_get_components_occuring_in_range (priv->store, occur_start, occur_end)
 		: e_cal_backend_store_get_components (priv->store);
diff --git a/calendar/backends/weather/e-weather-source-ccf.c b/calendar/backends/weather/e-weather-source-ccf.c
index 896c71b..f20b802 100644
--- a/calendar/backends/weather/e-weather-source-ccf.c
+++ b/calendar/backends/weather/e-weather-source-ccf.c
@@ -165,17 +165,17 @@ static void
 date2tm (gchar *date, struct tm *times)
 {
 	gchar tmp[3];
-	time_t curtime = time(NULL);
+	time_t curtime = time (NULL);
 	tmp[2] = '\0';
 
 	localtime_r (&curtime, times);
 
 	tmp[0] = date[0]; tmp[1] = date[1];
-	times->tm_mday = atoi(tmp);
+	times->tm_mday = atoi (tmp);
 	tmp[0] = date[2]; tmp[1] = date[3];
-	times->tm_hour = atoi(tmp);
+	times->tm_hour = atoi (tmp);
 	tmp[0] = date[4]; tmp[1] = date[5];
-	times->tm_min = atoi(tmp);
+	times->tm_min = atoi (tmp);
 }
 
 static WeatherConditions
@@ -249,7 +249,7 @@ decodeSnowfall (gchar *data, gfloat *low, gfloat *high)
 static float
 ftoc (gchar *data)
 {
-	gint fahrenheit = atoi(data);
+	gint fahrenheit = atoi (data);
 	if (fahrenheit >= 900)
 		fahrenheit = (fahrenheit - 900) * -1;
 	return ((gfloat)(fahrenheit-32)) * 5.0f / 9.0f;
@@ -283,7 +283,7 @@ e_weather_source_ccf_do_parse (EWeatherSourceCCF *source, gchar *buffer)
 
 	/* fast-forward to the particular station we're interested in */
 	current = g_slist_nth (tokens, 5);
-	while (strcmp(current->data, source->substation))
+	while (strcmp (current->data, source->substation))
 		current = g_slist_next (current);
 	current = g_slist_next (current);
 	/* pick up the first two conditions reports */
@@ -337,7 +337,7 @@ e_weather_source_ccf_do_parse (EWeatherSourceCCF *source, gchar *buffer)
 
 	if (current == NULL || strlen (current->data) == 3) {
 		/* We've got a pre-IFPS station. Realloc and return */
-		WeatherForecast *f = g_new0(WeatherForecast, 2);
+		WeatherForecast *f = g_new0 (WeatherForecast, 2);
 		memcpy (f, forecasts, sizeof (WeatherForecast) * 2);
 		fc = g_list_append (fc, &f[0]);
 		fc = g_list_append (fc, &f[1]);
diff --git a/calendar/libecal/e-cal-check-timezones.c b/calendar/libecal/e-cal-check-timezones.c
index 01cb31a..f987afa 100644
--- a/calendar/libecal/e-cal-check-timezones.c
+++ b/calendar/libecal/e-cal-check-timezones.c
@@ -31,7 +31,7 @@
  * Currently simply strips a suffix introduced by a hyphen,
  * as in "America/Denver-(Standard)".
  */
-static const gchar *e_cal_match_location(const gchar *location)
+static const gchar *e_cal_match_location (const gchar *location)
 {
     icaltimezone *icomp;
     const gchar *tail;
@@ -40,21 +40,21 @@ static const gchar *e_cal_match_location(const gchar *location)
 
     icomp = icaltimezone_get_builtin_timezone (location);
     if (icomp) {
-        return icaltimezone_get_tzid(icomp);
+        return icaltimezone_get_tzid (icomp);
     }
 
     /* try a bit harder by stripping trailing suffix */
-    tail = strrchr(location, '-');
-    len = tail ? (tail - location) : strlen(location);
-    buffer = g_malloc(len + 1);
+    tail = strrchr (location, '-');
+    len = tail ? (tail - location) : strlen (location);
+    buffer = g_malloc (len + 1);
 
     if (buffer) {
-        memcpy(buffer, location, len);
+        memcpy (buffer, location, len);
         buffer[len] = 0;
         icomp = icaltimezone_get_builtin_timezone (buffer);
-        g_free(buffer);
+        g_free (buffer);
         if (icomp) {
-            return icaltimezone_get_tzid(icomp);
+            return icaltimezone_get_tzid (icomp);
         }
     }
 
@@ -71,11 +71,11 @@ static const gchar *e_cal_match_location(const gchar *location)
  * Since: 2.24
  */
 const gchar *
-e_cal_match_tzid(const gchar *tzid)
+e_cal_match_tzid (const gchar *tzid)
 {
     const gchar *location;
     const gchar *systzid = NULL;
-    gsize len = strlen(tzid);
+    gsize len = strlen (tzid);
     gssize eostr;
 
     /*
@@ -87,18 +87,18 @@ e_cal_match_tzid(const gchar *tzid)
      */
     eostr = len - 1;
     while (eostr >= 0 &&
-           isdigit(tzid[eostr])) {
+           isdigit (tzid[eostr])) {
         eostr--;
     }
     while (eostr >= 0 &&
-           isspace(tzid[eostr])) {
+           isspace (tzid[eostr])) {
         eostr--;
     }
     if (eostr + 1 < len) {
-        gchar *strippedtzid = g_strndup(tzid, eostr + 1);
+        gchar *strippedtzid = g_strndup (tzid, eostr + 1);
         if (strippedtzid) {
-            systzid = e_cal_match_tzid(strippedtzid);
-            g_free(strippedtzid);
+            systzid = e_cal_match_tzid (strippedtzid);
+            g_free (strippedtzid);
             if (systzid) {
                 goto done;
             }
@@ -113,8 +113,8 @@ e_cal_match_tzid(const gchar *tzid)
      */
     for (location = tzid;
          location && location[0];
-         location = strchr(location + 1, '/')) {
-        systzid = e_cal_match_location(location[0] == '/' ?
+         location = strchr (location + 1, '/')) {
+        systzid = e_cal_match_location (location[0] == '/' ?
                                        location + 1 :
                                        location);
         if (systzid) {
@@ -142,46 +142,46 @@ e_cal_match_tzid(const gchar *tzid)
     }
 }
 
-static void patch_tzids(icalcomponent *subcomp,
+static void patch_tzids (icalcomponent *subcomp,
                         GHashTable *mapping)
 {
     gchar *tzid = NULL;
 
-    if (icalcomponent_isa(subcomp) != ICAL_VTIMEZONE_COMPONENT) {
-        icalproperty *prop = icalcomponent_get_first_property(subcomp,
+    if (icalcomponent_isa (subcomp) != ICAL_VTIMEZONE_COMPONENT) {
+        icalproperty *prop = icalcomponent_get_first_property (subcomp,
                                                               ICAL_ANY_PROPERTY);
         while (prop) {
-            icalparameter *param = icalproperty_get_first_parameter(prop,
+            icalparameter *param = icalproperty_get_first_parameter (prop,
                                                                     ICAL_TZID_PARAMETER);
             while (param) {
                 const gchar *oldtzid;
                 const gchar *newtzid;
 
-                g_free(tzid);
-                tzid = g_strdup(icalparameter_get_tzid(param));
+                g_free (tzid);
+                tzid = g_strdup (icalparameter_get_tzid (param));
 
-                if (!g_hash_table_lookup_extended(mapping,
+                if (!g_hash_table_lookup_extended (mapping,
                                                   tzid,
                                                   (gpointer *)&oldtzid,
                                                   (gpointer *)&newtzid)) {
                     /* Corresponding VTIMEZONE not seen before! */
-                    newtzid = e_cal_match_tzid(tzid);
+                    newtzid = e_cal_match_tzid (tzid);
                 }
                 if (newtzid) {
-                    icalparameter_set_tzid(param, newtzid);
+                    icalparameter_set_tzid (param, newtzid);
                 }
-                param = icalproperty_get_next_parameter(prop,
+                param = icalproperty_get_next_parameter (prop,
                                                         ICAL_TZID_PARAMETER);
             }
-            prop = icalcomponent_get_next_property(subcomp,
+            prop = icalcomponent_get_next_property (subcomp,
                                                    ICAL_ANY_PROPERTY);
         }
     }
 
-    g_free(tzid);
+    g_free (tzid);
 }
 
-static void addsystemtz(gpointer key,
+static void addsystemtz (gpointer key,
                         gpointer value,
                         gpointer user_data)
 {
@@ -189,10 +189,10 @@ static void addsystemtz(gpointer key,
     icalcomponent *comp = user_data;
     icaltimezone *zone;
 
-    zone = icaltimezone_get_builtin_timezone_from_tzid(tzid);
+    zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
     if (zone) {
-        icalcomponent_add_component(comp,
-                                    icalcomponent_new_clone(icaltimezone_get_component(zone)));
+        icalcomponent_add_component (comp,
+                                    icalcomponent_new_clone (icaltimezone_get_component (zone)));
     }
 }
 
@@ -261,7 +261,7 @@ e_cal_check_timezones (icalcomponent *comp,
 {
     gboolean success = TRUE;
     icalcomponent *subcomp = NULL;
-    icaltimezone *zone = icaltimezone_new();
+    icaltimezone *zone = icaltimezone_new ();
     gchar *key = NULL, *value = NULL;
     gchar *buffer = NULL;
     gchar *zonestr = NULL;
@@ -269,10 +269,10 @@ e_cal_check_timezones (icalcomponent *comp,
     GList *l;
 
     /** a hash from old to new tzid; strings dynamically allocated */
-    GHashTable *mapping = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+    GHashTable *mapping = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
     /** a hash of all system time zone IDs which have to be added; strings are shared with mapping hash */
-    GHashTable *systemtzids = g_hash_table_new(g_str_hash, g_str_equal);
+    GHashTable *systemtzids = g_hash_table_new (g_str_hash, g_str_equal);
 
     *error = NULL;
 
@@ -281,36 +281,36 @@ e_cal_check_timezones (icalcomponent *comp,
     }
 
     /* iterate over all VTIMEZONE definitions */
-    subcomp = icalcomponent_get_first_component(comp,
+    subcomp = icalcomponent_get_first_component (comp,
                                                 ICAL_VTIMEZONE_COMPONENT);
     while (subcomp) {
-        if (icaltimezone_set_component(zone, subcomp)) {
-            g_free(tzid);
-            tzid = g_strdup(icaltimezone_get_tzid(zone));
+        if (icaltimezone_set_component (zone, subcomp)) {
+            g_free (tzid);
+            tzid = g_strdup (icaltimezone_get_tzid (zone));
             if (tzid) {
-                const gchar *newtzid = e_cal_match_tzid(tzid);
+                const gchar *newtzid = e_cal_match_tzid (tzid);
                 if (newtzid) {
                     /* matched against system time zone */
-                    g_free(key);
-                    key = g_strdup(tzid);
+                    g_free (key);
+                    key = g_strdup (tzid);
                     if (!key) {
                         goto nomem;
                     }
 
-                    g_free(value);
-                    value = g_strdup(newtzid);
+                    g_free (value);
+                    value = g_strdup (newtzid);
                     if (!value) {
                         goto nomem;
                     }
 
-                    g_hash_table_insert(mapping, key, value);
-                    g_hash_table_insert(systemtzids, value, NULL);
+                    g_hash_table_insert (mapping, key, value);
+                    g_hash_table_insert (systemtzids, value, NULL);
                     key =
                         value = NULL;
                 } else {
                     gint counter;
 
-                    zonestr = icalcomponent_as_ical_string_r(subcomp);
+                    zonestr = icalcomponent_as_ical_string_r (subcomp);
 
                     /* check for collisions with existing timezones */
                     for (counter = 0;
@@ -319,10 +319,10 @@ e_cal_check_timezones (icalcomponent *comp,
                         icaltimezone *existing_zone;
 
                         if (counter) {
-                            g_free(value);
+                            g_free (value);
                             value = g_strdup_printf("%s %d", tzid, counter);
                         }
-                        existing_zone = tzlookup(counter ? value : tzid,
+                        existing_zone = tzlookup (counter ? value : tzid,
                                                  custom,
                                                  error);
                         if (!existing_zone) {
@@ -332,24 +332,24 @@ e_cal_check_timezones (icalcomponent *comp,
                                 break;
                             }
                         }
-                        g_free(buffer);
-                        buffer = icalcomponent_as_ical_string_r(icaltimezone_get_component(existing_zone));
+                        g_free (buffer);
+                        buffer = icalcomponent_as_ical_string_r (icaltimezone_get_component (existing_zone));
 
                         if (counter) {
                             gchar *fulltzid = g_strdup_printf("TZID:%s", value);
                             gsize baselen = strlen("TZID:") + strlen(tzid);
-                            gsize fulllen = strlen(fulltzid);
+                            gsize fulllen = strlen (fulltzid);
                             gchar *tzidprop;
                             /*
                              * Map TZID with counter suffix back to basename.
                              */
-                            tzidprop = strstr(buffer, fulltzid);
+                            tzidprop = strstr (buffer, fulltzid);
                             if (tzidprop) {
-                                memmove(tzidprop + baselen,
+                                memmove (tzidprop + baselen,
                                         tzidprop + fulllen,
-                                        strlen(tzidprop + fulllen) + 1);
+                                        strlen (tzidprop + fulllen) + 1);
                             }
-                            g_free(fulltzid);
+                            g_free (fulltzid);
                         }
 
                         /*
@@ -362,7 +362,7 @@ e_cal_check_timezones (icalcomponent *comp,
                          * is expected to occur rarely (if at all) in
                          * practice.
                          */
-                        if (!strcmp(zonestr, buffer)) {
+                        if (!strcmp (zonestr, buffer)) {
                             break;
                         }
                     }
@@ -371,16 +371,16 @@ e_cal_check_timezones (icalcomponent *comp,
                         /* does not exist, nothing to do */
                     } else {
                         /* timezone renamed */
-                        icalproperty *prop = icalcomponent_get_first_property(subcomp,
+                        icalproperty *prop = icalcomponent_get_first_property (subcomp,
                                                                               ICAL_TZID_PROPERTY);
                         while (prop) {
                             icalproperty_set_value_from_string(prop, value, "NO");
-                            prop = icalcomponent_get_next_property(subcomp,
+                            prop = icalcomponent_get_next_property (subcomp,
                                                                    ICAL_ANY_PROPERTY);
                         }
-                        g_free(key);
-                        key = g_strdup(tzid);
-                        g_hash_table_insert(mapping, key, value);
+                        g_free (key);
+                        key = g_strdup (tzid);
+                        g_hash_table_insert (mapping, key, value);
                         key =
                             value = NULL;
                     }
@@ -388,14 +388,14 @@ e_cal_check_timezones (icalcomponent *comp,
             }
         }
 
-        subcomp = icalcomponent_get_next_component(comp,
+        subcomp = icalcomponent_get_next_component (comp,
                                                    ICAL_VTIMEZONE_COMPONENT);
     }
 
     /*
      * now replace all TZID parameters in place
      */
-    subcomp = icalcomponent_get_first_component(comp,
+    subcomp = icalcomponent_get_first_component (comp,
                                                 ICAL_ANY_COMPONENT);
     while (subcomp) {
         /*
@@ -408,7 +408,7 @@ e_cal_check_timezones (icalcomponent *comp,
          * added below.
          */
         patch_tzids (subcomp, mapping);
-        subcomp = icalcomponent_get_next_component(comp,
+        subcomp = icalcomponent_get_next_component (comp,
                                                    ICAL_ANY_COMPONENT);
     }
 
@@ -420,7 +420,7 @@ e_cal_check_timezones (icalcomponent *comp,
      * add system time zones that we mapped to: adding them ensures
      * that the VCALENDAR remains consistent
      */
-    g_hash_table_foreach(systemtzids, addsystemtz, comp);
+    g_hash_table_foreach (systemtzids, addsystemtz, comp);
 
     goto done;
  nomem:
@@ -434,19 +434,19 @@ e_cal_check_timezones (icalcomponent *comp,
     success = FALSE;
  done:
     if (mapping) {
-        g_hash_table_destroy(mapping);
+        g_hash_table_destroy (mapping);
     }
     if (systemtzids) {
-        g_hash_table_destroy(systemtzids);
+        g_hash_table_destroy (systemtzids);
     }
     if (zone) {
-        icaltimezone_free(zone, 1);
+        icaltimezone_free (zone, 1);
     }
-    g_free(tzid);
-    g_free(zonestr);
-    g_free(buffer);
-    g_free(key);
-    g_free(value);
+    g_free (tzid);
+    g_free (zonestr);
+    g_free (buffer);
+    g_free (key);
+    g_free (value);
 
     return success;
 }
@@ -505,5 +505,5 @@ e_cal_tzlookup_icomp (const gchar *tzid,
 {
     icalcomponent *icomp = (icalcomponent *)custom;
 
-    return icalcomponent_get_timezone(icomp, (gchar *)tzid);
+    return icalcomponent_get_timezone (icomp, (gchar *)tzid);
 }
diff --git a/calendar/libecal/e-cal-check-timezones.h b/calendar/libecal/e-cal-check-timezones.h
index f2b8bfc..d67af8e 100644
--- a/calendar/libecal/e-cal-check-timezones.h
+++ b/calendar/libecal/e-cal-check-timezones.h
@@ -25,7 +25,7 @@
 
 G_BEGIN_DECLS
 
-gboolean e_cal_check_timezones(icalcomponent *comp,
+gboolean e_cal_check_timezones (icalcomponent *comp,
                                GList *comps,
                                icaltimezone *(*tzlookup)(const gchar *tzid,
                                                          gconstpointer custom,
@@ -33,15 +33,15 @@ gboolean e_cal_check_timezones(icalcomponent *comp,
                                gconstpointer custom,
                                GError **error);
 
-icaltimezone *e_cal_tzlookup_ecal(const gchar *tzid,
+icaltimezone *e_cal_tzlookup_ecal (const gchar *tzid,
                                   gconstpointer custom,
                                   GError **error);
 
-icaltimezone *e_cal_tzlookup_icomp(const gchar *tzid,
+icaltimezone *e_cal_tzlookup_icomp (const gchar *tzid,
                                    gconstpointer custom,
                                    GError **error);
 
-const gchar *e_cal_match_tzid(const gchar *tzid);
+const gchar *e_cal_match_tzid (const gchar *tzid);
 
 G_END_DECLS
 
diff --git a/calendar/libecal/e-cal-component.c b/calendar/libecal/e-cal-component.c
index 9346992..ca3dee4 100644
--- a/calendar/libecal/e-cal-component.c
+++ b/calendar/libecal/e-cal-component.c
@@ -176,7 +176,7 @@ struct _ECalComponentAlarm {
 	/* Properties */
 
 	icalproperty *action;
-	icalproperty *attach; /* FIXME: see scan_alarm_property() below */
+	icalproperty *attach; /* FIXME: see scan_alarm_property () below */
 
 	struct {
 		icalproperty *prop;
@@ -1268,7 +1268,7 @@ ensure_alarm_properties_cb (gpointer key, gpointer value, gpointer data)
 				while (xprop) {
 					str = icalproperty_get_x_name (xprop);
 					if (!strcmp (str, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
-						icalproperty_set_description (prop, icalproperty_get_summary(priv->summary.prop));
+						icalproperty_set_description (prop, icalproperty_get_summary (priv->summary.prop));
 
 						icalcomponent_remove_property (alarm, xprop);
 						icalproperty_free (xprop);
diff --git a/calendar/libecal/e-cal-recur.c b/calendar/libecal/e-cal-recur.c
index 1d9fdb5..1843238 100644
--- a/calendar/libecal/e-cal-recur.c
+++ b/calendar/libecal/e-cal-recur.c
@@ -253,7 +253,7 @@ struct _ECalRecurVTable {
 };
 
 /* This is used to specify which parts of the CalObjTime to compare in
-   cal_obj_time_compare(). */
+   cal_obj_time_compare (). */
 typedef enum {
 	CALOBJ_YEAR,
 	CALOBJ_MONTH,
@@ -685,7 +685,7 @@ e_cal_recur_generate_instances_of_rule (ECalComponent	 *comp,
 	g_return_if_fail (end >= -1);
 
 	/* Get dtstart, dtend, recurrences, and exceptions. Note that
-	   cal_component_get_dtend() will convert a DURATION property to a
+	   cal_component_get_dtend () will convert a DURATION property to a
 	   DTEND so we don't need to worry about that. */
 
 	e_cal_component_get_dtstart (comp, &dtstart);
@@ -1209,7 +1209,7 @@ generate_instances_for_chunk (ECalComponent	*comp,
 
 		p = elem->data;
 
-		tt = icaltime_convert_to_zone(p->start, zone);
+		tt = icaltime_convert_to_zone (p->start, zone);
 		cotime.year     = tt.year;
 		cotime.month    = tt.month - 1;
 		cotime.day      = tt.day;
@@ -1434,7 +1434,7 @@ cal_object_get_rdate_end	(CalObjTime	*occ,
 	p = rdate->period;
 	if (p->type == E_CAL_COMPONENT_PERIOD_DATETIME) {
 		struct icaltimetype tt =
-			icaltime_convert_to_zone(p->u.end, zone);
+			icaltime_convert_to_zone (p->u.end, zone);
 		occ->year     = tt.year;
 		occ->month    = tt.month - 1;
 		occ->day      = tt.day;
@@ -3561,7 +3561,7 @@ cal_obj_time_compare		(CalObjTime *cotime1,
 }
 
 /* This is the same as the above function, but without the comparison type.
-   It is used for qsort(). */
+   It is used for qsort (). */
 static gint
 cal_obj_time_compare_func (gconstpointer arg1,
 			   gconstpointer arg2)
@@ -3851,7 +3851,7 @@ e_cal_recur_ensure_rule_end_date (ECalComponent			*comp,
 	/* Calculate the end date. Note that we initialize end_date to 0, so
 	   if the RULE doesn't generate COUNT instances we save a time_t of 0.
 	   Also note that we use the UTC timezone as the default timezone.
-	   In get_end_date() if the DTSTART is a DATE or floating time, we will
+	   In get_end_date () if the DTSTART is a DATE or floating time, we will
 	   convert the ENDDATE to the current timezone. */
 	cb_data.count = rule.count;
 	cb_data.instances = 0;
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index 295bad3..61ebbb9 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -441,7 +441,7 @@ struct timezone_map_entry
 };
 
 static gchar *
-windows_timezone_string_to_olson(const gchar * windows_tz)
+windows_timezone_string_to_olson (const gchar * windows_tz)
 {
 	/* source: http://www.chronos-st.org/Windows-to-Olson.txt */
 	static const struct timezone_map_entry timezone_map[] = {
@@ -611,11 +611,11 @@ windows_timezone_string_to_olson(const gchar * windows_tz)
 	gint i;
 
 	for (i=0; timezone_map[i].windows_string && windows_tz; i++) {
-		gint res = strcmp( timezone_map[i].windows_string, windows_tz);
+		gint res = strcmp ( timezone_map[i].windows_string, windows_tz);
 		if (res > 0)
 			return NULL;
 		if (res == 0) {
-			return g_strdup(timezone_map[i].olson_string);
+			return g_strdup (timezone_map[i].olson_string);
 		}
 	}
 
@@ -669,7 +669,7 @@ system_timezone_win32_query_registry (void)
 	RegCloseKey (reg_key);
 
 	/* Windows NT and its family */
-	res = RegOpenKeyExA(HKEY_LOCAL_MACHINE,
+	res = RegOpenKeyExA (HKEY_LOCAL_MACHINE,
 		"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
 		0, KEY_READ, &reg_key);
 	if (res != ERROR_SUCCESS) {
diff --git a/calendar/libecal/e-cal-time-util.h b/calendar/libecal/e-cal-time-util.h
index 3e1f01d..7130214 100644
--- a/calendar/libecal/e-cal-time-util.h
+++ b/calendar/libecal/e-cal-time-util.h
@@ -92,7 +92,7 @@ time_t	time_year_begin_with_zone (time_t time, icaltimezone *zone);
 time_t	time_month_begin_with_zone (time_t time, icaltimezone *zone);
 
 /* Returns the start of the week containing the given time_t, using the given
-   timezone. week_start_day should use the same values as mktime(),
+   timezone. week_start_day should use the same values as mktime (),
    i.e. 0 (Sun) to 6 (Sat). */
 time_t	time_week_begin_with_zone (time_t time, gint week_start_day,
 				   icaltimezone *zone);
diff --git a/calendar/libecal/e-cal-util.c b/calendar/libecal/e-cal-util.c
index 0e96504..4a61fcc 100644
--- a/calendar/libecal/e-cal-util.c
+++ b/calendar/libecal/e-cal-util.c
@@ -1181,7 +1181,7 @@ componenttime_to_utc_timet (const ECalComponentDateTime* dt_time,
 
 	if (dt_time->value) {
 		if (dt_time->tzid)
-			zone = tz_cb(dt_time->tzid, tz_cb_data);
+			zone = tz_cb (dt_time->tzid, tz_cb_data);
 
 		// zone = icaltimezone_get_utc_timezone ();
 		timet = icaltime_as_timet_with_zone (*dt_time->value, zone ? zone : default_zone);
@@ -1238,7 +1238,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
 		if (tt) {
 			/* COMPLETED must be in UTC. */
 			completed_time = icaltime_as_timet_with_zone (*tt,
-								      icaltimezone_get_utc_timezone());
+								      icaltimezone_get_utc_timezone ());
 			e_cal_component_free_icaltimetype (tt);
 		}
 
@@ -1249,7 +1249,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
 
 		e_cal_component_free_datetime (&dt_due);
 
-		max_time = MAX(completed_time, due_time);
+		max_time = MAX (completed_time, due_time);
 
 		if (max_time != -1)
 			*end = max_time;
@@ -1307,7 +1307,7 @@ e_cal_util_get_component_occur_times (ECalComponent *comp,
 				/* Check if the end date or duration is set, libical seems to set
 				   second to -1 to denote an unset time */
 				if (p->type != E_CAL_COMPONENT_PERIOD_DATETIME || p->u.end.second != -1)
-					rdate_end = icaltime_as_timet (icaltime_add(p->start, p->u.duration));
+					rdate_end = icaltime_as_timet (icaltime_add (p->start, p->u.duration));
 				else
 					rdate_end = icaltime_as_timet (p->u.end);
 
diff --git a/calendar/libecal/e-cal-view.c b/calendar/libecal/e-cal-view.c
index 0470e9c..b3fdd32 100644
--- a/calendar/libecal/e-cal-view.c
+++ b/calendar/libecal/e-cal-view.c
@@ -32,7 +32,7 @@
 #include "e-cal-view-private.h"
 #include "e-gdbus-egdbuscalview.h"
 
-G_DEFINE_TYPE(ECalView, e_cal_view, G_TYPE_OBJECT);
+G_DEFINE_TYPE (ECalView, e_cal_view, G_TYPE_OBJECT);
 #define E_CAL_VIEW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_CAL_VIEW, ECalViewPrivate))
 
 /* Private part of the ECalView structure */
@@ -189,7 +189,7 @@ e_cal_view_set_property (GObject *object, guint property_id, const GValue *value
 	ECalViewPrivate *priv;
 
 	view = E_CAL_VIEW (object);
-	priv = E_CAL_VIEW_GET_PRIVATE(view);
+	priv = E_CAL_VIEW_GET_PRIVATE (view);
 
 	switch (property_id) {
 	case PROP_VIEW:
@@ -219,7 +219,7 @@ e_cal_view_get_property (GObject *object, guint property_id, GValue *value, GPar
 	ECalViewPrivate *priv;
 
 	view = E_CAL_VIEW (object);
-	priv = E_CAL_VIEW_GET_PRIVATE(view);
+	priv = E_CAL_VIEW_GET_PRIVATE (view);
 
 	switch (property_id) {
 	case PROP_VIEW:
@@ -390,7 +390,7 @@ e_cal_view_start (ECalView *view)
 	g_return_if_fail (view != NULL);
 	g_return_if_fail (E_IS_CAL_VIEW (view));
 
-	priv = E_CAL_VIEW_GET_PRIVATE(view);
+	priv = E_CAL_VIEW_GET_PRIVATE (view);
 
 	if (priv->gdbus_calview) {
 		e_gdbus_cal_view_call_start_sync (priv->gdbus_calview, NULL, &error);
@@ -426,7 +426,7 @@ e_cal_view_stop (ECalView *view)
 	g_return_if_fail (view != NULL);
 	g_return_if_fail (E_IS_CAL_VIEW (view));
 
-	priv = E_CAL_VIEW_GET_PRIVATE(view);
+	priv = E_CAL_VIEW_GET_PRIVATE (view);
 
 	if (priv->gdbus_calview) {
 		e_gdbus_cal_view_call_stop_sync (priv->gdbus_calview, NULL, &error);
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index efdc7c4..29a3986 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -65,7 +65,7 @@ static GStaticRecMutex cal_factory_proxy_lock = G_STATIC_REC_MUTEX_INIT;
 #define LOCK_CACHE()   g_static_rec_mutex_lock   (&priv->cache_lock)
 #define UNLOCK_CACHE() g_static_rec_mutex_unlock (&priv->cache_lock)
 
-G_DEFINE_TYPE(ECal, e_cal, G_TYPE_OBJECT)
+G_DEFINE_TYPE (ECal, e_cal, G_TYPE_OBJECT)
 #define E_CAL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_CAL, ECalPrivate))
 
 static gboolean open_calendar (ECal *ecal, gboolean only_if_exists, GError **error,
@@ -108,7 +108,7 @@ struct _ECalPrivate {
 	gpointer auth_user_data;
 
 	/* A cache of timezones retrieved from the server, to avoid getting
-	   them repeatedly for each get_object() call. */
+	   them repeatedly for each get_object () call. */
 	GHashTable *timezones;
 
 	/* The default timezone to use to resolve DATE and floating DATE-TIME
@@ -142,7 +142,7 @@ static GObjectClass *parent_class;
 
 #ifdef __PRETTY_FUNCTION__
 #define e_return_error_if_fail(expr,error_code)	G_STMT_START{		\
-     if G_LIKELY(expr) { } else						\
+     if G_LIKELY (expr) { } else						\
        {								\
 	 g_log (G_LOG_DOMAIN,						\
 		G_LOG_LEVEL_CRITICAL,					\
@@ -161,7 +161,7 @@ static GObjectClass *parent_class;
        };				}G_STMT_END
 #else
 #define e_return_error_if_fail(expr,error_code)	G_STMT_START{		\
-     if G_LIKELY(expr) { } else						\
+     if G_LIKELY (expr) { } else						\
        {								\
 	 g_log (G_LOG_DOMAIN,						\
 		G_LOG_LEVEL_CRITICAL,					\
@@ -1112,7 +1112,7 @@ build_proxy_pass_key (ECal *ecal, const gchar * parent_user)
 
 	euri = e_uri_new (uri);
 	g_free (euri->user);
-	euri->user = g_strdup(parent_user);
+	euri->user = g_strdup (parent_user);
 
 	euri_str = e_uri_to_string (euri, FALSE);
 
@@ -1716,22 +1716,22 @@ e_cal_get_cal_address (ECal *ecal, gchar **cal_address, GError **error)
 	e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
 	*cal_address = NULL;
 
-	LOCK_CACHE();
+	LOCK_CACHE ();
 	if (priv->cal_address == NULL) {
 		e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
 		if (priv->load_state != E_CAL_LOAD_LOADED) {
-			UNLOCK_CACHE();
+			UNLOCK_CACHE ();
 			E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
 		}
 
 		if (!e_gdbus_cal_call_get_cal_address_sync (priv->gdbus_cal, &priv->cal_address, NULL, error)) {
-			UNLOCK_CACHE();
+			UNLOCK_CACHE ();
 			E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
 		}
 	}
 
 	*cal_address = g_strdup (priv->cal_address);
-	UNLOCK_CACHE();
+	UNLOCK_CACHE ();
 
 	return TRUE;
 }
@@ -1814,19 +1814,19 @@ load_static_capabilities (ECal *ecal, GError **error)
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
 	}
 
-	LOCK_CACHE();
+	LOCK_CACHE ();
 
 	if (priv->capabilities) {
-		UNLOCK_CACHE();
+		UNLOCK_CACHE ();
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_OK, error);
 	}
 
 	if (!e_gdbus_cal_call_get_scheduling_information_sync (priv->gdbus_cal, &priv->capabilities, NULL, error)) {
-		UNLOCK_CACHE();
+		UNLOCK_CACHE ();
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
 	}
 
-	UNLOCK_CACHE();
+	UNLOCK_CACHE ();
 
 	return TRUE;
 }
@@ -3844,14 +3844,14 @@ e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError *
 			icalproperty *prop;
 
 			icalcomp = icalcomponent_new_clone (icaltimezone_get_component (syszone));
-			prop = icalcomponent_get_first_property(icalcomp,
+			prop = icalcomponent_get_first_property (icalcomp,
 								ICAL_ANY_PROPERTY);
 			while (!found && prop) {
-				if (icalproperty_isa(prop) == ICAL_TZID_PROPERTY) {
+				if (icalproperty_isa (prop) == ICAL_TZID_PROPERTY) {
 					icalproperty_set_value_from_string(prop, tzid, "NO");
 					found = TRUE;
 				}
-				prop = icalcomponent_get_next_property(icalcomp,
+				prop = icalcomponent_get_next_property (icalcomp,
 								       ICAL_ANY_PROPERTY);
 			}
 		} else {
@@ -4235,7 +4235,7 @@ e_cal_set_default_source (ESource *source, ECalSourceType type, GError **error)
 static gboolean
 get_sources (ESourceList **sources, const gchar *key, GError **error)
 {
-	GConfClient *gconf = gconf_client_get_default();
+	GConfClient *gconf = gconf_client_get_default ();
 
 	*sources = e_source_list_new_for_gconf (gconf, key);
 	g_object_unref (gconf);
diff --git a/calendar/libedata-cal/e-cal-backend-cache.h b/calendar/libedata-cal/e-cal-backend-cache.h
index d699fd1..c520ea9 100644
--- a/calendar/libedata-cal/e-cal-backend-cache.h
+++ b/calendar/libedata-cal/e-cal-backend-cache.h
@@ -80,9 +80,9 @@ GSList *	e_cal_backend_cache_get_components_by_uid
 						(ECalBackendCache *cache,
 						 const gchar *uid);
 const icaltimezone *
-		e_cal_backend_cache_get_timezone(ECalBackendCache *cache,
+		e_cal_backend_cache_get_timezone (ECalBackendCache *cache,
 						 const gchar *tzid);
-gboolean	e_cal_backend_cache_put_timezone(ECalBackendCache *cache,
+gboolean	e_cal_backend_cache_put_timezone (ECalBackendCache *cache,
 						 const icaltimezone *zone);
 gboolean	e_cal_backend_cache_remove_timezone
 						(ECalBackendCache *cache,
diff --git a/calendar/libedata-cal/e-cal-backend-intervaltree.c b/calendar/libedata-cal/e-cal-backend-intervaltree.c
index c1485f7..95c1c06 100644
--- a/calendar/libedata-cal/e-cal-backend-intervaltree.c
+++ b/calendar/libedata-cal/e-cal-backend-intervaltree.c
@@ -91,7 +91,7 @@ get_direction (EIntervalNode *x, time_t z_start, time_t z_end)
 }
 
 static inline gchar *
-component_key(const gchar *uid, const gchar *rid)
+component_key (const gchar *uid, const gchar *rid)
 {
 	if (rid)
 		return	g_strdup_printf("%s_%s", uid, rid);
@@ -349,7 +349,7 @@ e_intervaltree_insert (EIntervalTree *tree, time_t start, time_t end, ECalCompon
 	priv->root->left->red = FALSE;
 	e_cal_component_get_uid (comp, &uid);
 	rid = e_cal_component_get_recurid_as_string (comp);
-	g_hash_table_insert (priv->id_node_hash, component_key(uid, rid), newNode);
+	g_hash_table_insert (priv->id_node_hash, component_key (uid, rid), newNode);
 	g_free (rid);
 
 	g_static_rec_mutex_unlock (&priv->mutex);
@@ -620,7 +620,7 @@ e_intervaltree_search_component (EIntervalTree *tree,
 		return NULL;
 	}
 
-	return g_hash_table_lookup (priv->id_node_hash, component_key(searched_uid, searched_rid));
+	return g_hash_table_lookup (priv->id_node_hash, component_key (searched_uid, searched_rid));
 }
 
 /**
@@ -707,7 +707,7 @@ e_intervaltree_remove (EIntervalTree *tree,
 			e_intervaltree_fixup_deletion (tree, x);
 	}
 
-	g_hash_table_remove (priv->id_node_hash, component_key(uid, rid));
+	g_hash_table_remove (priv->id_node_hash, component_key (uid, rid));
 
 	g_object_unref (z->comp);
 	g_free (z);
diff --git a/calendar/libedata-cal/e-cal-backend-intervaltree.h b/calendar/libedata-cal/e-cal-backend-intervaltree.h
index 2d6da9f..3c51657 100644
--- a/calendar/libedata-cal/e-cal-backend-intervaltree.h
+++ b/calendar/libedata-cal/e-cal-backend-intervaltree.h
@@ -68,7 +68,7 @@ struct _EIntervalTreeClass
 
 GType		e_intervaltree_get_type	(void);
 
-EIntervalTree* e_intervaltree_new(void);
+EIntervalTree* e_intervaltree_new (void);
 
 gboolean e_intervaltree_insert (EIntervalTree *tree, time_t start, time_t end, ECalComponent *comp);
 
diff --git a/calendar/libedata-cal/e-cal-backend-sexp.c b/calendar/libedata-cal/e-cal-backend-sexp.c
index da2dc12..8e6d5da 100644
--- a/calendar/libedata-cal/e-cal-backend-sexp.c
+++ b/calendar/libedata-cal/e-cal-backend-sexp.c
@@ -440,9 +440,9 @@ func_due_in_time_range (ESExp *esexp, gint argc, ESExpResult **argv, gpointer da
 		zone = resolve_tzid (dt.tzid, ctx);
 		result = e_sexp_result_new (esexp, ESEXP_RES_INT);
 		if (zone)
-			due_t = icaltime_as_timet_with_zone(*dt.value,zone);
+			due_t = icaltime_as_timet_with_zone (*dt.value,zone);
 		else
-			due_t = icaltime_as_timet(*dt.value);
+			due_t = icaltime_as_timet (*dt.value);
 	}
 
 	if (dt.value != NULL && (due_t <= end && due_t >= start))
@@ -569,7 +569,7 @@ matches_classification (ECalComponent *comp, const gchar *str)
 	else
 		classification1 = E_CAL_COMPONENT_CLASS_UNKNOWN;
 
-	e_cal_component_get_classification(comp, &classification);
+	e_cal_component_get_classification (comp, &classification);
 
 	return (classification == classification1 ? TRUE : FALSE);
 }
@@ -1171,7 +1171,7 @@ static struct prop_info {
 };
 
 static ESExpResult *
-entry_compare(SearchContext *ctx, struct _ESExp *f,
+entry_compare (SearchContext *ctx, struct _ESExp *f,
 	      gint argc, struct _ESExpResult **argv,
 	      gchar *(*compare)(const gchar *, const gchar *))
 {
@@ -1201,7 +1201,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
 
 					prop = e_card_simple_get (ctx->card, info->field_id);
 
-					if (prop && compare(prop, argv[1]->value.string)) {
+					if (prop && compare (prop, argv[1]->value.string)) {
 						truth = TRUE;
 					}
 					if ((!prop) && compare("", argv[1]->value.string)) {
@@ -1218,7 +1218,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
 
 					prop = e_card_get_id (ctx->card->card);
 
-					if (prop && compare(prop, argv[1]->value.string)) {
+					if (prop && compare (prop, argv[1]->value.string)) {
 						truth = TRUE;
 					}
 					if ((!prop) && compare("", argv[1]->value.string)) {
@@ -1236,7 +1236,7 @@ entry_compare(SearchContext *ctx, struct _ESExp *f,
 		}
 
 	}
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -1283,7 +1283,7 @@ static struct {
  * Since: 2.32
  */
 gboolean
-e_cal_backend_sexp_evaluate_occur_times(ECalBackendSExp *sexp, time_t *start, time_t *end)
+e_cal_backend_sexp_evaluate_occur_times (ECalBackendSExp *sexp, time_t *start, time_t *end)
 {
 	g_return_val_if_fail (sexp != NULL, FALSE);
 	g_return_val_if_fail (start != NULL, FALSE);
@@ -1320,14 +1320,14 @@ e_cal_backend_sexp_match_comp (ECalBackendSExp *sexp, ECalComponent *comp, ECalB
 		g_object_unref (sexp->priv->search_context->backend);
 		return FALSE;
 	}
-	r = e_sexp_eval(sexp->priv->search_sexp);
+	r = e_sexp_eval (sexp->priv->search_sexp);
 
 	retval = (r && r->type == ESEXP_RES_BOOL && r->value.boolean);
 
 	g_object_unref (sexp->priv->search_context->comp);
 	g_object_unref (sexp->priv->search_context->backend);
 
-	e_sexp_result_free(sexp->priv->search_sexp, r);
+	e_sexp_result_free (sexp->priv->search_sexp, r);
 
 	return retval;
 }
@@ -1380,21 +1380,21 @@ e_cal_backend_sexp_new (const gchar *text)
 	gint esexp_error;
 	gint i;
 
-	sexp->priv->search_sexp = e_sexp_new();
+	sexp->priv->search_sexp = e_sexp_new ();
 	sexp->priv->text = g_strdup (text);
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(sexp->priv->search_sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp->priv->search_sexp, 0, symbols[i].name,
 					     (ESExpIFunc *)symbols[i].func, sexp->priv->search_context);
 		} else {
-			e_sexp_add_function(sexp->priv->search_sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp->priv->search_sexp, 0, symbols[i].name,
 					    symbols[i].func, sexp->priv->search_context);
 		}
 	}
 
-	e_sexp_input_text(sexp->priv->search_sexp, text, strlen(text));
-	esexp_error = e_sexp_parse(sexp->priv->search_sexp);
+	e_sexp_input_text (sexp->priv->search_sexp, text, strlen (text));
+	esexp_error = e_sexp_parse (sexp->priv->search_sexp);
 
 	if (esexp_error == -1) {
 		g_object_unref (sexp);
@@ -1431,7 +1431,7 @@ e_cal_backend_sexp_dispose (GObject *object)
 	ECalBackendSExp *sexp = E_CAL_BACKEND_SEXP (object);
 
 	if (sexp->priv) {
-		e_sexp_unref(sexp->priv->search_sexp);
+		e_sexp_unref (sexp->priv->search_sexp);
 
 		g_free (sexp->priv->text);
 
@@ -1473,7 +1473,7 @@ test_query (const gchar * query)
 	ECalBackendSExp *sexp = e_cal_backend_sexp_new (query);
 	time_t start, end;
 
-	gboolean generator = e_cal_backend_sexp_evaluate_occur_times(sexp, &start, &end);
+	gboolean generator = e_cal_backend_sexp_evaluate_occur_times (sexp, &start, &end);
 
 	if (generator) {
 		printf ("%s: %ld - %ld\n", query, start, end);
@@ -1482,9 +1482,9 @@ test_query (const gchar * query)
 	}
 }
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
-	g_type_init();
+	g_type_init ();
 
 	/* e_sexp_add_variable(f, 0, "test", NULL); */
 
@@ -1508,7 +1508,7 @@ gint main(gint argc, gchar **argv)
 			    " (or (contains? \"substring\") (has-categories? \"blah\"))) (has-alarms?))");
 	}
 	else
-		test_query(argv[1]);
+		test_query (argv[1]);
 
 	return 0;
 }
diff --git a/calendar/libedata-cal/e-cal-backend-store.h b/calendar/libedata-cal/e-cal-backend-store.h
index 56a2883..1a8b6dc 100644
--- a/calendar/libedata-cal/e-cal-backend-store.h
+++ b/calendar/libedata-cal/e-cal-backend-store.h
@@ -131,9 +131,9 @@ gboolean	e_cal_backend_store_has_component
 						 const gchar *uid,
 						 const gchar *rid);
 const icaltimezone *
-		e_cal_backend_store_get_timezone(ECalBackendStore *store,
+		e_cal_backend_store_get_timezone (ECalBackendStore *store,
 						 const gchar *tzid);
-gboolean	e_cal_backend_store_put_timezone(ECalBackendStore *store,
+gboolean	e_cal_backend_store_put_timezone (ECalBackendStore *store,
 						 const icaltimezone *zone);
 gboolean	e_cal_backend_store_remove_timezone
 						(ECalBackendStore *store,
@@ -162,7 +162,7 @@ gboolean	e_cal_backend_store_put_key_value
 						(ECalBackendStore *store,
 						 const gchar *key,
 						 const gchar *value);
-void		e_cal_backend_store_thaw_changes(ECalBackendStore *store);
+void		e_cal_backend_store_thaw_changes (ECalBackendStore *store);
 void		e_cal_backend_store_freeze_changes
 						(ECalBackendStore *store);
 void		e_cal_backend_store_interval_tree_add_comp
diff --git a/calendar/libedata-cal/e-cal-backend-util.c b/calendar/libedata-cal/e-cal-backend-util.c
index 49d5a2b..7df67d4 100644
--- a/calendar/libedata-cal/e-cal-backend-util.c
+++ b/calendar/libedata-cal/e-cal-backend-util.c
@@ -52,7 +52,7 @@ e_cal_backend_mail_account_get_default (gchar **address, gchar **name)
 		g_object_unref (gconf);
 	}
 
-	account = e_account_list_get_default(accounts);
+	account = e_account_list_get_default (accounts);
 	if (account) {
 		*address = g_strdup(account->id->address);
 		*name = g_strdup(account->id->name);
@@ -83,7 +83,7 @@ e_cal_backend_mail_account_is_valid (gchar *user, gchar **name)
 		g_object_unref (gconf);
 	}
 
-	account = e_account_list_find(accounts, E_ACCOUNT_FIND_ID_ADDRESS, user);
+	account = e_account_list_find (accounts, E_ACCOUNT_FIND_ID_ADDRESS, user);
 	if (account)
 		*name = g_strdup(account->id->name);
 
diff --git a/calendar/libedata-cal/e-data-cal-factory.c b/calendar/libedata-cal/e-data-cal-factory.c
index 11267b2..2ec7eda 100644
--- a/calendar/libedata-cal/e-data-cal-factory.c
+++ b/calendar/libedata-cal/e-data-cal-factory.c
@@ -58,7 +58,7 @@ static GMainLoop *loop;
 		}							\
 	} G_STMT_END
 
-G_DEFINE_TYPE(EDataCalFactory, e_data_cal_factory, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EDataCalFactory, e_data_cal_factory, G_TYPE_OBJECT);
 
 #define E_DATA_CAL_FACTORY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), E_TYPE_DATA_CAL_FACTORY, EDataCalFactoryPrivate))
 
@@ -465,9 +465,9 @@ impl_CalFactory_getCal (EGdbusCalFactory *object, GDBusMethodInvocation *invocat
 
 cleanup:
 	/* The reason why the lock is held for such a long time is that there is
-	   a subtle race where e_cal_backend_add_client() can be called just
-	   before e_cal_backend_finalize() is called from the
-	   backend_last_client_gone_cb(), for details see bug 506457. */
+	   a subtle race where e_cal_backend_add_client () can be called just
+	   before e_cal_backend_finalize () is called from the
+	   backend_last_client_gone_cb (), for details see bug 506457. */
 	g_mutex_unlock (priv->backends_mutex);
 
 cleanup2:
@@ -777,7 +777,7 @@ die (const gchar *prefix,
 {
 	g_error ("%s: %s", prefix, error->message);
 	g_error_free (error);
-	exit(1);
+	exit (1);
 }
 
 static void
diff --git a/calendar/libedata-cal/e-data-cal.h b/calendar/libedata-cal/e-data-cal.h
index 95a4401..05a270d 100644
--- a/calendar/libedata-cal/e-data-cal.h
+++ b/calendar/libedata-cal/e-data-cal.h
@@ -77,7 +77,7 @@ const gchar *e_data_cal_status_to_string (EDataCalCallStatus status);
  **/
 #define e_return_data_cal_error_if_fail(expr, _code)				\
 	G_STMT_START {								\
-		if (G_LIKELY(expr)) {						\
+		if (G_LIKELY (expr)) {						\
 		} else {							\
 			g_log (G_LOG_DOMAIN,					\
 				G_LOG_LEVEL_CRITICAL,				\
@@ -122,7 +122,7 @@ void e_data_cal_notify_static_capabilities (EDataCal *cal, EServerMethodContext
 					    const gchar *capabilities);
 
 void e_data_cal_notify_open   (EDataCal *cal, EServerMethodContext context, GError *error);
-void e_data_cal_notify_refresh(EDataCal *cal, EServerMethodContext context, GError *error);
+void e_data_cal_notify_refresh (EDataCal *cal, EServerMethodContext context, GError *error);
 void e_data_cal_notify_remove (EDataCal *cal, EServerMethodContext context, GError *error);
 
 void e_data_cal_notify_object_created  (EDataCal *cal, EServerMethodContext context, GError *error,
diff --git a/calendar/libedata-cal/test-intervaltree.c b/calendar/libedata-cal/test-intervaltree.c
index 9b17177..65a5f37 100644
--- a/calendar/libedata-cal/test-intervaltree.c
+++ b/calendar/libedata-cal/test-intervaltree.c
@@ -181,7 +181,7 @@ unref_comp (gpointer data, gpointer user_data)
 {
 	EInterval *interval = (EInterval*) data;
 	g_object_unref (interval->comp);
-	g_free(data);
+	g_free (data);
 }
 
 /* Not used at the moment. Use it later 
@@ -213,7 +213,7 @@ print_list (GList *l2)
 */
 
 static void
-random_test()
+random_test ()
 {
 	/*
 	 * outline:
@@ -297,12 +297,12 @@ random_test()
 		{
 			e_intervaltree_dump (tree);
 			g_message (G_STRLOC "Error");
-			exit(-1);
+			exit (-1);
 		}
 
 		/* g_print ("OK\n"); */
-		g_list_foreach(l1, (GFunc)g_object_unref, NULL);
-		g_list_foreach(l2, (GFunc)unref_comp, NULL);
+		g_list_foreach (l1, (GFunc)g_object_unref, NULL);
+		g_list_foreach (l2, (GFunc)unref_comp, NULL);
 		g_list_free (l1);
 		g_list_free (l2);
 	}
@@ -325,12 +325,12 @@ random_test()
 		{
 			e_intervaltree_dump (tree);
 			g_message (G_STRLOC "Error");
-			exit(-1);
+			exit (-1);
 		}
 
 		/* g_print ("OK\n"); */
-		g_list_foreach(l1, (GFunc)g_object_unref, NULL);
-		g_list_foreach(l2, (GFunc)unref_comp, NULL);
+		g_list_foreach (l1, (GFunc)g_object_unref, NULL);
+		g_list_foreach (l2, (GFunc)unref_comp, NULL);
 		g_list_free (l1);
 		g_list_free (l2);
 	}
@@ -342,7 +342,7 @@ random_test()
 		/* perhaps we will delete l1 */
 		next = l1->next;
 
-		if (g_rand_double(myrand) < pbality_delete)
+		if (g_rand_double (myrand) < pbality_delete)
 		{
 			ECalComponent *comp;
 			const gchar *uid = NULL;
@@ -364,7 +364,7 @@ random_test()
 				e_intervaltree_dump (tree);
 				g_print ("Deleting interval %d - %d ERROR\n", interval->start,
 					 interval->end);
-				exit(-1);
+				exit (-1);
 			}
 
 			g_free (rid);
@@ -403,8 +403,8 @@ random_test()
 			return;
 		}
 
-		g_list_foreach(l1, (GFunc)g_object_unref, NULL);
-		g_list_foreach(l2, (GFunc)unref_comp, NULL);
+		g_list_foreach (l1, (GFunc)g_object_unref, NULL);
+		g_list_foreach (l2, (GFunc)unref_comp, NULL);
 		g_list_free (l1);
 		g_list_free (l2);
 
@@ -412,7 +412,7 @@ random_test()
 	}
 
 	e_intervaltree_destroy (tree);
-	g_list_foreach(list, (GFunc)unref_comp, NULL);
+	g_list_foreach (list, (GFunc)unref_comp, NULL);
 	g_list_free (list);
 }
 
@@ -422,7 +422,7 @@ main (gint argc, gchar **argv)
 	g_type_init ();
 
 	myrand = g_rand_new ();
-	random_test();
+	random_test ();
 	g_print ("Everything OK\n");
 
 	return 0;
diff --git a/calendar/tests/ecal/ecal-test-utils.c b/calendar/tests/ecal/ecal-test-utils.c
index bae6a6e..a195e6d 100644
--- a/calendar/tests/ecal/ecal-test-utils.c
+++ b/calendar/tests/ecal/ecal-test-utils.c
@@ -105,7 +105,7 @@ ecal_test_utils_cal_open (ECal     *cal,
 
                 g_warning ("failed to open calendar: `%s': %s", uri,
                                 error->message);
-                exit(1);
+                exit (1);
         }
 }
 
@@ -158,7 +158,7 @@ ecal_test_utils_cal_remove (ECal *cal)
 
         if (!e_cal_remove (cal, &error)) {
                 g_warning ("failed to remove calendar; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully removed the temporary calendar\n");
 
@@ -173,7 +173,7 @@ ecal_test_utils_cal_get_alarm_email_address (ECal *cal)
 
         if (!e_cal_get_alarm_email_address (cal, &address, &error)) {
                 g_warning ("failed to get alarm email address; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got the alarm email address\n");
 
@@ -188,7 +188,7 @@ ecal_test_utils_cal_get_cal_address (ECal *cal)
 
         if (!e_cal_get_cal_address (cal, &address, &error)) {
                 g_warning ("failed to get calendar address; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got the calendar address\n");
 
@@ -203,7 +203,7 @@ ecal_test_utils_cal_get_ldap_attribute (ECal *cal)
 
         if (!e_cal_get_ldap_attribute (cal, &attr, &error)) {
                 g_warning ("failed to get ldap attribute; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got the ldap attribute\n");
 
@@ -349,11 +349,11 @@ ecal_test_utils_cal_get_object (ECal       *cal,
 
         if (!e_cal_get_object (cal, uid, NULL, &component, &error)) {
                 g_warning ("failed to get icalcomponent object '%s'; %s\n", uid, error->message);
-                exit(1);
+                exit (1);
         }
         if (!icalcomponent_is_valid (component)) {
                 g_warning ("retrieved icalcomponent is invalid\n");
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got the icalcomponent object '%s'\n", uid);
 
@@ -369,11 +369,11 @@ ecal_test_utils_cal_modify_object (ECal          *cal,
 
         if (!icalcomponent_is_valid (component)) {
                 g_warning (G_STRLOC ": icalcomponent argument is invalid\n");
-                exit(1);
+                exit (1);
         }
         if (!e_cal_modify_object (cal, component, mod_type, &error)) {
                 g_warning ("failed to modify icalcomponent object; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully modified the icalcomponent object\n");
 }
@@ -386,7 +386,7 @@ ecal_test_utils_cal_remove_object (ECal       *cal,
 
         if (!e_cal_remove_object (cal, uid, &error)) {
                 g_warning ("failed to remove icalcomponent object '%s'; %s\n", uid, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully remoed the icalcomponent object '%s'\n", uid);
 }
@@ -399,11 +399,11 @@ ecal_test_utils_cal_get_default_object (ECal *cal)
 
         if (!e_cal_get_default_object (cal, &component, &error)) {
                 g_warning ("failed to get default icalcomponent object; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
         if (!icalcomponent_is_valid (component)) {
                 g_warning ("default icalcomponent is invalid\n");
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got the default icalcomponent object\n");
 
@@ -419,7 +419,7 @@ ecal_test_utils_cal_get_object_list (ECal       *cal,
 
         if (!e_cal_get_object_list (cal, query, &objects, &error)) {
                 g_warning ("failed to get list of icalcomponent objects for query '%s'; %s\n", query, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got list of icalcomponent objects for the query '%s'\n", query);
 
@@ -435,7 +435,7 @@ ecal_test_utils_cal_get_objects_for_uid (ECal       *cal,
 
         if (!e_cal_get_objects_for_uid (cal, uid, &objects, &error)) {
                 g_warning ("failed to get icalcomponent objects for UID '%s'; %s\n", uid, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got objects for the icalcomponent with UID '%s'\n", uid);
 
@@ -452,12 +452,12 @@ ecal_test_utils_cal_create_object (ECal          *cal,
 
         if (!icalcomponent_is_valid (component)) {
                 g_warning ("supplied icalcomponent is invalid\n");
-                exit(1);
+                exit (1);
         }
 
         if (!e_cal_create_object (cal, component, &uid, &error)) {
                 g_warning ("failed to get create an icalcomponent object; %s\n", error->message);
-                exit(1);
+                exit (1);
         }
 
 	ical_string = icalcomponent_as_ical_string (component);
@@ -571,7 +571,7 @@ ecal_test_utils_cal_get_timezone (ECal       *cal,
 
         if (!e_cal_get_timezone (cal, tzid, &zone, &error)) {
                 g_warning ("failed to get icaltimezone* for ID '%s'; %s\n", tzid, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully got icaltimezone* for ID '%s'\n", tzid);
 
@@ -589,7 +589,7 @@ ecal_test_utils_cal_add_timezone (ECal         *cal,
 
         if (!e_cal_add_timezone (cal, zone, &error)) {
                 g_warning ("failed to add icaltimezone '%s'; %s\n", name, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully added icaltimezone '%s'\n", name);
 }
@@ -605,7 +605,7 @@ ecal_test_utils_cal_set_default_timezone (ECal         *cal,
 
         if (!e_cal_set_default_timezone (cal, zone, &error)) {
                 g_warning ("failed to set default icaltimezone '%s'; %s\n", name, error->message);
-                exit(1);
+                exit (1);
         }
         test_print ("successfully set default icaltimezone '%s'\n", name);
 }
diff --git a/calendar/tests/ecal/test-ecal.c b/calendar/tests/ecal/test-ecal.c
index 9a73841..1e9bd69 100644
--- a/calendar/tests/ecal/test-ecal.c
+++ b/calendar/tests/ecal/test-ecal.c
@@ -275,7 +275,7 @@ test_object_removal (ECal *client)
 	if (!e_cal_create_object (client, icalcomp, &uid, &error)) {
 		cl_printf (client, "Test object removal - Object creation:  %s\n", error->message);
 		g_object_unref (comp);
-		g_object_unref(icalcomp);
+		g_object_unref (icalcomp);
 		return "Test Object Removal failed\n";
 	}
 
@@ -444,7 +444,7 @@ test_e_cal_remove (ECal *ecal, const gchar *uri)
 #endif
 
 static const gchar *
-test_new_system_calendar(void)
+test_new_system_calendar (void)
 {
 	ECal *cal;
 	const gchar *user_data_dir;
@@ -465,7 +465,7 @@ test_new_system_calendar(void)
 }
 
 static const gchar *
-test_new_system_tasks(void)
+test_new_system_tasks (void)
 {
 	ECal *cal;
 	const gchar *user_data_dir;
@@ -486,7 +486,7 @@ test_new_system_tasks(void)
 }
 
 static const gchar *
-test_new_system_memos(void)
+test_new_system_memos (void)
 {
 	ECal *cal;
 	const gchar *user_data_dir;
@@ -630,7 +630,7 @@ test_timezones (ECal *client)
 }
 
 static const gchar *
-all_tests(ECal *client, const gchar *uri)
+all_tests (ECal *client, const gchar *uri)
 {
 	gchar *uid;
 
diff --git a/calendar/tests/ecal/test-recur.c b/calendar/tests/ecal/test-recur.c
index 6dc7902..c18aef7 100644
--- a/calendar/tests/ecal/test-recur.c
+++ b/calendar/tests/ecal/test-recur.c
@@ -19,7 +19,7 @@ main (gint argc, gchar **argv)
 
 	if (!e_cal_open (ecal, TRUE, NULL)) {
 		printf ("failed to open calendar\n");
-		exit(0);
+		exit (0);
 	}
 
 	g_object_unref (ecal);
diff --git a/calendar/tests/ecal/test-search.c b/calendar/tests/ecal/test-search.c
index bc2e734..ded2825 100644
--- a/calendar/tests/ecal/test-search.c
+++ b/calendar/tests/ecal/test-search.c
@@ -20,12 +20,12 @@ main (gint argc, gchar **argv)
 
 	if (!e_cal_open (ecal, TRUE, NULL)) {
 		printf ("failed to open calendar\n");
-		exit(0);
+		exit (0);
 	}
 
 	if (!e_cal_get_object_list_as_comp (ecal, argv[2], &objects, NULL)) {
 		printf ("failed to get objects\n");
-		exit(0);
+		exit (0);
 	}
 
 	printf ("Received %d objects\n", g_list_length (objects));
diff --git a/camel/camel-address.c b/camel/camel-address.c
index 772e28b..937cd4f 100644
--- a/camel/camel-address.c
+++ b/camel/camel-address.c
@@ -46,7 +46,7 @@ camel_address_class_init (CamelAddressClass *class)
 static void
 camel_address_init (CamelAddress *address)
 {
-	address->addresses = g_ptr_array_new();
+	address->addresses = g_ptr_array_new ();
 }
 
 /**
@@ -149,7 +149,7 @@ camel_address_encode (CamelAddress *addr)
  * Returns: the number of addresses parsed or %-1 on fail
  **/
 gint
-camel_address_unformat(CamelAddress *addr, const gchar *raw)
+camel_address_unformat (CamelAddress *addr, const gchar *raw)
 {
 	CamelAddressClass *class;
 
@@ -221,8 +221,8 @@ camel_address_copy (CamelAddress *dest, CamelAddress *source)
 	g_return_val_if_fail (CAMEL_IS_ADDRESS (dest), -1);
 	g_return_val_if_fail (CAMEL_IS_ADDRESS (source), -1);
 
-	camel_address_remove(dest, -1);
-	return camel_address_cat(dest, source);
+	camel_address_remove (dest, -1);
+	return camel_address_cat (dest, source);
 }
 
 /**
diff --git a/camel/camel-block-file.c b/camel/camel-block-file.c
index bec9a5a..a910e58 100644
--- a/camel/camel-block-file.c
+++ b/camel/camel-block-file.c
@@ -65,19 +65,19 @@ struct _CamelBlockFilePrivate {
 static GStaticMutex block_file_lock = G_STATIC_MUTEX_INIT;
 
 /* lru cache of block files */
-static CamelDList block_file_list = CAMEL_DLIST_INITIALISER(block_file_list);
+static CamelDList block_file_list = CAMEL_DLIST_INITIALISER (block_file_list);
 /* list to store block files that are actually intialised */
-static CamelDList block_file_active_list = CAMEL_DLIST_INITIALISER(block_file_active_list);
+static CamelDList block_file_active_list = CAMEL_DLIST_INITIALISER (block_file_active_list);
 static gint block_file_count = 0;
 static gint block_file_threshhold = 10;
 
-static gint sync_nolock(CamelBlockFile *bs);
-static gint sync_block_nolock(CamelBlockFile *bs, CamelBlock *bl);
+static gint sync_nolock (CamelBlockFile *bs);
+static gint sync_block_nolock (CamelBlockFile *bs, CamelBlock *bl);
 
 G_DEFINE_TYPE (CamelBlockFile, camel_block_file, CAMEL_TYPE_OBJECT)
 
 static gint
-block_file_validate_root(CamelBlockFile *bs)
+block_file_validate_root (CamelBlockFile *bs)
 {
 	CamelBlockRoot *br;
 	struct stat st;
@@ -98,7 +98,7 @@ block_file_validate_root(CamelBlockFile *bs)
 	d(printf("flags: %s\n", (br->flags & CAMEL_BLOCK_FILE_SYNC)?"SYNC":"unSYNC"));
 
 	if (br->last == 0
-	    || memcmp(bs->root->version, bs->version, 8) != 0
+	    || memcmp (bs->root->version, bs->version, 8) != 0
 	    || br->block_size != bs->block_size
 	    || (br->free % bs->block_size) != 0
 	    || (br->last % bs->block_size) != 0
@@ -126,12 +126,12 @@ block_file_validate_root(CamelBlockFile *bs)
 }
 
 static gint
-block_file_init_root(CamelBlockFile *bs)
+block_file_init_root (CamelBlockFile *bs)
 {
 	CamelBlockRoot *br = bs->root;
 
-	memset(br, 0, bs->block_size);
-	memcpy(br->version, bs->version, 8);
+	memset (br, 0, bs->block_size);
+	memcpy (br->version, bs->version, 8);
 	br->last = bs->block_size;
 	br->flags = CAMEL_BLOCK_FILE_SYNC;
 	br->free = 0;
@@ -141,7 +141,7 @@ block_file_init_root(CamelBlockFile *bs)
 }
 
 static void
-block_file_finalize(GObject *object)
+block_file_finalize (GObject *object)
 {
 	CamelBlockFile *bs = CAMEL_BLOCK_FILE (object);
 	CamelBlock *bl, *bn;
@@ -150,21 +150,21 @@ block_file_finalize(GObject *object)
 	p = bs->priv;
 
 	if (bs->root_block)
-		camel_block_file_sync(bs);
+		camel_block_file_sync (bs);
 
 	/* remove from lru list */
-	LOCK(block_file_lock);
+	LOCK (block_file_lock);
 	if (bs->fd != -1)
 		block_file_count--;
-	camel_dlist_remove((CamelDListNode *)p);
-	UNLOCK(block_file_lock);
+	camel_dlist_remove ((CamelDListNode *)p);
+	UNLOCK (block_file_lock);
 
 	bl = (CamelBlock *)bs->block_cache.head;
 	bn = bl->next;
 	while (bn) {
 		if (bl->refcount != 0)
 			g_warning("Block '%u' still referenced", bl->id);
-		g_free(bl);
+		g_free (bl);
 		bl = bn;
 		bn = bn->next;
 	}
@@ -172,23 +172,23 @@ block_file_finalize(GObject *object)
 	g_hash_table_destroy (bs->blocks);
 
 	if (bs->root_block)
-		camel_block_file_unref_block(bs, bs->root_block);
-	g_free(bs->path);
+		camel_block_file_unref_block (bs, bs->root_block);
+	g_free (bs->path);
 	if (bs->fd != -1)
-		close(bs->fd);
+		close (bs->fd);
 
 	g_static_mutex_free (&p->io_lock);
 	g_static_mutex_free (&p->cache_lock);
 	g_static_mutex_free (&p->root_lock);
 
-	g_free(p);
+	g_free (p);
 
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (camel_block_file_parent_class)->finalize (object);
 }
 
 static void
-camel_block_file_class_init(CamelBlockFileClass *class)
+camel_block_file_class_init (CamelBlockFileClass *class)
 {
 	GObjectClass *object_class;
 
@@ -200,25 +200,25 @@ camel_block_file_class_init(CamelBlockFileClass *class)
 }
 
 static guint
-block_hash_func(gconstpointer v)
+block_hash_func (gconstpointer v)
 {
-	return ((camel_block_t) GPOINTER_TO_UINT(v)) >> CAMEL_BLOCK_SIZE_BITS;
+	return ((camel_block_t) GPOINTER_TO_UINT (v)) >> CAMEL_BLOCK_SIZE_BITS;
 }
 
 static void
-camel_block_file_init(CamelBlockFile *bs)
+camel_block_file_init (CamelBlockFile *bs)
 {
 	struct _CamelBlockFilePrivate *p;
 
 	bs->fd = -1;
 	bs->block_size = CAMEL_BLOCK_SIZE;
-	camel_dlist_init(&bs->block_cache);
-	bs->blocks = g_hash_table_new((GHashFunc)block_hash_func, NULL);
+	camel_dlist_init (&bs->block_cache);
+	bs->blocks = g_hash_table_new ((GHashFunc)block_hash_func, NULL);
 	/* this cache size and the text index size have been tuned for about the best
 	   with moderate memory usage.  Doubling the memory usage barely affects performance. */
 	bs->block_cache_limit = 256;
 
-	p = bs->priv = g_malloc0(sizeof(*bs->priv));
+	p = bs->priv = g_malloc0 (sizeof (*bs->priv));
 	p->base = bs;
 
 	g_static_mutex_init (&p->root_lock);
@@ -226,8 +226,8 @@ camel_block_file_init(CamelBlockFile *bs)
 	g_static_mutex_init (&p->io_lock);
 
 	/* link into lru list */
-	LOCK(block_file_lock);
-	camel_dlist_addhead(&block_file_list, (CamelDListNode *)p);
+	LOCK (block_file_lock);
+	camel_dlist_addhead (&block_file_list, (CamelDListNode *)p);
 
 #if 0
 	{
@@ -241,12 +241,12 @@ camel_block_file_init(CamelBlockFile *bs)
 	}
 #endif
 
-	UNLOCK(block_file_lock);
+	UNLOCK (block_file_lock);
 }
 
 /* 'use' a block file for io */
 static gint
-block_file_use(CamelBlockFile *bs)
+block_file_use (CamelBlockFile *bs)
 {
 	struct _CamelBlockFilePrivate *nw, *nn, *p = bs->priv;
 	CamelBlockFile *bf;
@@ -261,28 +261,28 @@ block_file_use(CamelBlockFile *bs)
 	    add it back to end of active list
 	*/
 
-	CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, io_lock);
 
 	if (bs->fd != -1)
 		return 0;
 	else if (p->deleted) {
-		CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
+		CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
 		errno = ENOENT;
 		return -1;
 	} else {
 		d(printf("Turning block file online: %s\n", bs->path));
 	}
 
-	if ((bs->fd = g_open(bs->path, bs->flags|O_BINARY, 0600)) == -1) {
+	if ((bs->fd = g_open (bs->path, bs->flags|O_BINARY, 0600)) == -1) {
 		err = errno;
-		CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
+		CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
 		errno = err;
 		return -1;
 	}
 
-	LOCK(block_file_lock);
-	camel_dlist_remove((CamelDListNode *)p);
-	camel_dlist_addtail(&block_file_active_list, (CamelDListNode *)p);
+	LOCK (block_file_lock);
+	camel_dlist_remove ((CamelDListNode *)p);
+	camel_dlist_addtail (&block_file_active_list, (CamelDListNode *)p);
 
 	block_file_count++;
 
@@ -298,42 +298,42 @@ block_file_use(CamelBlockFile *bs)
 				if (CAMEL_BLOCK_FILE_TRYLOCK (bf, cache_lock)) {
 					if (CAMEL_BLOCK_FILE_TRYLOCK (bf, io_lock)) {
 						d(printf("[%d] Turning block file offline: %s\n", block_file_count-1, bf->path));
-						sync_nolock(bf);
-						close(bf->fd);
+						sync_nolock (bf);
+						close (bf->fd);
 						bf->fd = -1;
 						block_file_count--;
-						CAMEL_BLOCK_FILE_UNLOCK(bf, io_lock);
+						CAMEL_BLOCK_FILE_UNLOCK (bf, io_lock);
 					}
-					CAMEL_BLOCK_FILE_UNLOCK(bf, cache_lock);
+					CAMEL_BLOCK_FILE_UNLOCK (bf, cache_lock);
 				}
-				CAMEL_BLOCK_FILE_UNLOCK(bf, root_lock);
+				CAMEL_BLOCK_FILE_UNLOCK (bf, root_lock);
 			}
 		}
 		nw = nn;
 		nn = nw->next;
 	}
 
-	UNLOCK(block_file_lock);
+	UNLOCK (block_file_lock);
 
 	return 0;
 }
 
 static void
-block_file_unuse(CamelBlockFile *bs)
+block_file_unuse (CamelBlockFile *bs)
 {
-	LOCK(block_file_lock);
-	camel_dlist_remove((CamelDListNode *)bs->priv);
-	camel_dlist_addtail(&block_file_list, (CamelDListNode *)bs->priv);
-	UNLOCK(block_file_lock);
+	LOCK (block_file_lock);
+	camel_dlist_remove ((CamelDListNode *)bs->priv);
+	camel_dlist_addtail (&block_file_list, (CamelDListNode *)bs->priv);
+	UNLOCK (block_file_lock);
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
 }
 
 /*
-o = camel_cache_get(c, key);
-camel_cache_unref(c, key);
-camel_cache_add(c, key, o);
-camel_cache_remove(c, key);
+o = camel_cache_get (c, key);
+camel_cache_unref (c, key);
+camel_cache_add (c, key, o);
+camel_cache_remove (c, key);
 */
 
 /**
@@ -360,8 +360,8 @@ camel_block_file_new (const gchar *path,
 	CamelBlockFile *bs;
 
 	bs = g_object_new (CAMEL_TYPE_BLOCK_FILE, NULL);
-	memcpy(bs->version, version, 8);
-	bs->path = g_strdup(path);
+	memcpy (bs->version, version, 8);
+	bs->path = g_strdup (path);
 	bs->flags = flags;
 
 	bs->root_block = camel_block_file_get_block (bs, 0);
@@ -369,7 +369,7 @@ camel_block_file_new (const gchar *path,
 		g_object_unref (bs);
 		return NULL;
 	}
-	camel_block_file_detach_block(bs, bs->root_block);
+	camel_block_file_detach_block (bs, bs->root_block);
 	bs->root = (CamelBlockRoot *)&bs->root_block->data;
 
 	/* we only need these flags on first open */
@@ -378,29 +378,29 @@ camel_block_file_new (const gchar *path,
 	class = CAMEL_BLOCK_FILE_GET_CLASS (bs);
 
 	/* Do we need to init the root block? */
-	if (class->validate_root(bs) == -1) {
+	if (class->validate_root (bs) == -1) {
 		d(printf("Initialise root block: %.8s\n", version));
 
-		class->init_root(bs);
-		camel_block_file_touch_block(bs, bs->root_block);
-		if (block_file_use(bs) == -1) {
+		class->init_root (bs);
+		camel_block_file_touch_block (bs, bs->root_block);
+		if (block_file_use (bs) == -1) {
 			g_object_unref (bs);
 			return NULL;
 		}
-		if (sync_block_nolock(bs, bs->root_block) == -1
-		    || ftruncate(bs->fd, bs->root->last) == -1) {
-			block_file_unuse(bs);
+		if (sync_block_nolock (bs, bs->root_block) == -1
+		    || ftruncate (bs->fd, bs->root->last) == -1) {
+			block_file_unuse (bs);
 			g_object_unref (bs);
 			return NULL;
 		}
-		block_file_unuse(bs);
+		block_file_unuse (bs);
 	}
 
 	return bs;
 }
 
 gint
-camel_block_file_rename(CamelBlockFile *bs, const gchar *path)
+camel_block_file_rename (CamelBlockFile *bs, const gchar *path)
 {
 	gint ret;
 	struct stat st;
@@ -409,50 +409,50 @@ camel_block_file_rename(CamelBlockFile *bs, const gchar *path)
 	g_return_val_if_fail (CAMEL_IS_BLOCK_FILE (bs), -1);
 	g_return_val_if_fail (path != NULL, -1);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, io_lock);
 
-	ret = g_rename(bs->path, path);
+	ret = g_rename (bs->path, path);
 	if (ret == -1) {
 		/* Maybe the rename actually worked */
 		err = errno;
-		if (g_stat(path, &st) == 0
-		    && g_stat(bs->path, &st) == -1
+		if (g_stat (path, &st) == 0
+		    && g_stat (bs->path, &st) == -1
 		    && errno == ENOENT)
 			ret = 0;
 		errno = err;
 	}
 
 	if (ret != -1) {
-		g_free(bs->path);
-		bs->path = g_strdup(path);
+		g_free (bs->path);
+		bs->path = g_strdup (path);
 	}
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
 
 	return ret;
 }
 
 gint
-camel_block_file_delete(CamelBlockFile *bs)
+camel_block_file_delete (CamelBlockFile *bs)
 {
 	gint ret;
 
 	g_return_val_if_fail (CAMEL_IS_BLOCK_FILE (bs), -1);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, io_lock);
 
 	if (bs->fd != -1) {
-		LOCK(block_file_lock);
+		LOCK (block_file_lock);
 		block_file_count--;
-		UNLOCK(block_file_lock);
-		close(bs->fd);
+		UNLOCK (block_file_lock);
+		close (bs->fd);
 		bs->fd = -1;
 	}
 
 	bs->priv->deleted = TRUE;
-	ret = g_unlink(bs->path);
+	ret = g_unlink (bs->path);
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, io_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, io_lock);
 
 	return ret;
 
@@ -474,7 +474,7 @@ camel_block_file_new_block (CamelBlockFile *bs)
 
 	g_return_val_if_fail (CAMEL_IS_BLOCK_FILE (bs), NULL);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, root_lock);
 
 	if (bs->root->free) {
 		bl = camel_block_file_get_block (bs, bs->root->free);
@@ -491,9 +491,9 @@ camel_block_file_new_block (CamelBlockFile *bs)
 	bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
 
 	bl->flags |= CAMEL_BLOCK_DIRTY;
-	memset(bl->data, 0, CAMEL_BLOCK_SIZE);
+	memset (bl->data, 0, CAMEL_BLOCK_SIZE);
 fail:
-	CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, root_lock);
 
 	return bl;
 }
@@ -517,15 +517,15 @@ camel_block_file_free_block (CamelBlockFile *bs,
 	if (bl == NULL)
 		return -1;
 
-	CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, root_lock);
 
 	((camel_block_t *)bl->data)[0] = bs->root->free;
 	bs->root->free = bl->id;
 	bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
 	bl->flags |= CAMEL_BLOCK_DIRTY;
-	camel_block_file_unref_block(bs, bl);
+	camel_block_file_unref_block (bs, bl);
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, root_lock);
 
 	return 0;
 }
@@ -557,41 +557,41 @@ camel_block_file_get_block (CamelBlockFile *bs,
 		return NULL;
 	}
 
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
-	bl = g_hash_table_lookup(bs->blocks, GUINT_TO_POINTER(id));
+	bl = g_hash_table_lookup (bs->blocks, GUINT_TO_POINTER (id));
 
 	d(printf("Get  block %08x: %s\n", id, bl?"cached":"must read"));
 
 	if (bl == NULL) {
 		/* LOCK io_lock */
-		if (block_file_use(bs) == -1) {
-			CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
+		if (block_file_use (bs) == -1) {
+			CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
 			return NULL;
 		}
 
-		bl = g_malloc0(sizeof(*bl));
+		bl = g_malloc0 (sizeof (*bl));
 		bl->id = id;
-		if (lseek(bs->fd, id, SEEK_SET) == -1 ||
+		if (lseek (bs->fd, id, SEEK_SET) == -1 ||
 		    camel_read (bs->fd, (gchar *) bl->data, CAMEL_BLOCK_SIZE, NULL) == -1) {
-			block_file_unuse(bs);
-			CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-			g_free(bl);
+			block_file_unuse (bs);
+			CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
+			g_free (bl);
 			return NULL;
 		}
 
 		bs->block_cache_count++;
-		g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
+		g_hash_table_insert (bs->blocks, GUINT_TO_POINTER (bl->id), bl);
 
 		/* flush old blocks */
 		flush = (CamelBlock *)bs->block_cache.tailpred;
 		prev = flush->prev;
 		while (bs->block_cache_count > bs->block_cache_limit && prev) {
 			if (flush->refcount == 0) {
-				if (sync_block_nolock(bs, flush) != -1) {
-					g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(flush->id));
-					camel_dlist_remove((CamelDListNode *)flush);
-					g_free(flush);
+				if (sync_block_nolock (bs, flush) != -1) {
+					g_hash_table_remove (bs->blocks, GUINT_TO_POINTER (flush->id));
+					camel_dlist_remove ((CamelDListNode *)flush);
+					g_free (flush);
 					bs->block_cache_count--;
 				}
 			}
@@ -599,15 +599,15 @@ camel_block_file_get_block (CamelBlockFile *bs,
 			prev = prev->prev;
 		}
 		/* UNLOCK io_lock */
-		block_file_unuse(bs);
+		block_file_unuse (bs);
 	} else {
-		camel_dlist_remove((CamelDListNode *)bl);
+		camel_dlist_remove ((CamelDListNode *)bl);
 	}
 
-	camel_dlist_addhead(&bs->block_cache, (CamelDListNode *)bl);
+	camel_dlist_addhead (&bs->block_cache, (CamelDListNode *)bl);
 	bl->refcount++;
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
 
 	d(printf("Got  block %08x\n", id));
 
@@ -625,18 +625,18 @@ camel_block_file_get_block (CamelBlockFile *bs,
  * fills.
  **/
 void
-camel_block_file_detach_block(CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_detach_block (CamelBlockFile *bs, CamelBlock *bl)
 {
 	g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
 	g_return_if_fail (bl != NULL);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
-	g_hash_table_remove(bs->blocks, GUINT_TO_POINTER(bl->id));
-	camel_dlist_remove((CamelDListNode *)bl);
+	g_hash_table_remove (bs->blocks, GUINT_TO_POINTER (bl->id));
+	camel_dlist_remove ((CamelDListNode *)bl);
 	bl->flags |= CAMEL_BLOCK_DETACHED;
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
 }
 
 /**
@@ -647,18 +647,18 @@ camel_block_file_detach_block(CamelBlockFile *bs, CamelBlock *bl)
  * Reattach a block that has been detached.
  **/
 void
-camel_block_file_attach_block(CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_attach_block (CamelBlockFile *bs, CamelBlock *bl)
 {
 	g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
 	g_return_if_fail (bl != NULL);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
-	g_hash_table_insert(bs->blocks, GUINT_TO_POINTER(bl->id), bl);
-	camel_dlist_addtail(&bs->block_cache, (CamelDListNode *)bl);
+	g_hash_table_insert (bs->blocks, GUINT_TO_POINTER (bl->id), bl);
+	camel_dlist_addtail (&bs->block_cache, (CamelDListNode *)bl);
 	bl->flags &= ~CAMEL_BLOCK_DETACHED;
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
 }
 
 /**
@@ -670,13 +670,13 @@ camel_block_file_attach_block(CamelBlockFile *bs, CamelBlock *bl)
  * it ever expires from the cache.
  **/
 void
-camel_block_file_touch_block(CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_touch_block (CamelBlockFile *bs, CamelBlock *bl)
 {
 	g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
 	g_return_if_fail (bl != NULL);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, root_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
 	bl->flags |= CAMEL_BLOCK_DIRTY;
 
@@ -684,11 +684,11 @@ camel_block_file_touch_block(CamelBlockFile *bs, CamelBlock *bl)
 		d(printf("turning off sync flag\n"));
 		bs->root->flags &= ~CAMEL_BLOCK_FILE_SYNC;
 		bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
-		camel_block_file_sync_block(bs, bs->root_block);
+		camel_block_file_sync_block (bs, bs->root_block);
 	}
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-	CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, root_lock);
 }
 
 /**
@@ -703,29 +703,29 @@ camel_block_file_touch_block(CamelBlockFile *bs, CamelBlock *bl)
  * block will be freed.
  **/
 void
-camel_block_file_unref_block(CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_unref_block (CamelBlockFile *bs, CamelBlock *bl)
 {
 	g_return_if_fail (CAMEL_IS_BLOCK_FILE (bs));
 	g_return_if_fail (bl != NULL);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
 	if (bl->refcount == 1 && (bl->flags & CAMEL_BLOCK_DETACHED))
-		g_free(bl);
+		g_free (bl);
 	else
 		bl->refcount--;
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
 }
 
 static gint
-sync_block_nolock(CamelBlockFile *bs, CamelBlock *bl)
+sync_block_nolock (CamelBlockFile *bs, CamelBlock *bl)
 {
 	d(printf("Sync block %08x: %s\n", bl->id, (bl->flags & CAMEL_BLOCK_DIRTY)?"dirty":"clean"));
 
 	if (bl->flags & CAMEL_BLOCK_DIRTY) {
-		if (lseek(bs->fd, bl->id, SEEK_SET) == -1
-		    || write(bs->fd, bl->data, CAMEL_BLOCK_SIZE) != CAMEL_BLOCK_SIZE) {
+		if (lseek (bs->fd, bl->id, SEEK_SET) == -1
+		    || write (bs->fd, bl->data, CAMEL_BLOCK_SIZE) != CAMEL_BLOCK_SIZE) {
 			return -1;
 		}
 		bl->flags &= ~CAMEL_BLOCK_DIRTY;
@@ -735,7 +735,7 @@ sync_block_nolock(CamelBlockFile *bs, CamelBlock *bl)
 }
 
 static gint
-sync_nolock(CamelBlockFile *bs)
+sync_nolock (CamelBlockFile *bs)
 {
 	CamelBlock *bl, *bn;
 	gint work = FALSE;
@@ -745,7 +745,7 @@ sync_nolock(CamelBlockFile *bs)
 	while (bn) {
 		if (bl->flags & CAMEL_BLOCK_DIRTY) {
 			work = TRUE;
-			if (sync_block_nolock(bs, bl) == -1)
+			if (sync_block_nolock (bs, bl) == -1)
 				return -1;
 		}
 		bl = bn;
@@ -762,7 +762,7 @@ sync_nolock(CamelBlockFile *bs)
 	bs->root->flags |= CAMEL_BLOCK_FILE_SYNC;
 	bs->root_block->flags |= CAMEL_BLOCK_DIRTY;
 
-	return sync_block_nolock(bs, bs->root_block);
+	return sync_block_nolock (bs, bs->root_block);
 }
 
 /**
@@ -776,7 +776,7 @@ sync_nolock(CamelBlockFile *bs)
  * Returns: -1 on io error.
  **/
 gint
-camel_block_file_sync_block(CamelBlockFile *bs, CamelBlock *bl)
+camel_block_file_sync_block (CamelBlockFile *bs, CamelBlock *bl)
 {
 	gint ret;
 
@@ -784,12 +784,12 @@ camel_block_file_sync_block(CamelBlockFile *bs, CamelBlock *bl)
 	g_return_val_if_fail (bl != NULL, -1);
 
 	/* LOCK io_lock */
-	if (block_file_use(bs) == -1)
+	if (block_file_use (bs) == -1)
 		return -1;
 
-	ret = sync_block_nolock(bs, bl);
+	ret = sync_block_nolock (bs, bl);
 
-	block_file_unuse(bs);
+	block_file_unuse (bs);
 
 	return ret;
 }
@@ -803,25 +803,25 @@ camel_block_file_sync_block(CamelBlockFile *bs, CamelBlock *bl)
  * Returns: -1 on io error.
  **/
 gint
-camel_block_file_sync(CamelBlockFile *bs)
+camel_block_file_sync (CamelBlockFile *bs)
 {
 	gint ret;
 
 	g_return_val_if_fail (CAMEL_IS_BLOCK_FILE (bs), -1);
 
-	CAMEL_BLOCK_FILE_LOCK(bs, root_lock);
-	CAMEL_BLOCK_FILE_LOCK(bs, cache_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, root_lock);
+	CAMEL_BLOCK_FILE_LOCK (bs, cache_lock);
 
 	/* LOCK io_lock */
-	if (block_file_use(bs) == -1)
+	if (block_file_use (bs) == -1)
 		ret = -1;
 	else {
-		ret = sync_nolock(bs);
-		block_file_unuse(bs);
+		ret = sync_nolock (bs);
+		block_file_unuse (bs);
 	}
 
-	CAMEL_BLOCK_FILE_UNLOCK(bs, cache_lock);
-	CAMEL_BLOCK_FILE_UNLOCK(bs, root_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, cache_lock);
+	CAMEL_BLOCK_FILE_UNLOCK (bs, root_lock);
 
 	return ret;
 }
@@ -844,41 +844,41 @@ struct _CamelKeyFilePrivate {
 static GStaticMutex key_file_lock = G_STATIC_MUTEX_INIT;
 
 /* lru cache of block files */
-static CamelDList key_file_list = CAMEL_DLIST_INITIALISER(key_file_list);
-static CamelDList key_file_active_list = CAMEL_DLIST_INITIALISER(key_file_active_list);
+static CamelDList key_file_list = CAMEL_DLIST_INITIALISER (key_file_list);
+static CamelDList key_file_active_list = CAMEL_DLIST_INITIALISER (key_file_active_list);
 static gint key_file_count = 0;
 static const gint key_file_threshhold = 10;
 
 G_DEFINE_TYPE (CamelKeyFile, camel_key_file, CAMEL_TYPE_OBJECT)
 
 static void
-key_file_finalize(GObject *object)
+key_file_finalize (GObject *object)
 {
 	CamelKeyFile *bs = CAMEL_KEY_FILE (object);
 	struct _CamelKeyFilePrivate *p = bs->priv;
 
-	LOCK(key_file_lock);
-	camel_dlist_remove((CamelDListNode *)p);
+	LOCK (key_file_lock);
+	camel_dlist_remove ((CamelDListNode *)p);
 
 	if (bs-> fp) {
 		key_file_count--;
-		fclose(bs->fp);
+		fclose (bs->fp);
 	}
 
-	UNLOCK(key_file_lock);
+	UNLOCK (key_file_lock);
 
-	g_free(bs->path);
+	g_free (bs->path);
 
 	g_static_mutex_free (&p->lock);
 
-	g_free(p);
+	g_free (p);
 
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (camel_key_file_parent_class)->finalize (object);
 }
 
 static void
-camel_key_file_class_init(CamelKeyFileClass *class)
+camel_key_file_class_init (CamelKeyFileClass *class)
 {
 	GObjectClass *object_class;
 
@@ -887,23 +887,23 @@ camel_key_file_class_init(CamelKeyFileClass *class)
 }
 
 static void
-camel_key_file_init(CamelKeyFile *bs)
+camel_key_file_init (CamelKeyFile *bs)
 {
 	struct _CamelKeyFilePrivate *p;
 
-	p = bs->priv = g_malloc0(sizeof(*bs->priv));
+	p = bs->priv = g_malloc0 (sizeof (*bs->priv));
 	p->base = bs;
 
 	g_static_mutex_init (&p->lock);
 
-	LOCK(key_file_lock);
-	camel_dlist_addhead(&key_file_list, (CamelDListNode *)p);
-	UNLOCK(key_file_lock);
+	LOCK (key_file_lock);
+	camel_dlist_addhead (&key_file_list, (CamelDListNode *)p);
+	UNLOCK (key_file_lock);
 }
 
 /* 'use' a key file for io */
 static gint
-key_file_use(CamelKeyFile *bs)
+key_file_use (CamelKeyFile *bs)
 {
 	struct _CamelKeyFilePrivate *nw, *nn, *p = bs->priv;
 	CamelKeyFile *bf;
@@ -921,12 +921,12 @@ key_file_use(CamelKeyFile *bs)
 
 	/* TODO: Check header on reset? */
 
-	CAMEL_KEY_FILE_LOCK(bs, lock);
+	CAMEL_KEY_FILE_LOCK (bs, lock);
 
 	if (bs->fp != NULL)
 		return 0;
 	else if (p->deleted) {
-		CAMEL_KEY_FILE_UNLOCK(bs, lock);
+		CAMEL_KEY_FILE_UNLOCK (bs, lock);
 		errno = ENOENT;
 		return -1;
 	} else {
@@ -938,19 +938,19 @@ key_file_use(CamelKeyFile *bs)
 	else
 		flag = "a+b";
 
-	if ((fd = g_open(bs->path, bs->flags|O_BINARY, 0600)) == -1
-	    || (bs->fp = fdopen(fd, flag)) == NULL) {
+	if ((fd = g_open (bs->path, bs->flags|O_BINARY, 0600)) == -1
+	    || (bs->fp = fdopen (fd, flag)) == NULL) {
 		err = errno;
 		if (fd != -1)
-			close(fd);
-		CAMEL_KEY_FILE_UNLOCK(bs, lock);
+			close (fd);
+		CAMEL_KEY_FILE_UNLOCK (bs, lock);
 		errno = err;
 		return -1;
 	}
 
-	LOCK(key_file_lock);
-	camel_dlist_remove((CamelDListNode *)p);
-	camel_dlist_addtail(&key_file_active_list, (CamelDListNode *)p);
+	LOCK (key_file_lock);
+	camel_dlist_remove ((CamelDListNode *)p);
+	camel_dlist_addtail (&key_file_active_list, (CamelDListNode *)p);
 
 	key_file_count++;
 
@@ -964,30 +964,30 @@ key_file_use(CamelKeyFile *bs)
 			   to lock the key_file_lock, so we need to check and abort if so */
 			if (CAMEL_BLOCK_FILE_TRYLOCK (bf, lock)) {
 				d(printf("Turning key file offline: %s\n", bf->path));
-				fclose(bf->fp);
+				fclose (bf->fp);
 				bf->fp = NULL;
 				key_file_count--;
-				CAMEL_BLOCK_FILE_UNLOCK(bf, lock);
+				CAMEL_BLOCK_FILE_UNLOCK (bf, lock);
 			}
 		}
 		nw = nn;
 		nn = nw->next;
 	}
 
-	UNLOCK(key_file_lock);
+	UNLOCK (key_file_lock);
 
 	return 0;
 }
 
 static void
-key_file_unuse(CamelKeyFile *bs)
+key_file_unuse (CamelKeyFile *bs)
 {
-	LOCK(key_file_lock);
-	camel_dlist_remove((CamelDListNode *)bs->priv);
-	camel_dlist_addtail(&key_file_list, (CamelDListNode *)bs->priv);
-	UNLOCK(key_file_lock);
+	LOCK (key_file_lock);
+	camel_dlist_remove ((CamelDListNode *)bs->priv);
+	camel_dlist_addtail (&key_file_list, (CamelDListNode *)bs->priv);
+	UNLOCK (key_file_lock);
 
-	CAMEL_KEY_FILE_UNLOCK(bs, lock);
+	CAMEL_KEY_FILE_UNLOCK (bs, lock);
 }
 
 /**
@@ -1003,7 +1003,7 @@ key_file_unuse(CamelKeyFile *bs)
  * be opened/created/initialised.
  **/
 CamelKeyFile *
-camel_key_file_new(const gchar *path, gint flags, const gchar version[8])
+camel_key_file_new (const gchar *path, gint flags, const gchar version[8])
 {
 	CamelKeyFile *kf;
 	goffset last;
@@ -1012,25 +1012,25 @@ camel_key_file_new(const gchar *path, gint flags, const gchar version[8])
 	d(printf("New key file '%s'\n", path));
 
 	kf = g_object_new (CAMEL_TYPE_KEY_FILE, NULL);
-	kf->path = g_strdup(path);
+	kf->path = g_strdup (path);
 	kf->fp = NULL;
 	kf->flags = flags;
 	kf->last = 8;
 
-	if (key_file_use(kf) == -1) {
+	if (key_file_use (kf) == -1) {
 		g_object_unref (kf);
 		kf = NULL;
 	} else {
-		fseek(kf->fp, 0, SEEK_END);
-		last = ftell(kf->fp);
+		fseek (kf->fp, 0, SEEK_END);
+		last = ftell (kf->fp);
 		if (last == 0) {
-			fwrite(version, 8, 1, kf->fp);
+			fwrite (version, 8, 1, kf->fp);
 			last += 8;
 		}
 		kf->last = last;
 
-		err = ferror(kf->fp);
-		key_file_unuse(kf);
+		err = ferror (kf->fp);
+		key_file_unuse (kf);
 
 		/* we only need these flags on first open */
 		kf->flags &= ~(O_CREAT|O_EXCL|O_TRUNC);
@@ -1045,7 +1045,7 @@ camel_key_file_new(const gchar *path, gint flags, const gchar version[8])
 }
 
 gint
-camel_key_file_rename(CamelKeyFile *kf, const gchar *path)
+camel_key_file_rename (CamelKeyFile *kf, const gchar *path)
 {
 	gint ret;
 	struct stat st;
@@ -1054,50 +1054,50 @@ camel_key_file_rename(CamelKeyFile *kf, const gchar *path)
 	g_return_val_if_fail (CAMEL_IS_KEY_FILE (kf), -1);
 	g_return_val_if_fail (path != NULL, -1);
 
-	CAMEL_KEY_FILE_LOCK(kf, lock);
+	CAMEL_KEY_FILE_LOCK (kf, lock);
 
-	ret = g_rename(kf->path, path);
+	ret = g_rename (kf->path, path);
 	if (ret == -1) {
 		/* Maybe the rename actually worked */
 		err = errno;
-		if (g_stat(path, &st) == 0
-		    && g_stat(kf->path, &st) == -1
+		if (g_stat (path, &st) == 0
+		    && g_stat (kf->path, &st) == -1
 		    && errno == ENOENT)
 			ret = 0;
 		errno = err;
 	}
 
 	if (ret != -1) {
-		g_free(kf->path);
-		kf->path = g_strdup(path);
+		g_free (kf->path);
+		kf->path = g_strdup (path);
 	}
 
-	CAMEL_KEY_FILE_UNLOCK(kf, lock);
+	CAMEL_KEY_FILE_UNLOCK (kf, lock);
 
 	return ret;
 }
 
 gint
-camel_key_file_delete(CamelKeyFile *kf)
+camel_key_file_delete (CamelKeyFile *kf)
 {
 	gint ret;
 
 	g_return_val_if_fail (CAMEL_IS_KEY_FILE (kf), -1);
 
-	CAMEL_KEY_FILE_LOCK(kf, lock);
+	CAMEL_KEY_FILE_LOCK (kf, lock);
 
 	if (kf->fp) {
-		LOCK(key_file_lock);
+		LOCK (key_file_lock);
 		key_file_count--;
-		UNLOCK(key_file_lock);
-		fclose(kf->fp);
+		UNLOCK (key_file_lock);
+		fclose (kf->fp);
 		kf->fp = NULL;
 	}
 
 	kf->priv->deleted = TRUE;
-	ret = g_unlink(kf->path);
+	ret = g_unlink (kf->path);
 
-	CAMEL_KEY_FILE_UNLOCK(kf, lock);
+	CAMEL_KEY_FILE_UNLOCK (kf, lock);
 
 	return ret;
 
@@ -1115,7 +1115,7 @@ camel_key_file_delete(CamelKeyFile *kf)
  * Returns: -1 on io error.  The key file will remain unchanged.
  **/
 gint
-camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_key_t *records)
+camel_key_file_write (CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_key_t *records)
 {
 	camel_block_t next;
 	guint32 size;
@@ -1133,28 +1133,28 @@ camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_k
 	}
 
 	/* LOCK */
-	if (key_file_use(kf) == -1)
+	if (key_file_use (kf) == -1)
 		return -1;
 
 	size = len;
 
 	/* FIXME: Use io util functions? */
 	next = kf->last;
-	fseek(kf->fp, kf->last, SEEK_SET);
-	fwrite(parent, sizeof(*parent), 1, kf->fp);
-	fwrite(&size, sizeof(size), 1, kf->fp);
-	fwrite(records, sizeof(records[0]), len, kf->fp);
+	fseek (kf->fp, kf->last, SEEK_SET);
+	fwrite (parent, sizeof (*parent), 1, kf->fp);
+	fwrite (&size, sizeof (size), 1, kf->fp);
+	fwrite (records, sizeof (records[0]), len, kf->fp);
 
-	if (ferror(kf->fp)) {
-		clearerr(kf->fp);
+	if (ferror (kf->fp)) {
+		clearerr (kf->fp);
 	} else {
-		kf->last = ftell(kf->fp);
+		kf->last = ftell (kf->fp);
 		*parent = next;
 		ret = len;
 	}
 
 	/* UNLOCK */
-	key_file_unuse(kf);
+	key_file_unuse (kf);
 
 	d(printf(" new parent = %08x\n", *parent));
 
@@ -1174,7 +1174,7 @@ camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_k
  * Returns: -1 on io error.
  **/
 gint
-camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_key_t **records)
+camel_key_file_read (CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_key_t **records)
 {
 	guint32 size;
 	glong pos;
@@ -1189,14 +1189,14 @@ camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_ke
 		return 0;
 
 	/* LOCK */
-	if (key_file_use(kf) == -1)
+	if (key_file_use (kf) == -1)
 		return -1;
 
-	if (fseek(kf->fp, pos, SEEK_SET) == -1
-	    || fread(&next, sizeof(next), 1, kf->fp) != 1
-	    || fread(&size, sizeof(size), 1, kf->fp) != 1
+	if (fseek (kf->fp, pos, SEEK_SET) == -1
+	    || fread (&next, sizeof (next), 1, kf->fp) != 1
+	    || fread (&size, sizeof (size), 1, kf->fp) != 1
 	    || size > 1024) {
-		clearerr(kf->fp);
+		clearerr (kf->fp);
 		goto fail;
 	}
 
@@ -1204,10 +1204,10 @@ camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_ke
 		*len = size;
 
 	if (records) {
-		camel_key_t *keys = g_malloc(size * sizeof(camel_key_t));
+		camel_key_t *keys = g_malloc (size * sizeof (camel_key_t));
 
-		if (fread(keys, sizeof(camel_key_t), size, kf->fp) != size) {
-			g_free(keys);
+		if (fread (keys, sizeof (camel_key_t), size, kf->fp) != size) {
+			g_free (keys);
 			goto fail;
 		}
 		*records = keys;
@@ -1218,7 +1218,7 @@ camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_ke
 	ret = 0;
 fail:
 	/* UNLOCK */
-	key_file_unuse(kf);
+	key_file_unuse (kf);
 
 	return ret;
 }
diff --git a/camel/camel-block-file.h b/camel/camel-block-file.h
index 1fa4007..b6649a1 100644
--- a/camel/camel-block-file.h
+++ b/camel/camel-block-file.h
@@ -183,14 +183,14 @@ struct _CamelKeyFileClass {
 	CamelObjectClass parent;
 };
 
-GType      camel_key_file_get_type(void);
+GType      camel_key_file_get_type (void);
 
-CamelKeyFile * camel_key_file_new(const gchar *path, gint flags, const gchar version[8]);
-gint	       camel_key_file_rename(CamelKeyFile *kf, const gchar *path);
-gint	       camel_key_file_delete(CamelKeyFile *kf);
+CamelKeyFile * camel_key_file_new (const gchar *path, gint flags, const gchar version[8]);
+gint	       camel_key_file_rename (CamelKeyFile *kf, const gchar *path);
+gint	       camel_key_file_delete (CamelKeyFile *kf);
 
-gint            camel_key_file_write(CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_key_t *records);
-gint            camel_key_file_read(CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_key_t **records);
+gint            camel_key_file_write (CamelKeyFile *kf, camel_block_t *parent, gsize len, camel_key_t *records);
+gint            camel_key_file_read (CamelKeyFile *kf, camel_block_t *start, gsize *len, camel_key_t **records);
 
 G_END_DECLS
 
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
index ee329d5..4608e70 100644
--- a/camel/camel-certdb.c
+++ b/camel/camel-certdb.c
@@ -521,7 +521,7 @@ certdb_cert_free (CamelCertDB *certdb, CamelCert *cert)
 	g_free (cert->hostname);
 	g_free (cert->fingerprint);
 	if (cert->rawcert)
-		g_byte_array_free(cert->rawcert, TRUE);
+		g_byte_array_free (cert->rawcert, TRUE);
 }
 
 void
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index 60f8a49..8dbdefc 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -326,12 +326,12 @@ camel_charset_step (CamelCharset *cc, const gchar *in, gint len)
 	level = cc->level;
 
 	/* check what charset a given string will fit in */
-	while ((c = camel_utf8_getc_limit(&inptr, inend)) != 0xffff) {
+	while ((c = camel_utf8_getc_limit (&inptr, inend)) != 0xffff) {
 		if (c < 0xffff) {
-			mask &= charset_mask(c);
+			mask &= charset_mask (c);
 
 			if (c>=128 && c<256)
-				level = MAX(level, 1);
+				level = MAX (level, 1);
 			else if (c>=256)
 				level = 2;
 		} else {
@@ -347,7 +347,7 @@ camel_charset_step (CamelCharset *cc, const gchar *in, gint len)
 
 /* gets the best charset from the mask of chars in it */
 static const gchar *
-camel_charset_best_mask(guint mask)
+camel_charset_best_mask (guint mask)
 {
 	const gchar *locale_lang, *lang;
 	gint i;
diff --git a/camel/camel-charset-map.h b/camel/camel-charset-map.h
index 119117b..e0909f6 100644
--- a/camel/camel-charset-map.h
+++ b/camel/camel-charset-map.h
@@ -37,13 +37,13 @@ struct _CamelCharset {
 	gint level;
 };
 
-void camel_charset_init(CamelCharset *);
-void camel_charset_step(CamelCharset *, const gchar *in, gint len);
+void camel_charset_init (CamelCharset *);
+void camel_charset_step (CamelCharset *, const gchar *in, gint len);
 
 const gchar *camel_charset_best_name (CamelCharset *);
 
 /* helper function */
-const gchar *camel_charset_best(const gchar *in, gint len);
+const gchar *camel_charset_best (const gchar *in, gint len);
 
 const gchar *camel_charset_iso_to_windows (const gchar *isocharset);
 
diff --git a/camel/camel-cipher-context.h b/camel/camel-cipher-context.h
index 910901c..7b5a5d3 100644
--- a/camel/camel-cipher-context.h
+++ b/camel/camel-cipher-context.h
@@ -171,7 +171,7 @@ struct _CamelCipherContextClass {
 GType		camel_cipher_context_get_type	(void);
 CamelCipherContext *
 		camel_cipher_context_new	(CamelSession *session);
-CamelSession *	camel_cipher_context_get_session(CamelCipherContext *context);
+CamelSession *	camel_cipher_context_get_session (CamelCipherContext *context);
 
 /* cipher context util routines */
 CamelCipherHash	     camel_cipher_id_to_hash (CamelCipherContext *context, const gchar *id);
@@ -206,8 +206,8 @@ void                 camel_cipher_validity_set_valid (CamelCipherValidity *valid
 gchar                *camel_cipher_validity_get_description (CamelCipherValidity *validity);
 void                 camel_cipher_validity_set_description (CamelCipherValidity *validity, const gchar *description);
 void                 camel_cipher_validity_clear (CamelCipherValidity *validity);
-CamelCipherValidity *camel_cipher_validity_clone(CamelCipherValidity *vin);
-void		     camel_cipher_validity_add_certinfo(CamelCipherValidity *vin, camel_cipher_validity_mode_t mode, const gchar *name, const gchar *email);
+CamelCipherValidity *camel_cipher_validity_clone (CamelCipherValidity *vin);
+void		     camel_cipher_validity_add_certinfo (CamelCipherValidity *vin, camel_cipher_validity_mode_t mode, const gchar *name, const gchar *email);
 void		     camel_cipher_validity_add_certinfo_ex (
 					CamelCipherValidity *vin,
 					camel_cipher_validity_mode_t mode,
@@ -216,11 +216,11 @@ void		     camel_cipher_validity_add_certinfo_ex (
 					gpointer cert_data,
 					void (*cert_data_free) (gpointer cert_data),
 					gpointer (*cert_data_clone) (gpointer cert_data));
-void		     camel_cipher_validity_envelope(CamelCipherValidity *parent, CamelCipherValidity *valid);
+void		     camel_cipher_validity_envelope (CamelCipherValidity *parent, CamelCipherValidity *valid);
 void                 camel_cipher_validity_free (CamelCipherValidity *validity);
 
 /* utility functions */
-gint		     camel_cipher_canonical_to_stream(CamelMimePart *part, guint32 flags, CamelStream *ostream, GError **error);
+gint		     camel_cipher_canonical_to_stream (CamelMimePart *part, guint32 flags, CamelStream *ostream, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/camel-data-cache.c b/camel/camel-data-cache.c
index f33b9b0..a575c6c 100644
--- a/camel/camel-data-cache.c
+++ b/camel/camel-data-cache.c
@@ -241,7 +241,7 @@ camel_data_cache_set_path (CamelDataCache *cdc,
  * age acts as a hard limit on cache entries.
  **/
 void
-camel_data_cache_set_expire_age(CamelDataCache *cdc, time_t when)
+camel_data_cache_set_expire_age (CamelDataCache *cdc, time_t when)
 {
 	cdc->priv->expire_age = when;
 }
@@ -262,13 +262,13 @@ camel_data_cache_set_expire_age(CamelDataCache *cdc, time_t when)
  * age acts as a hard limit on cache entries.
  **/
 void
-camel_data_cache_set_expire_access(CamelDataCache *cdc, time_t when)
+camel_data_cache_set_expire_access (CamelDataCache *cdc, time_t when)
 {
 	cdc->priv->expire_access = when;
 }
 
 static void
-data_cache_expire(CamelDataCache *cdc, const gchar *path, const gchar *keep, time_t now)
+data_cache_expire (CamelDataCache *cdc, const gchar *path, const gchar *keep, time_t now)
 {
 	GDir *dir;
 	const gchar *dname;
@@ -276,30 +276,30 @@ data_cache_expire(CamelDataCache *cdc, const gchar *path, const gchar *keep, tim
 	struct stat st;
 	CamelStream *stream;
 
-	dir = g_dir_open(path, 0, NULL);
+	dir = g_dir_open (path, 0, NULL);
 	if (dir == NULL)
 		return;
 
 	s = g_string_new("");
-	while ((dname = g_dir_read_name(dir))) {
-		if (strcmp(dname, keep) == 0)
+	while ((dname = g_dir_read_name (dir))) {
+		if (strcmp (dname, keep) == 0)
 			continue;
 
 		g_string_printf (s, "%s/%s", path, dname);
-		if (g_stat(s->str, &st) == 0
-		    && S_ISREG(st.st_mode)
+		if (g_stat (s->str, &st) == 0
+		    && S_ISREG (st.st_mode)
 		    && ((cdc->priv->expire_age != -1 && st.st_mtime + cdc->priv->expire_age < now)
 			|| (cdc->priv->expire_access != -1 && st.st_atime + cdc->priv->expire_access < now))) {
-			g_unlink(s->str);
-			stream = camel_object_bag_get(cdc->priv->busy_bag, s->str);
+			g_unlink (s->str);
+			stream = camel_object_bag_get (cdc->priv->busy_bag, s->str);
 			if (stream) {
-				camel_object_bag_remove(cdc->priv->busy_bag, stream);
+				camel_object_bag_remove (cdc->priv->busy_bag, stream);
 				g_object_unref (stream);
 			}
 		}
 	}
-	g_string_free(s, TRUE);
-	g_dir_close(dir);
+	g_string_free (s, TRUE);
+	g_dir_close (dir);
 }
 
 /* Since we have to stat the directory anyway, we use this opportunity to
@@ -307,18 +307,18 @@ data_cache_expire(CamelDataCache *cdc, const gchar *path, const gchar *keep, tim
    If it is this directories 'turn', and we haven't done it for CYCLE_TIME seconds,
    then we perform an expiry run */
 static gchar *
-data_cache_path(CamelDataCache *cdc, gint create, const gchar *path, const gchar *key)
+data_cache_path (CamelDataCache *cdc, gint create, const gchar *path, const gchar *key)
 {
 	gchar *dir, *real, *tmp;
 	guint32 hash;
 
-	hash = g_str_hash(key);
+	hash = g_str_hash (key);
 	hash = (hash>>5)&CAMEL_DATA_CACHE_MASK;
-	dir = alloca(strlen(cdc->priv->path) + strlen(path) + 8);
+	dir = alloca (strlen (cdc->priv->path) + strlen (path) + 8);
 	sprintf(dir, "%s/%s/%02x", cdc->priv->path, path, hash);
 
 #ifdef G_OS_WIN32
-	if (g_access(dir, F_OK) == -1) {
+	if (g_access (dir, F_OK) == -1) {
 #else
 	if (access (dir, F_OK) == -1) {
 #endif
@@ -328,16 +328,16 @@ data_cache_path(CamelDataCache *cdc, gint create, const gchar *path, const gchar
 		time_t now;
 
 		/* This has a race, but at worst we re-run an expire cycle which is safe */
-		now = time(NULL);
+		now = time (NULL);
 		if (cdc->priv->expire_last[hash] + CAMEL_DATA_CACHE_CYCLE_TIME < now) {
 			cdc->priv->expire_last[hash] = now;
-			data_cache_expire(cdc, dir, key, now);
+			data_cache_expire (cdc, dir, key, now);
 		}
 	}
 
-	tmp = camel_file_util_safe_filename(key);
+	tmp = camel_file_util_safe_filename (key);
 	real = g_strdup_printf("%s/%s", dir, tmp);
-	g_free(tmp);
+	g_free (tmp);
 
 	return real;
 }
@@ -369,15 +369,15 @@ camel_data_cache_add (CamelDataCache *cdc,
 	gchar *real;
 	CamelStream *stream;
 
-	real = data_cache_path(cdc, TRUE, path, key);
+	real = data_cache_path (cdc, TRUE, path, key);
 	/* need to loop 'cause otherwise we can call bag_add/bag_abort
 	 * after bag_reserve returned a pointer, which is an invalid
 	 * sequence. */
 	do {
-		stream = camel_object_bag_reserve(cdc->priv->busy_bag, real);
+		stream = camel_object_bag_reserve (cdc->priv->busy_bag, real);
 		if (stream) {
-			g_unlink(real);
-			camel_object_bag_remove(cdc->priv->busy_bag, stream);
+			g_unlink (real);
+			camel_object_bag_remove (cdc->priv->busy_bag, stream);
 			g_object_unref (stream);
 		}
 	} while (stream != NULL);
@@ -385,11 +385,11 @@ camel_data_cache_add (CamelDataCache *cdc,
 	stream = camel_stream_fs_new_with_name (
 		real, O_RDWR|O_CREAT|O_TRUNC, 0600, error);
 	if (stream)
-		camel_object_bag_add(cdc->priv->busy_bag, real, stream);
+		camel_object_bag_add (cdc->priv->busy_bag, real, stream);
 	else
-		camel_object_bag_abort(cdc->priv->busy_bag, real);
+		camel_object_bag_abort (cdc->priv->busy_bag, real);
 
-	g_free(real);
+	g_free (real);
 
 	return stream;
 }
@@ -417,17 +417,17 @@ camel_data_cache_get (CamelDataCache *cdc,
 	gchar *real;
 	CamelStream *stream;
 
-	real = data_cache_path(cdc, FALSE, path, key);
-	stream = camel_object_bag_reserve(cdc->priv->busy_bag, real);
+	real = data_cache_path (cdc, FALSE, path, key);
+	stream = camel_object_bag_reserve (cdc->priv->busy_bag, real);
 	if (!stream) {
 		stream = camel_stream_fs_new_with_name (
 			real, O_RDWR, 0600, error);
 		if (stream)
-			camel_object_bag_add(cdc->priv->busy_bag, real, stream);
+			camel_object_bag_add (cdc->priv->busy_bag, real, stream);
 		else
-			camel_object_bag_abort(cdc->priv->busy_bag, real);
+			camel_object_bag_abort (cdc->priv->busy_bag, real);
 	}
-	g_free(real);
+	g_free (real);
 
 	return stream;
 }
@@ -453,7 +453,7 @@ camel_data_cache_get_filename (CamelDataCache *cdc,
 {
 	gchar *real;
 
-	real = data_cache_path(cdc, FALSE, path, key);
+	real = data_cache_path (cdc, FALSE, path, key);
 
 	return real;
 }
@@ -479,10 +479,10 @@ camel_data_cache_remove (CamelDataCache *cdc,
 	gchar *real;
 	gint ret;
 
-	real = data_cache_path(cdc, FALSE, path, key);
-	stream = camel_object_bag_get(cdc->priv->busy_bag, real);
+	real = data_cache_path (cdc, FALSE, path, key);
+	stream = camel_object_bag_get (cdc->priv->busy_bag, real);
 	if (stream) {
-		camel_object_bag_remove(cdc->priv->busy_bag, stream);
+		camel_object_bag_remove (cdc->priv->busy_bag, stream);
 		g_object_unref (stream);
 	}
 
@@ -498,7 +498,7 @@ camel_data_cache_remove (CamelDataCache *cdc,
 		ret = 0;
 	}
 
-	g_free(real);
+	g_free (real);
 
 	return ret;
 }
diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h
index 1448faa..cb41386 100644
--- a/camel/camel-data-wrapper.h
+++ b/camel/camel-data-wrapper.h
@@ -113,9 +113,9 @@ gssize		camel_data_wrapper_decode_to_stream
 						(CamelDataWrapper *data_wrapper,
 						 CamelStream *stream,
 						 GError **error);
-void		camel_data_wrapper_set_mime_type(CamelDataWrapper *data_wrapper,
+void		camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper,
 						 const gchar *mime_type);
-gchar *		camel_data_wrapper_get_mime_type(CamelDataWrapper *data_wrapper);
+gchar *		camel_data_wrapper_get_mime_type (CamelDataWrapper *data_wrapper);
 CamelContentType *
 		camel_data_wrapper_get_mime_type_field
 						(CamelDataWrapper *data_wrapper);
diff --git a/camel/camel-db.c b/camel/camel-db.c
index 265c56a..137e7fc 100644
--- a/camel/camel-db.c
+++ b/camel/camel-db.c
@@ -368,13 +368,13 @@ cdb_sql_exec (sqlite3 *db,
 
 	d(g_print("Camel SQL Exec:\n%s\n", stmt));
 
-	ret = sqlite3_exec(db, stmt, 0, 0, &errmsg);
+	ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
 	while (ret == SQLITE_BUSY || ret == SQLITE_LOCKED || ret == -1) {
 		if (errmsg) {
 			sqlite3_free (errmsg);
 			errmsg = NULL;
 		}
-		ret = sqlite3_exec(db, stmt, 0, 0, &errmsg);
+		ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
 	}
 
 	if (ret != SQLITE_OK) {
@@ -423,7 +423,7 @@ cdb_match_func (sqlite3_context *ctx, gint nArgs, sqlite3_value **values)
 			if (c == ' ') {
 				word = TRUE;
 				j = 0;
-			} else if (word && tolower (c) == tolower(what[j])) {
+			} else if (word && tolower (c) == tolower (what[j])) {
 				j++;
 				if (what[j] == 0 && (where[i + 1] == 0 || isspace (where[i + 1])))
 					matches = TRUE;
@@ -454,7 +454,7 @@ camel_db_open (const gchar *path,
 
 	CAMEL_DB_USE_SHARED_CACHE;
 
-	ret = sqlite3_open(path, &db);
+	ret = sqlite3_open (path, &db);
 	if (ret) {
 
 		if (!db) {
@@ -469,7 +469,7 @@ camel_db_open (const gchar *path,
 			g_set_error (
 				error, CAMEL_ERROR,
 				CAMEL_ERROR_GENERIC, "%s", errmsg);
-			sqlite3_close(db);
+			sqlite3_close (db);
 		}
 		return NULL;
 	}
@@ -477,8 +477,8 @@ camel_db_open (const gchar *path,
 	cdb = g_new (CamelDB, 1);
 	cdb->db = db;
 	cdb->lock = g_mutex_new ();
-	cdb->priv = g_new(CamelDBPrivate, 1);
-	cdb->priv->file_name = g_strdup(path);
+	cdb->priv = g_new (CamelDBPrivate, 1);
+	cdb->priv->file_name = g_strdup (path);
 	cdb->priv->timer = NULL;
 	d(g_print ("\nDatabase succesfully opened  \n"));
 
@@ -550,7 +550,7 @@ camel_db_set_collate (CamelDB *cdb, const gchar *col, const gchar *collate, Came
 		g_mutex_lock (cdb->lock);
 		d(g_print("Creating Collation %s on %s with %p\n", collate, col, (gpointer) func));
 		if (collate && func)
-			ret = sqlite3_create_collation(cdb->db, collate, SQLITE_UTF8,  NULL, func);
+			ret = sqlite3_create_collation (cdb->db, collate, SQLITE_UTF8,  NULL, func);
 		g_mutex_unlock (cdb->lock);
 
 		return ret;
@@ -572,7 +572,7 @@ camel_db_command (CamelDB *cdb,
 		return TRUE;
 	g_mutex_lock (cdb->lock);
 
-	START(stmt);
+	START (stmt);
 	ret = cdb_sql_exec (cdb->db, stmt, error);
 	END;
 	g_mutex_unlock (cdb->lock);
@@ -727,8 +727,8 @@ camel_db_count_message_info (CamelDB *cdb,
 
 	g_mutex_lock (cdb->lock);
 
-	START(query);
-	ret = sqlite3_exec(cdb->db, query, count_cb, count, &errmsg);
+	START (query);
+	ret = sqlite3_exec (cdb->db, query, count_cb, count, &errmsg);
 	while (ret == SQLITE_BUSY || ret == SQLITE_LOCKED) {
 		if (errmsg) {
 			sqlite3_free (errmsg);
@@ -959,8 +959,8 @@ camel_db_select (CamelDB *cdb,
 	d(g_print ("\n%s:\n%s \n", G_STRFUNC, stmt));
 	g_mutex_lock (cdb->lock);
 
-	START(stmt);
-	ret = sqlite3_exec(cdb->db, stmt, callback, data, &errmsg);
+	START (stmt);
+	ret = sqlite3_exec (cdb->db, stmt, callback, data, &errmsg);
 	while (ret == SQLITE_BUSY || ret == SQLITE_LOCKED) {
 		if (errmsg) {
 			sqlite3_free (errmsg);
@@ -1102,9 +1102,9 @@ read_uids_flags_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
 	gint i;
 	for (i = 0; i < ncol; ++i) {
 		if (!strcmp (name [i], "uid"))
-			g_ptr_array_add (data->uids, (gchar *) (camel_pstring_strdup(cols[i])));
+			g_ptr_array_add (data->uids, (gchar *) (camel_pstring_strdup (cols[i])));
 		else if (!strcmp (name [i], "flags"))
-			g_ptr_array_add (data->flags, GUINT_TO_POINTER(strtoul (cols[i], NULL, 10)));
+			g_ptr_array_add (data->flags, GUINT_TO_POINTER (strtoul (cols[i], NULL, 10)));
 	}
 
 	 return 0;
@@ -1156,10 +1156,10 @@ read_uids_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
 	gint i;
 	for (i = 0; i < ncol; ++i) {
 		if (!strcmp (name [i], "uid"))
-			g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols[i])));
+			g_ptr_array_add (array, (gchar *) (camel_pstring_strdup (cols[i])));
 	}
 	#else
-			g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols[0])));
+			g_ptr_array_add (array, (gchar *) (camel_pstring_strdup (cols[0])));
 	#endif
 
 	 return 0;
@@ -1201,7 +1201,7 @@ camel_db_get_folder_junk_uids (CamelDB *db,
 {
 	 gchar *sel_query;
 	 gint ret;
-	 GPtrArray *array = g_ptr_array_new();
+	 GPtrArray *array = g_ptr_array_new ();
 
 	 sel_query = sqlite3_mprintf("SELECT uid FROM %Q where junk=1", folder_name);
 
@@ -1228,7 +1228,7 @@ camel_db_get_folder_deleted_uids (CamelDB *db,
 {
 	 gchar *sel_query;
 	 gint ret;
-	 GPtrArray *array = g_ptr_array_new();
+	 GPtrArray *array = g_ptr_array_new ();
 
 	 sel_query = sqlite3_mprintf("SELECT uid FROM %Q where deleted=1", folder_name);
 
@@ -1253,12 +1253,12 @@ read_preview_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
 
 	for (i = 0; i < ncol; ++i) {
 		if (!strcmp (name [i], "uid"))
-			uid = camel_pstring_strdup(cols[i]);
+			uid = camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "preview"))
-			msg = g_strdup(cols[i]);
+			msg = g_strdup (cols[i]);
 	}
 
-	g_hash_table_insert(hash, (gchar *)uid, msg);
+	g_hash_table_insert (hash, (gchar *)uid, msg);
 
 	return 0;
 }
@@ -1323,10 +1323,10 @@ read_vuids_callback (gpointer ref, gint ncol, gchar ** cols, gchar ** name)
 
 	 for (i = 0; i < ncol; ++i) {
 		  if (!strcmp (name [i], "vuid"))
-			   g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols[i]+8)));
+			   g_ptr_array_add (array, (gchar *) (camel_pstring_strdup (cols[i]+8)));
 	 }
 	 #else
-			   g_ptr_array_add (array, (gchar *) (camel_pstring_strdup(cols[0]+8)));
+			   g_ptr_array_add (array, (gchar *) (camel_pstring_strdup (cols[0]+8)));
 	 #endif
 
 	 return 0;
@@ -1349,7 +1349,7 @@ camel_db_get_vuids_from_vfolder (CamelDB *db,
 	 gchar *tmp = g_strdup_printf("%s%%", filter ? filter:"");
 	 if (filter)
 		  cond = sqlite3_mprintf(" WHERE vuid LIKE %Q", tmp);
-	 g_free(tmp);
+	 g_free (tmp);
 	 sel_query = sqlite3_mprintf("SELECT vuid FROM %Q%s", folder_name, filter ? cond : "");
 
 	 if (cond)
@@ -1815,7 +1815,7 @@ read_fir_callback (gpointer  ref, gint ncol, gchar ** cols, gchar ** name)
 
 	for (i = 0; i < ncol; ++i) {
 		if (!strcmp (name [i], "folder_name"))
-			record->folder_name = g_strdup(cols[i]);
+			record->folder_name = g_strdup (cols[i]);
 
 		else if (!strcmp (name [i], "version"))
 			record->version = cols[i] ? strtoul (cols[i], NULL, 10) : 0;
@@ -2025,7 +2025,7 @@ cdb_delete_ids (CamelDB *cdb,
 	while (iterator) {
 		gchar *foo = g_strdup_printf("%s%s", uid_prefix, (gchar *) iterator->data);
 		tmp = sqlite3_mprintf ("%Q", foo);
-		g_free(foo);
+		g_free (foo);
 		iterator = iterator->next;
 
 		if (first == TRUE) {
diff --git a/camel/camel-db.h b/camel/camel-db.h
index 3dcd06e..a2d7148 100644
--- a/camel/camel-db.h
+++ b/camel/camel-db.h
@@ -47,7 +47,7 @@ typedef struct _CamelDBPrivate CamelDBPrivate;
  *
  * Since: 2.24
  **/
-typedef gint(*CamelDBCollate)(gpointer ,int,gconstpointer ,int,gconstpointer );
+typedef gint (*CamelDBCollate)(gpointer ,int,gconstpointer ,int,gconstpointer );
 
 /**
  * CamelDB:
@@ -270,7 +270,7 @@ void camel_db_free_sqlized_string (gchar *string);
 gchar * camel_db_get_column_name (const gchar *raw_name);
 gint camel_db_set_collate (CamelDB *cdb, const gchar *col, const gchar *collate, CamelDBCollate func);
 /* Migration APIS */
-gint camel_db_migrate_vfolders_to_14(CamelDB *cdb, const gchar *folder, GError **error);
+gint camel_db_migrate_vfolders_to_14 (CamelDB *cdb, const gchar *folder, GError **error);
 
 gint camel_db_start_in_memory_transactions (CamelDB *cdb, GError **error);
 gint camel_db_flush_in_memory_transactions (CamelDB *cdb, const gchar * folder_name, GError **error);
diff --git a/camel/camel-debug.c b/camel/camel-debug.c
index 3b25db1..a6a3fe3 100644
--- a/camel/camel-debug.c
+++ b/camel/camel-debug.c
@@ -50,14 +50,14 @@ camel_debug_init (void)
 	if (d) {
 		gchar *p;
 
-		debug_table = g_hash_table_new(g_str_hash, g_str_equal);
+		debug_table = g_hash_table_new (g_str_hash, g_str_equal);
 		p = d;
 		while (*p) {
 			while (*p && *p != ',')
 				p++;
 			if (*p)
 				*p++ = 0;
-			g_hash_table_insert(debug_table, d, d);
+			g_hash_table_insert (debug_table, d, d);
 			d = p;
 		}
 
@@ -77,7 +77,7 @@ camel_debug_init (void)
  *
  * Returns:
  **/
-gboolean camel_debug(const gchar *mode)
+gboolean camel_debug (const gchar *mode)
 {
 	if (camel_verbose_debug)
 		return TRUE;
@@ -86,22 +86,22 @@ gboolean camel_debug(const gchar *mode)
 		gchar *colon;
 		gchar *fallback;
 
-		if (g_hash_table_lookup(debug_table, mode))
+		if (g_hash_table_lookup (debug_table, mode))
 			return TRUE;
 
 		/* Check for fully qualified debug */
-		colon = strchr(mode, ':');
+		colon = strchr (mode, ':');
 		if (colon) {
-			fallback = g_alloca(strlen(mode)+1);
-			strcpy(fallback, mode);
+			fallback = g_alloca (strlen (mode)+1);
+			strcpy (fallback, mode);
 			colon = (colon-mode) + fallback;
 			/* Now check 'module[:*]' */
 			*colon = 0;
-			if (g_hash_table_lookup(debug_table, fallback))
+			if (g_hash_table_lookup (debug_table, fallback))
 				return TRUE;
 			/* Now check ':subsystem' */
 			*colon = ':';
-			if (g_hash_table_lookup(debug_table, colon))
+			if (g_hash_table_lookup (debug_table, colon))
 				return TRUE;
 		}
 	}
@@ -121,9 +121,9 @@ static GStaticMutex debug_lock = G_STATIC_MUTEX_INIT;
  * call debug_end when finished any screen output.
  **/
 gboolean
-camel_debug_start(const gchar *mode)
+camel_debug_start (const gchar *mode)
 {
-	if (camel_debug(mode)) {
+	if (camel_debug (mode)) {
 		g_static_mutex_lock (&debug_lock);
 		printf ("Thread %p >\n", g_thread_self());
 		return TRUE;
@@ -139,7 +139,7 @@ camel_debug_start(const gchar *mode)
  * you called camel_debug_start, and if it returns TRUE.
  **/
 void
-camel_debug_end(void)
+camel_debug_end (void)
 {
 	printf ("< %p >\n", g_thread_self());
 	g_static_mutex_unlock (&debug_lock);
@@ -212,14 +212,14 @@ Invalid hw breakpoint length %d in i386_length_and_rw_bits.\n", len);
 
 /* fine idea, but it doesn't work, crashes in get_dr :-/ */
 void
-camel_debug_hwatch(gint wp, gpointer addr)
+camel_debug_hwatch (gint wp, gpointer addr)
 {
      guint32 control, rw;
 
-     g_assert(wp <= DR_LASTADDR);
-     g_assert(sizeof(addr) == 4);
+     g_assert (wp <= DR_LASTADDR);
+     g_assert (sizeof (addr) == 4);
 
-     get_dr(7, control);
+     get_dr (7, control);
      /* set watch mode + size */
      rw = DR_RW_WRITE | DR_LEN_4;
      control &= ~(((1<<DR_CONTROL_SIZE)-1) << (DR_CONTROL_SHIFT+DR_CONTROL_SIZE * wp));
@@ -231,19 +231,19 @@ camel_debug_hwatch(gint wp, gpointer addr)
 
      switch (wp) {
      case 0:
-	     set_dr(0, addr);
+	     set_dr (0, addr);
 	     break;
      case 1:
-	     set_dr(1, addr);
+	     set_dr (1, addr);
 	     break;
      case 2:
-	     set_dr(2, addr);
+	     set_dr (2, addr);
 	     break;
      case 3:
-	     set_dr(3, addr);
+	     set_dr (3, addr);
 	     break;
      }
-     set_dr(7, control);
+     set_dr (7, control);
 }
 
 #endif
diff --git a/camel/camel-debug.h b/camel/camel-debug.h
index 10171d0..c85bbcf 100644
--- a/camel/camel-debug.h
+++ b/camel/camel-debug.h
@@ -34,11 +34,11 @@
 
 G_BEGIN_DECLS
 
-void camel_debug_init(void);
-gboolean camel_debug(const gchar *mode);
+void camel_debug_init (void);
+gboolean camel_debug (const gchar *mode);
 
-gboolean camel_debug_start(const gchar *mode);
-void camel_debug_end(void);
+gboolean camel_debug_start (const gchar *mode);
+void camel_debug_end (void);
 
 /**
  * CAMEL_CHECK_GERROR:
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
index 8690f20..af87299 100644
--- a/camel/camel-disco-diary.c
+++ b/camel/camel-disco-diary.c
@@ -453,7 +453,7 @@ camel_disco_diary_new (CamelDiscoStore *store,
 		return NULL;
 	}
 
-	fseek(diary->file, 0, SEEK_END);
+	fseek (diary->file, 0, SEEK_END);
 
 	d(printf(" is at %ld\n", ftell(diary->file)));
 
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
index 0fdb9a3..12ed983 100644
--- a/camel/camel-disco-folder.c
+++ b/camel/camel-disco-folder.c
@@ -60,7 +60,7 @@ G_DEFINE_TYPE (CamelDiscoFolder, camel_disco_folder, CAMEL_TYPE_FOLDER)
 static gboolean disco_expunge (CamelFolder *folder, GError **error);
 
 static void
-cdf_sync_offline(CamelSession *session, CamelSessionThreadMsg *mm)
+cdf_sync_offline (CamelSession *session, CamelSessionThreadMsg *mm)
 {
 	struct _cdf_sync_msg *m = (struct _cdf_sync_msg *)mm;
 	gint i;
@@ -71,27 +71,27 @@ cdf_sync_offline(CamelSession *session, CamelSessionThreadMsg *mm)
 		for (i=0;i<m->changes->uid_added->len;i++) {
 			gint pc = i * 100 / m->changes->uid_added->len;
 
-			camel_operation_progress(NULL, pc);
-			camel_disco_folder_cache_message((CamelDiscoFolder *)m->folder,
+			camel_operation_progress (NULL, pc);
+			camel_disco_folder_cache_message ((CamelDiscoFolder *)m->folder,
 							 m->changes->uid_added->pdata[i],
 							 &mm->error);
 		}
 	} else {
-		camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)m->folder,
+		camel_disco_folder_prepare_for_offline ((CamelDiscoFolder *)m->folder,
 						       "(match-all)",
 						       &mm->error);
 	}
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 }
 
 static void
-cdf_sync_free(CamelSession *session, CamelSessionThreadMsg *mm)
+cdf_sync_free (CamelSession *session, CamelSessionThreadMsg *mm)
 {
 	struct _cdf_sync_msg *m = (struct _cdf_sync_msg *)mm;
 
 	if (m->changes)
-		camel_folder_change_info_free(m->changes);
+		camel_folder_change_info_free (m->changes);
 	g_object_unref (m->folder);
 }
 
@@ -117,11 +117,11 @@ cdf_folder_changed (CamelFolder *folder,
 		CamelSession *session = CAMEL_SERVICE (parent_store)->session;
 		struct _cdf_sync_msg *m;
 
-		m = camel_session_thread_msg_new(session, &cdf_sync_ops, sizeof(*m));
-		m->changes = camel_folder_change_info_new();
-		camel_folder_change_info_cat(m->changes, changes);
+		m = camel_session_thread_msg_new (session, &cdf_sync_ops, sizeof (*m));
+		m->changes = camel_folder_change_info_new ();
+		camel_folder_change_info_cat (m->changes, changes);
 		m->folder = g_object_ref (folder);
-		camel_session_thread_queue(session, &m->msg, 0);
+		camel_session_thread_queue (session, &m->msg, 0);
 	}
 }
 
@@ -273,9 +273,9 @@ disco_expunge (CamelFolder *folder,
 	count = camel_folder_summary_count (folder->summary);
 	for (i = 0; i < count; i++) {
 		info = camel_folder_summary_index (folder->summary, i);
-		if (camel_message_info_flags(info) & CAMEL_MESSAGE_DELETED)
+		if (camel_message_info_flags (info) & CAMEL_MESSAGE_DELETED)
 			g_ptr_array_add (uids, g_strdup (camel_message_info_uid (info)));
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
 	success = disco_expunge_uids (folder, uids, error);
@@ -385,14 +385,14 @@ disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
 		uids = camel_folder_get_uids (folder);
 
 	if (!uids) {
-		camel_operation_end(NULL);
+		camel_operation_end (NULL);
 		return FALSE;
 	}
 
 	for (i = 0; i < uids->len && success; i++) {
 		gint pc = i * 100 / uids->len;
 
-		camel_operation_progress(NULL, pc);
+		camel_operation_progress (NULL, pc);
 		success = camel_disco_folder_cache_message (
 			disco_folder, uids->pdata[i], error);
 	}
@@ -402,7 +402,7 @@ disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
 	else
 		camel_folder_free_uids (folder, uids);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return success;
 }
diff --git a/camel/camel-disco-folder.h b/camel/camel-disco-folder.h
index 11e0ae6..7df9fe7 100644
--- a/camel/camel-disco-folder.h
+++ b/camel/camel-disco-folder.h
@@ -136,7 +136,7 @@ void		camel_disco_folder_set_offline_sync
 gboolean	camel_disco_folder_expunge_uids	(CamelFolder *folder,
 						 GPtrArray *uids,
 						 GError **error);
-gboolean	camel_disco_folder_cache_message(CamelDiscoFolder *disco_folder,
+gboolean	camel_disco_folder_cache_message (CamelDiscoFolder *disco_folder,
 						 const gchar *uid,
 						 GError **error);
 gboolean	camel_disco_folder_prepare_for_offline
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
index 2732d5e..b35c4b4 100644
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@ -95,7 +95,7 @@ disco_store_connect (CamelService *service,
 		   disconnect could be called, which will remove store->diary and unref it */
 		store->status = CAMEL_DISCO_STORE_RESYNCING;
 		diary = g_object_ref (store->diary);
-		camel_disco_diary_replay(diary, &local_error);
+		camel_disco_diary_replay (diary, &local_error);
 		g_object_unref (diary);
 		store->status = CAMEL_DISCO_STORE_ONLINE;
 		if (local_error != NULL) {
@@ -256,20 +256,20 @@ disco_store_set_status (CamelDiscoStore *disco_store,
 
 				sync =  camel_url_get_param(((CamelService *)disco_store)->url, "offline_sync") != NULL;
 
-				folders = camel_object_bag_list(((CamelStore *)disco_store)->folders);
+				folders = camel_object_bag_list (((CamelStore *)disco_store)->folders);
 				for (i=0;i<folders->len;i++) {
 					folder = folders->pdata[i];
-					if (G_TYPE_CHECK_INSTANCE_TYPE(folder, CAMEL_TYPE_DISCO_FOLDER)
+					if (G_TYPE_CHECK_INSTANCE_TYPE (folder, CAMEL_TYPE_DISCO_FOLDER)
 					    && (sync || camel_disco_folder_get_offline_sync (CAMEL_DISCO_FOLDER (folder)))) {
 						camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder, "", NULL);
 					}
 					g_object_unref (folder);
 				}
-				g_ptr_array_free(folders, TRUE);
+				g_ptr_array_free (folders, TRUE);
 			}
 		}
 
-		camel_store_sync(CAMEL_STORE (disco_store), FALSE, NULL);
+		camel_store_sync (CAMEL_STORE (disco_store), FALSE, NULL);
 	}
 
 	if (!camel_service_disconnect (CAMEL_SERVICE (disco_store), network_available, error))
@@ -421,19 +421,19 @@ camel_disco_store_prepare_for_offline (CamelDiscoStore *disco_store,
 
 				sync =  camel_url_get_param(((CamelService *)disco_store)->url, "offline_sync") != NULL;
 
-				folders = camel_object_bag_list(((CamelStore *)disco_store)->folders);
+				folders = camel_object_bag_list (((CamelStore *)disco_store)->folders);
 				for (i=0;i<folders->len;i++) {
 					folder = folders->pdata[i];
-					if (G_TYPE_CHECK_INSTANCE_TYPE(folder, CAMEL_TYPE_DISCO_FOLDER)
+					if (G_TYPE_CHECK_INSTANCE_TYPE (folder, CAMEL_TYPE_DISCO_FOLDER)
 					    && (sync || camel_disco_folder_get_offline_sync (CAMEL_DISCO_FOLDER (folder)))) {
 						camel_disco_folder_prepare_for_offline((CamelDiscoFolder *)folder, "(match-all)", NULL);
 					}
 					g_object_unref (folder);
 				}
-				g_ptr_array_free(folders, TRUE);
+				g_ptr_array_free (folders, TRUE);
 			}
 		}
 
-		camel_store_sync(CAMEL_STORE (disco_store), FALSE, NULL);
+		camel_store_sync (CAMEL_STORE (disco_store), FALSE, NULL);
 	}
 }
diff --git a/camel/camel-disco-store.h b/camel/camel-disco-store.h
index 4a0a09e..5a77cd9 100644
--- a/camel/camel-disco-store.h
+++ b/camel/camel-disco-store.h
@@ -127,7 +127,7 @@ gboolean              camel_disco_store_can_work_offline (CamelDiscoStore *store
 
 /* Convenience functions */
 gboolean camel_disco_store_check_online (CamelDiscoStore *store, GError **error);
-void camel_disco_store_prepare_for_offline(CamelDiscoStore *store, GError **error);
+void camel_disco_store_prepare_for_offline (CamelDiscoStore *store, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/camel-file-utils.c b/camel/camel-file-utils.c
index 09e9f85..1b8a426 100644
--- a/camel/camel-file-utils.c
+++ b/camel/camel-file-utils.c
@@ -146,12 +146,12 @@ camel_file_util_decode_fixed_int32 (FILE *in, gint32 *dest)
 
 #define CFU_ENCODE_T(type)						\
 gint									\
-camel_file_util_encode_##type(FILE *out, type value)			\
+camel_file_util_encode_##type (FILE *out, type value)			\
 {									\
 	gint i;								\
 									\
 	for (i = sizeof (type) - 1; i >= 0; i--) {			\
-		if (fputc((value >> (i * 8)) & 0xff, out) == -1)	\
+		if (fputc ((value >> (i * 8)) & 0xff, out) == -1)	\
 			return -1;					\
 	}								\
 	return 0;							\
@@ -159,10 +159,10 @@ camel_file_util_encode_##type(FILE *out, type value)			\
 
 #define CFU_DECODE_T(type)				\
 gint							\
-camel_file_util_decode_##type(FILE *in, type *dest)	\
+camel_file_util_decode_##type (FILE *in, type *dest)	\
 {							\
 	type save = 0;					\
-	gint i = sizeof(type) - 1;			\
+	gint i = sizeof (type) - 1;			\
 	gint v = EOF;					\
 							\
         while (i >= 0 && (v = fgetc (in)) != EOF) {	\
@@ -184,7 +184,7 @@ camel_file_util_decode_##type(FILE *in, type *dest)	\
  *
  * Returns: %0 on success, %-1 on error.
  **/
-CFU_ENCODE_T(time_t)
+CFU_ENCODE_T (time_t)
 
 /**
  * camel_file_util_decode_time_t:
@@ -195,7 +195,7 @@ CFU_ENCODE_T(time_t)
  *
  * Returns: %0 on success, %-1 on error.
  **/
-CFU_DECODE_T(time_t)
+CFU_DECODE_T (time_t)
 
 /**
  * camel_file_util_encode_off_t:
@@ -206,7 +206,7 @@ CFU_DECODE_T(time_t)
  *
  * Returns: %0 on success, %-1 on error.
  **/
-CFU_ENCODE_T(off_t)
+CFU_ENCODE_T (off_t)
 
 /**
  * camel_file_util_decode_off_t:
@@ -217,7 +217,7 @@ CFU_ENCODE_T(off_t)
  *
  * Returns: %0 on success, %-1 on failure.
  **/
-CFU_DECODE_T(off_t)
+CFU_DECODE_T (off_t)
 
 /**
  * camel_file_util_encode_gsize:
@@ -228,7 +228,7 @@ CFU_DECODE_T(off_t)
  *
  * Returns: %0 on success, %-1 on error.
  **/
-CFU_ENCODE_T(gsize)
+CFU_ENCODE_T (gsize)
 
 /**
  * camel_file_util_decode_gsize:
@@ -239,7 +239,7 @@ CFU_ENCODE_T(gsize)
  *
  * Returns: %0 on success, %-1 on failure.
  **/
-CFU_DECODE_T(gsize)
+CFU_DECODE_T (gsize)
 
 /**
  * camel_file_util_encode_string:
@@ -331,8 +331,8 @@ camel_file_util_encode_fixed_string (FILE *out, const gchar *str, gsize len)
 	if (len > 65536)
 		len = 65536;
 
-	memset(buf, 0x00, len);
-	g_strlcpy(buf, str, len);
+	memset (buf, 0x00, len);
+	g_strlcpy (buf, str, len);
 
 	if (fwrite (buf, len, 1, out) == len)
 		return 0;
@@ -393,7 +393,7 @@ camel_file_util_safe_filename (const gchar *name)
 	if (name == NULL)
 		return NULL;
 
-	return camel_url_encode(name, unsafe_chars);
+	return camel_url_encode (name, unsafe_chars);
 }
 
 /* FIXME: poll() might be more efficient and more portable? */
@@ -460,7 +460,7 @@ camel_read (gint fd,
 			tv.tv_usec = 0;
 			nread = -1;
 
-			res = select(fdmax, &rdset, 0, 0, &tv);
+			res = select (fdmax, &rdset, 0, 0, &tv);
 			if (res == -1)
 				;
 			else if (res == 0)
@@ -667,7 +667,7 @@ camel_read_socket (gint fd,
 			tv.tv_usec = 0;
 			nread = -1;
 
-			res = select(fdmax, &rdset, 0, 0, &tv);
+			res = select (fdmax, &rdset, 0, 0, &tv);
 			if (res == -1)
 				;
 			else if (res == 0)
@@ -812,16 +812,16 @@ camel_write_socket (gint fd,
  * Returns: The new pathname.  It must be free'd with g_free().
  **/
 gchar *
-camel_file_util_savename(const gchar *filename)
+camel_file_util_savename (const gchar *filename)
 {
 	gchar *dirname, *retval;
 
-	dirname = g_path_get_dirname(filename);
+	dirname = g_path_get_dirname (filename);
 
 	if (strcmp (dirname, ".") == 0) {
 		retval = g_strconcat (".#", filename, NULL);
 	} else {
-		gchar *basename = g_path_get_basename(filename);
+		gchar *basename = g_path_get_basename (filename);
 		gchar *newbasename = g_strconcat (".#", basename, NULL);
 
 		retval = g_build_filename (dirname, newbasename, NULL);
diff --git a/camel/camel-file-utils.h b/camel/camel-file-utils.h
index 9459dd1..2178902 100644
--- a/camel/camel-file-utils.h
+++ b/camel/camel-file-utils.h
@@ -72,7 +72,7 @@ gssize camel_write (gint fd, const gchar *buf, gsize n, GError **error);
 gssize camel_read_socket (gint fd, gchar *buf, gsize n, GError **error);
 gssize camel_write_socket (gint fd, const gchar *buf, gsize n, GError **error);
 
-gchar *camel_file_util_savename(const gchar *filename);
+gchar *camel_file_util_savename (const gchar *filename);
 
 G_END_DECLS
 
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 3539278..7d7f08e 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -140,7 +140,7 @@ static ESExpResult *do_stop (struct _ESExp *f, gint argc, struct _ESExpResult **
 static ESExpResult *do_label (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *do_color (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *do_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
-static ESExpResult *do_adjust_score(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
+static ESExpResult *do_adjust_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *set_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *unset_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
 static ESExpResult *do_shell (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *);
@@ -372,16 +372,16 @@ camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
 }
 
 void
-camel_filter_driver_add_rule(CamelFilterDriver *d, const gchar *name, const gchar *match, const gchar *action)
+camel_filter_driver_add_rule (CamelFilterDriver *d, const gchar *name, const gchar *match, const gchar *action)
 {
 	struct _CamelFilterDriverPrivate *p = CAMEL_FILTER_DRIVER_GET_PRIVATE (d);
 	struct _filter_rule *node;
 
-	node = g_malloc(sizeof(*node));
-	node->match = g_strdup(match);
-	node->action = g_strdup(action);
-	node->name = g_strdup(name);
-	camel_dlist_addtail(&p->rules, (CamelDListNode *)node);
+	node = g_malloc (sizeof (*node));
+	node->match = g_strdup (match);
+	node->action = g_strdup (action);
+	node->name = g_strdup (name);
+	camel_dlist_addtail (&p->rules, (CamelDListNode *)node);
 }
 
 gint
@@ -572,9 +572,9 @@ do_move (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDri
 
 				if (p->error == NULL && last) {
 					if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
-						camel_folder_set_message_flags(p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
+						camel_folder_set_message_flags (p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
 					else
-						camel_message_info_set_flags(p->info, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
+						camel_message_info_set_flags (p->info, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
 				}
 			}
 
@@ -672,9 +672,9 @@ do_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
 }
 
 static ESExpResult *
-do_adjust_score(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
+do_adjust_score (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDriver *driver)
 {
-	struct _CamelFilterDriverPrivate *p = CAMEL_FILTER_DRIVER_GET_PRIVATE(driver);
+	struct _CamelFilterDriverPrivate *p = CAMEL_FILTER_DRIVER_GET_PRIVATE (driver);
 
 	d(fprintf (stderr, "adjusting score tag\n"));
 	if (argc > 0 && argv[0]->type == ESEXP_RES_INT) {
@@ -682,7 +682,7 @@ do_adjust_score(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFi
 		gint old;
 
 		value = (gchar *)camel_message_info_user_tag(p->info, "score");
-		old = value?atoi(value):0;
+		old = value?atoi (value):0;
 		value = g_strdup_printf ("%d", old+argv[0]->value.number);
 		camel_message_info_set_user_tag(p->info, "score", value);
 		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Adjust score (%d) to %s", argv[0]->value.number, value);
@@ -704,7 +704,7 @@ set_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilterDr
 		if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
 			camel_folder_set_message_flags (p->source, p->uid, flags, ~0);
 		else
-			camel_message_info_set_flags(p->info, flags | CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
+			camel_message_info_set_flags (p->info, flags | CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
 		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
 	}
 
@@ -723,7 +723,7 @@ unset_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFilter
 		if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
 			camel_folder_set_message_flags (p->source, p->uid, flags, 0);
 		else
-			camel_message_info_set_flags(p->info, flags | CAMEL_MESSAGE_FOLDER_FLAGGED, 0);
+			camel_message_info_set_flags (p->info, flags | CAMEL_MESSAGE_FOLDER_FLAGGED, 0);
 		camel_filter_driver_log (driver, FILTER_LOG_ACTION, "Unset %s flag", argv[0]->value.string);
 	}
 
@@ -1184,19 +1184,19 @@ camel_filter_driver_flush (CamelFilterDriver *driver,
 }
 
 static gint
-decode_flags_from_xev(const gchar *xev, CamelMessageInfoBase *mi)
+decode_flags_from_xev (const gchar *xev, CamelMessageInfoBase *mi)
 {
 	guint32 uid, flags = 0;
 	gchar *header;
 
 	/* check for uid/flags */
-	header = camel_header_token_decode(xev);
+	header = camel_header_token_decode (xev);
 	if (!(header && strlen(header) == strlen("00000000-0000")
 	    && sscanf(header, "%08x-%04x", &uid, &flags) == 2)) {
-		g_free(header);
+		g_free (header);
 		return 0;
 	}
-	g_free(header);
+	g_free (header);
 
 	mi->flags = flags;
 	return 0;
@@ -1277,15 +1277,15 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
 			goto fail;
 		}
 
-		info = camel_message_info_new_from_header(NULL, mime_part->headers);
+		info = camel_message_info_new_from_header (NULL, mime_part->headers);
 		/* Try and see if it has X-Evolution headers */
 		xev = camel_header_raw_find(&mime_part->headers, "X-Evolution", NULL);
 		if (xev)
 			decode_flags_from_xev (xev, (CamelMessageInfoBase *)info);
 
-		((CamelMessageInfoBase *)info)->size = camel_mime_parser_tell(mp) - last;
+		((CamelMessageInfoBase *)info)->size = camel_mime_parser_tell (mp) - last;
 
-		last = camel_mime_parser_tell(mp);
+		last = camel_mime_parser_tell (mp);
 		status = camel_filter_driver_filter_message (
 			driver, message, info, NULL, NULL, source_url,
 			original_source_url ? original_source_url : source_url,
@@ -1310,7 +1310,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver,
 
 	if (p->defaultfolder) {
 		report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, 100, _("Syncing folder"));
-		camel_folder_sync(p->defaultfolder, FALSE, NULL);
+		camel_folder_sync (p->defaultfolder, FALSE, NULL);
 	}
 
 	report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Complete"));
@@ -1514,7 +1514,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
 		info = camel_message_info_new_from_header (NULL, h);
 		freeinfo = TRUE;
 	} else {
-		if (camel_message_info_flags(info) & CAMEL_MESSAGE_DELETED)
+		if (camel_message_info_flags (info) & CAMEL_MESSAGE_DELETED)
 			return 0;
 
 		uid = camel_message_info_uid (info);
@@ -1592,9 +1592,9 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver,
 	/* *Now* we can set the DELETED flag... */
 	if (p->deleted) {
 		if (p->source && p->uid && camel_folder_has_summary_capability (p->source))
-			camel_folder_set_message_flags(p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
+			camel_folder_set_message_flags (p->source, p->uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
 		else
-			camel_message_info_set_flags(info, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
+			camel_message_info_set_flags (info, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_FOLDER_FLAGGED, ~0);
 	}
 
 	/* Logic: if !Moved and there exists a default folder... */
diff --git a/camel/camel-filter-driver.h b/camel/camel-filter-driver.h
index a161a17..da22e9e 100644
--- a/camel/camel-filter-driver.h
+++ b/camel/camel-filter-driver.h
@@ -71,7 +71,7 @@ enum camel_filter_status_t {
 	CAMEL_FILTER_STATUS_NONE,
 	CAMEL_FILTER_STATUS_START,	/* start of new message processed */
 	CAMEL_FILTER_STATUS_ACTION,	/* an action performed */
-	CAMEL_FILTER_STATUS_PROGRESS,	/* (an) extra update(s), if its taking longer to process */
+	CAMEL_FILTER_STATUS_PROGRESS,	/* (an) extra update (s), if its taking longer to process */
 	CAMEL_FILTER_STATUS_END		/* end of message */
 };
 
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 8f4ed98..03f3ed9 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -152,12 +152,12 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
 			matched = argv[i]->type == ESEXP_RES_STRING && argv[i]->value.string[0] == 0;
 
 		if (g_ascii_strcasecmp(name, "x-camel-mlist") == 0) {
-			const gchar *list = camel_message_info_mlist(fms->info);
+			const gchar *list = camel_message_info_mlist (fms->info);
 
 			if (list) {
 				for (i=1; i<argc && !matched; i++) {
 					if (argv[i]->type == ESEXP_RES_STRING)
-						matched = camel_search_header_match(list, argv[i]->value.string, how, CAMEL_SEARCH_TYPE_MLIST, NULL);
+						matched = camel_search_header_match (list, argv[i]->value.string, how, CAMEL_SEARCH_TYPE_MLIST, NULL);
 				}
 			}
 		} else {
@@ -183,10 +183,10 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
 			}
 
 			for (header = mime_part->headers; header && !matched; header = header->next) {
-				if (!g_ascii_strcasecmp(header->name, name)) {
+				if (!g_ascii_strcasecmp (header->name, name)) {
 					for (i=1; i<argc && !matched; i++) {
 						if (argv[i]->type == ESEXP_RES_STRING)
-							matched = camel_search_header_match(header->value, argv[i]->value.string, how, type, charset);
+							matched = camel_search_header_match (header->value, argv[i]->value.string, how, type, charset);
 					}
 				}
 			}
@@ -262,7 +262,7 @@ header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMes
 
 	if (argc > 1 && argv[0]->type == ESEXP_RES_STRING
 	    && (contents = camel_medium_get_header (CAMEL_MEDIUM (message), argv[0]->value.string))
-	    && camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->error) == 0) {
+	    && camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE, argc-1, argv+1, fms->error) == 0) {
 		r->value.boolean = regexec (&pattern, contents, 0, NULL, 0) == 0;
 		regfree (&pattern);
 	} else
@@ -289,7 +289,7 @@ get_full_header (CamelMimeMessage *message)
 			else
 				g_string_append (str, ": ");
 			g_string_append (str, h->value);
-			g_string_append_c(str, '\n');
+			g_string_append_c (str, '\n');
 		}
 	}
 
@@ -307,7 +307,7 @@ header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Filt
 	regex_t pattern;
 	gchar *contents;
 
-	if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE,
+	if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_NEWLINE,
 					   argc, argv, fms->error) == 0) {
 		message = camel_filter_search_get_message (fms, f);
 		contents = get_full_header (message);
@@ -355,11 +355,11 @@ body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
 static ESExpResult *
 body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
 {
-	ESExpResult *r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	ESExpResult *r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	CamelMimeMessage *message;
 	regex_t pattern;
 
-	if (camel_search_build_match_regex(&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE,
+	if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE,
 					   argc, argv, fms->error) == 0) {
 		message = camel_filter_search_get_message (fms, f);
 		r->value.boolean = camel_search_message_body_contains ((CamelDataWrapper *) message, &pattern);
@@ -380,7 +380,7 @@ user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessag
 	/* performs an OR of all words */
 	for (i = 0; i < argc && !truth; i++) {
 		if (argv[i]->type == ESEXP_RES_STRING
-		    && camel_message_info_user_flag(fms->info, argv[i]->value.string)) {
+		    && camel_message_info_user_flag (fms->info, argv[i]->value.string)) {
 			truth = TRUE;
 			break;
 		}
@@ -401,7 +401,7 @@ system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMess
 		e_sexp_fatal_error(f, _("Invalid arguments to (system-flag)"));
 
 	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
-	r->value.boolean = camel_system_flag_get (camel_message_info_flags(fms->info), argv[0]->value.string);
+	r->value.boolean = camel_system_flag_get (camel_message_info_flags (fms->info), argv[0]->value.string);
 
 	return r;
 }
@@ -415,7 +415,7 @@ user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessage
 	if (argc != 1 || argv[0]->type != ESEXP_RES_STRING)
 		e_sexp_fatal_error(f, _("Invalid arguments to (user-tag)"));
 
-	tag = camel_message_info_user_tag(fms->info, argv[0]->value.string);
+	tag = camel_message_info_user_tag (fms->info, argv[0]->value.string);
 
 	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup (tag ? tag : "");
@@ -473,27 +473,27 @@ header_source (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMe
 	if (fms->source) {
 		src = fms->source;
 	} else {
-		message = camel_filter_search_get_message(fms, f);
-		src = camel_mime_message_get_source(message);
+		message = camel_filter_search_get_message (fms, f);
+		src = camel_mime_message_get_source (message);
 	}
 
 	if (src
-	    && (provider = camel_provider_get(src, NULL))
+	    && (provider = camel_provider_get (src, NULL))
 	    && provider->url_equal) {
-		uria = camel_url_new(src, NULL);
+		uria = camel_url_new (src, NULL);
 		if (uria) {
 			for (i=0;i<argc && !truth;i++) {
 				if (argv[i]->type == ESEXP_RES_STRING
-				    && (urib = camel_url_new(argv[i]->value.string, NULL))) {
-					truth = provider->url_equal(uria, urib);
-					camel_url_free(urib);
+				    && (urib = camel_url_new (argv[i]->value.string, NULL))) {
+					truth = provider->url_equal (uria, urib);
+					camel_url_free (urib);
 				}
 			}
-			camel_url_free(uria);
+			camel_url_free (uria);
 		}
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -505,8 +505,8 @@ get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessage
 {
 	ESExpResult *r;
 
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
-	r->value.number = camel_message_info_size(fms->info) / 1024;
+	r = e_sexp_result_new (f, ESEXP_RES_INT);
+	r->value.number = camel_message_info_size (fms->info) / 1024;
 
 	return r;
 }
@@ -657,7 +657,7 @@ junk_test (struct _ESExp *f, gint argc, struct _ESExpResult **argv, FilterMessag
 				gchar *value = (gchar *) g_hash_table_lookup ((GHashTable *) ht, node->name);
 				d(printf("JunkCheckMatch: %s %s %s\n", node->name, node->value, value));
 				if (value)
-					retval = camel_strstrcase(node->value, value) != NULL;
+					retval = camel_strstrcase (node->value, value) != NULL;
 
 			}
 			node = node->next;
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 4007074..600fb36 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -68,31 +68,31 @@ struct _CamelFolderSearchPrivate {
 	GHashTable *threads_hash;
 };
 
-static ESExpResult *search_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-
-static ESExpResult *search_header_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_matches(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_starts_with(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_ends_with(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_exists(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_soundex(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_regex(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_header_full_regex(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search);
-static ESExpResult *search_match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
-static ESExpResult *search_body_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_body_regex(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
-static ESExpResult *search_user_flag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_system_flag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_sent_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_received_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_current_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_get_size(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_uid(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-static ESExpResult *search_message_location(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
-
-static ESExpResult *search_dummy(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+
+static ESExpResult *search_header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_soundex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search);
+static ESExpResult *search_match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *s);
+static ESExpResult *search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
+static ESExpResult *search_user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+static ESExpResult *search_message_location (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s);
+
+static ESExpResult *search_dummy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search);
 
 static gint read_uid_callback (gpointer  ref, gint ncol, gchar ** cols, gchar **name);
 
@@ -162,7 +162,7 @@ static void
 camel_folder_search_init (CamelFolderSearch *search)
 {
 	search->priv = CAMEL_FOLDER_SEARCH_GET_PRIVATE (search);
-	search->sexp = e_sexp_new();
+	search->sexp = e_sexp_new ();
 }
 
 static struct {
@@ -222,9 +222,9 @@ camel_folder_search_construct (CamelFolderSearch *search)
 		}
 		if (func != NULL) {
 			if (builtins[i].flags&2) {
-				e_sexp_add_ifunction(search->sexp, 0, builtins[i].name, (ESExpIFunc *)func, search);
+				e_sexp_add_ifunction (search->sexp, 0, builtins[i].name, (ESExpIFunc *)func, search);
 			} else {
-				e_sexp_add_function(search->sexp, 0, builtins[i].name, (ESExpFunc *)func, search);
+				e_sexp_add_function (search->sexp, 0, builtins[i].name, (ESExpFunc *)func, search);
 			}
 		}
 	}
@@ -248,7 +248,7 @@ camel_folder_search_new (void)
 	CamelFolderSearch *new;
 
 	new = g_object_new (CAMEL_TYPE_FOLDER_SEARCH, NULL);
-	camel_folder_search_construct(new);
+	camel_folder_search_construct (new);
 
 	return new;
 }
@@ -263,7 +263,7 @@ camel_folder_search_new (void)
  * available.  Or for use by subclasses.
  **/
 void
-camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder)
+camel_folder_search_set_folder (CamelFolderSearch *search, CamelFolder *folder)
 {
 	search->folder = folder;
 }
@@ -279,7 +279,7 @@ camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder)
  * for searching headers and for the match-all operator.
  **/
 void
-camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary)
+camel_folder_search_set_summary (CamelFolderSearch *search, GPtrArray *summary)
 {
 	search->summary = summary;
 }
@@ -295,7 +295,7 @@ camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary)
  * body-contains function.
  **/
 void
-camel_folder_search_set_body_index(CamelFolderSearch *search, CamelIndex *index)
+camel_folder_search_set_body_index (CamelFolderSearch *search, CamelIndex *index)
 {
 	if (search->body_index)
 		g_object_unref (search->body_index);
@@ -337,63 +337,63 @@ camel_folder_search_execute_expression (CamelFolderSearch *search,
 
 	/* only re-parse if the search has changed */
 	if (search->last_search == NULL
-	    || strcmp(search->last_search, expr)) {
-		e_sexp_input_text(search->sexp, expr, strlen(expr));
-		if (e_sexp_parse(search->sexp) == -1) {
+	    || strcmp (search->last_search, expr)) {
+		e_sexp_input_text (search->sexp, expr, strlen (expr));
+		if (e_sexp_parse (search->sexp) == -1) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Cannot parse search expression: %s:\n%s"),
-				e_sexp_error(search->sexp), expr);
+				e_sexp_error (search->sexp), expr);
 			return NULL;
 		}
 
-		g_free(search->last_search);
-		search->last_search = g_strdup(expr);
+		g_free (search->last_search);
+		search->last_search = g_strdup (expr);
 	}
-	r = e_sexp_eval(search->sexp);
+	r = e_sexp_eval (search->sexp);
 	if (r == NULL) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Error executing search expression: %s:\n%s"),
-			e_sexp_error(search->sexp), expr);
+			e_sexp_error (search->sexp), expr);
 		return NULL;
 	}
 
-	matches = g_ptr_array_new();
+	matches = g_ptr_array_new ();
 
 	/* now create a folder summary to return?? */
 	if (r->type == ESEXP_RES_ARRAY_PTR) {
 		d(printf("got result ...\n"));
 		if (search->summary) {
 			/* reorder result in summary order */
-			results = g_hash_table_new(g_str_hash, g_str_equal);
+			results = g_hash_table_new (g_str_hash, g_str_equal);
 			for (i=0;i<r->value.ptrarray->len;i++) {
 				d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), GINT_TO_POINTER (1));
+				g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
 			}
 			for (i=0;i<search->summary->len;i++) {
-				gchar *uid = g_ptr_array_index(search->summary, i);
-				if (g_hash_table_lookup(results, uid)) {
-					g_ptr_array_add(matches, (gpointer) camel_pstring_strdup(uid));
+				gchar *uid = g_ptr_array_index (search->summary, i);
+				if (g_hash_table_lookup (results, uid)) {
+					g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (uid));
 				}
 			}
-			g_hash_table_destroy(results);
+			g_hash_table_destroy (results);
 		} else {
 			for (i=0;i<r->value.ptrarray->len;i++) {
 				d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_ptr_array_add(matches, (gpointer) camel_pstring_strdup(g_ptr_array_index(r->value.ptrarray, i)));
+				g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (g_ptr_array_index (r->value.ptrarray, i)));
 			}
 		}
 	} else {
 		g_warning("Search returned an invalid result type");
 	}
 
-	e_sexp_result_free(search->sexp, r);
+	e_sexp_result_free (search->sexp, r);
 
 	if (p->threads)
-		camel_folder_thread_messages_unref(p->threads);
+		camel_folder_thread_messages_unref (p->threads);
 	if (p->threads_hash)
-		g_hash_table_destroy(p->threads_hash);
+		g_hash_table_destroy (p->threads_hash);
 
 	p->threads = NULL;
 	p->threads_hash = NULL;
@@ -435,38 +435,38 @@ camel_folder_search_count (CamelFolderSearch *search,
 
 	CamelFolderSearchPrivate *p = search->priv;
 
-	g_assert(search->folder);
+	g_assert (search->folder);
 
 	p->error = error;
 
 	/* We route body-contains search and thread based search through memory and not via db. */
 	if (strstr((const gchar *) expr, "body-contains") || strstr((const gchar *) expr, "match-threads")) {
 		/* setup our search list only contains those we're interested in */
-		search->summary = camel_folder_get_summary(search->folder);
+		search->summary = camel_folder_get_summary (search->folder);
 
 		summary_set = search->summary;
 
 		/* only re-parse if the search has changed */
 		if (search->last_search == NULL
-		    || strcmp(search->last_search, expr)) {
-			e_sexp_input_text(search->sexp, expr, strlen(expr));
-			if (e_sexp_parse(search->sexp) == -1) {
+		    || strcmp (search->last_search, expr)) {
+			e_sexp_input_text (search->sexp, expr, strlen (expr));
+			if (e_sexp_parse (search->sexp) == -1) {
 				g_set_error (
 					error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 					_("Cannot parse search expression: %s:\n%s"),
-					e_sexp_error(search->sexp), expr);
+					e_sexp_error (search->sexp), expr);
 				goto fail;
 			}
 
-			g_free(search->last_search);
-			search->last_search = g_strdup(expr);
+			g_free (search->last_search);
+			search->last_search = g_strdup (expr);
 		}
-		r = e_sexp_eval(search->sexp);
+		r = e_sexp_eval (search->sexp);
 		if (r == NULL) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Error executing search expression: %s:\n%s"),
-				e_sexp_error(search->sexp), expr);
+				e_sexp_error (search->sexp), expr);
 			goto fail;
 		}
 
@@ -475,21 +475,21 @@ camel_folder_search_count (CamelFolderSearch *search,
 			d(printf("got result\n"));
 
 			/* reorder result in summary order */
-			results = g_hash_table_new(g_str_hash, g_str_equal);
+			results = g_hash_table_new (g_str_hash, g_str_equal);
 			for (i=0;i<r->value.ptrarray->len;i++) {
 				d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), GINT_TO_POINTER (1));
+				g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
 			}
 
 			for (i=0;i<summary_set->len;i++) {
-				gchar *uid = g_ptr_array_index(summary_set, i);
-				if (g_hash_table_lookup(results, uid))
+				gchar *uid = g_ptr_array_index (summary_set, i);
+				if (g_hash_table_lookup (results, uid))
 					count++;
 			}
-			g_hash_table_destroy(results);
+			g_hash_table_destroy (results);
 		}
 
-		e_sexp_result_free(search->sexp, r);
+		e_sexp_result_free (search->sexp, r);
 
 	} else {
 		CamelStore *parent_store;
@@ -530,13 +530,13 @@ camel_folder_search_count (CamelFolderSearch *search,
 fail:
 	/* these might be allocated by match-threads */
 	if (p->threads)
-		camel_folder_thread_messages_unref(p->threads);
+		camel_folder_thread_messages_unref (p->threads);
 	if (p->threads_hash)
-		g_hash_table_destroy(p->threads_hash);
+		g_hash_table_destroy (p->threads_hash);
 	if (search->summary_set)
-		g_ptr_array_free(search->summary_set, TRUE);
+		g_ptr_array_free (search->summary_set, TRUE);
 	if (search->summary)
-		camel_folder_free_summary(search->folder, search->summary);
+		camel_folder_free_summary (search->folder, search->summary);
 
 	p->threads = NULL;
 	p->threads_hash = NULL;
@@ -594,75 +594,75 @@ camel_folder_search_search (CamelFolderSearch *search,
 
 	CamelFolderSearchPrivate *p = search->priv;
 
-	g_assert(search->folder);
+	g_assert (search->folder);
 
 	p->error = error;
 
 	/* We route body-contains / thread based search and uid search through memory and not via db. */
 	if (uids || do_search_in_memory (expr)) {
 		/* setup our search list only contains those we're interested in */
-		search->summary = camel_folder_get_summary(search->folder);
+		search->summary = camel_folder_get_summary (search->folder);
 
 		if (uids) {
-			GHashTable *uids_hash = g_hash_table_new(g_str_hash, g_str_equal);
+			GHashTable *uids_hash = g_hash_table_new (g_str_hash, g_str_equal);
 
-			summary_set = search->summary_set = g_ptr_array_new();
+			summary_set = search->summary_set = g_ptr_array_new ();
 			for (i=0;i<uids->len;i++)
-				g_hash_table_insert(uids_hash, uids->pdata[i], uids->pdata[i]);
+				g_hash_table_insert (uids_hash, uids->pdata[i], uids->pdata[i]);
 			for (i=0;i<search->summary->len;i++)
-				if (g_hash_table_lookup(uids_hash, search->summary->pdata[i]))
-					g_ptr_array_add(search->summary_set, search->summary->pdata[i]);
-			g_hash_table_destroy(uids_hash);
+				if (g_hash_table_lookup (uids_hash, search->summary->pdata[i]))
+					g_ptr_array_add (search->summary_set, search->summary->pdata[i]);
+			g_hash_table_destroy (uids_hash);
 		} else {
 			summary_set = search->summary;
 		}
 
 		/* only re-parse if the search has changed */
 		if (search->last_search == NULL
-		    || strcmp(search->last_search, expr)) {
-			e_sexp_input_text(search->sexp, expr, strlen(expr));
-			if (e_sexp_parse(search->sexp) == -1) {
+		    || strcmp (search->last_search, expr)) {
+			e_sexp_input_text (search->sexp, expr, strlen (expr));
+			if (e_sexp_parse (search->sexp) == -1) {
 				g_set_error (
 					error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 					_("Cannot parse search expression: %s:\n%s"),
-					e_sexp_error(search->sexp), expr);
+					e_sexp_error (search->sexp), expr);
 				goto fail;
 			}
 
-			g_free(search->last_search);
-			search->last_search = g_strdup(expr);
+			g_free (search->last_search);
+			search->last_search = g_strdup (expr);
 		}
-		r = e_sexp_eval(search->sexp);
+		r = e_sexp_eval (search->sexp);
 		if (r == NULL) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Error executing search expression: %s:\n%s"),
-				e_sexp_error(search->sexp), expr);
+				e_sexp_error (search->sexp), expr);
 			goto fail;
 		}
 
-		matches = g_ptr_array_new();
+		matches = g_ptr_array_new ();
 
 		/* now create a folder summary to return?? */
 		if (r->type == ESEXP_RES_ARRAY_PTR) {
 			d(printf("got result\n"));
 
 			/* reorder result in summary order */
-			results = g_hash_table_new(g_str_hash, g_str_equal);
+			results = g_hash_table_new (g_str_hash, g_str_equal);
 			for (i=0;i<r->value.ptrarray->len;i++) {
 				d(printf("adding match: %s\n", (gchar *)g_ptr_array_index(r->value.ptrarray, i)));
-				g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), GINT_TO_POINTER (1));
+				g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
 			}
 
 			for (i=0;i<summary_set->len;i++) {
-				gchar *uid = g_ptr_array_index(summary_set, i);
-				if (g_hash_table_lookup(results, uid))
-					g_ptr_array_add(matches, (gpointer) camel_pstring_strdup(uid));
+				gchar *uid = g_ptr_array_index (summary_set, i);
+				if (g_hash_table_lookup (results, uid))
+					g_ptr_array_add (matches, (gpointer) camel_pstring_strdup (uid));
 			}
-			g_hash_table_destroy(results);
+			g_hash_table_destroy (results);
 		}
 
-		e_sexp_result_free(search->sexp, r);
+		e_sexp_result_free (search->sexp, r);
 
 	} else {
 		CamelStore *parent_store;
@@ -686,7 +686,7 @@ camel_folder_search_search (CamelFolderSearch *search,
 		g_free (sql_query);
 		dd(printf("Equivalent sql %s\n", tmp));
 
-		matches = g_ptr_array_new();
+		matches = g_ptr_array_new ();
 		cdb = (CamelDB *) (parent_store->cdb_r);
 		camel_db_select (
 			cdb, tmp, (CamelDBSelectCB)
@@ -707,13 +707,13 @@ camel_folder_search_search (CamelFolderSearch *search,
 fail:
 	/* these might be allocated by match-threads */
 	if (p->threads)
-		camel_folder_thread_messages_unref(p->threads);
+		camel_folder_thread_messages_unref (p->threads);
 	if (p->threads_hash)
-		g_hash_table_destroy(p->threads_hash);
+		g_hash_table_destroy (p->threads_hash);
 	if (search->summary_set)
-		g_ptr_array_free(search->summary_set, TRUE);
+		g_ptr_array_free (search->summary_set, TRUE);
 	if (search->summary)
-		camel_folder_free_summary(search->folder, search->summary);
+		camel_folder_free_summary (search->folder, search->summary);
 
 	p->threads = NULL;
 	p->threads_hash = NULL;
@@ -726,24 +726,24 @@ fail:
 	return matches;
 }
 
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *result)
+void camel_folder_search_free_result (CamelFolderSearch *search, GPtrArray *result)
 {
 	g_ptr_array_foreach (result, (GFunc) camel_pstring_free, NULL);
-	g_ptr_array_free(result, TRUE);
+	g_ptr_array_free (result, TRUE);
 }
 
 /* dummy function, returns false always, or an empty match array */
 static ESExpResult *
-search_dummy(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_dummy (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	ESExpResult *r;
 
 	if (search->current == NULL) {
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = FALSE;
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+		r->value.ptrarray = g_ptr_array_new ();
 	}
 
 	return r;
@@ -751,7 +751,7 @@ search_dummy(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolde
 
 /* impelemnt an 'array not', i.e. everything in the summary, not in the supplied array */
 static ESExpResult *
-search_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	ESExpResult *r;
 	gint i;
@@ -761,42 +761,42 @@ search_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderS
 			GPtrArray *v = argv[0]->value.ptrarray;
 			const gchar *uid;
 
-			r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-			r->value.ptrarray = g_ptr_array_new();
+			r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+			r->value.ptrarray = g_ptr_array_new ();
 
 			/* not against a single message?*/
 			if (search->current) {
 				gint found = FALSE;
 
-				uid = camel_message_info_uid(search->current);
+				uid = camel_message_info_uid (search->current);
 				for (i=0;!found && i<v->len;i++) {
-					if (strcmp(uid, v->pdata[i]) == 0)
+					if (strcmp (uid, v->pdata[i]) == 0)
 						found = TRUE;
 				}
 
 				if (!found)
-					g_ptr_array_add(r->value.ptrarray, (gchar *)uid);
+					g_ptr_array_add (r->value.ptrarray, (gchar *)uid);
 			} else if (search->summary == NULL) {
 				g_warning("No summary set, 'not' against an array requires a summary");
 			} else {
 				/* 'not' against the whole summary */
-				GHashTable *have = g_hash_table_new(g_str_hash, g_str_equal);
+				GHashTable *have = g_hash_table_new (g_str_hash, g_str_equal);
 				gchar **s;
 				gchar **m;
 
 				s = (gchar **)v->pdata;
 				for (i=0;i<v->len;i++)
-					g_hash_table_insert(have, s[i], s[i]);
+					g_hash_table_insert (have, s[i], s[i]);
 
 				v = search->summary_set?search->summary_set:search->summary;
 				m = (gchar **)v->pdata;
 				for (i=0;i<v->len;i++) {
 					gchar *uid = m[i];
 
-					if (g_hash_table_lookup(have, uid) == NULL)
-						g_ptr_array_add(r->value.ptrarray, uid);
+					if (g_hash_table_lookup (have, uid) == NULL)
+						g_ptr_array_add (r->value.ptrarray, uid);
 				}
-				g_hash_table_destroy(have);
+				g_hash_table_destroy (have);
 			}
 		} else {
 			gint res = TRUE;
@@ -804,11 +804,11 @@ search_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderS
 			if (argv[0]->type == ESEXP_RES_BOOL)
 				res = !argv[0]->value.boolean;
 
-			r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = res;
 		}
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = TRUE;
 	}
 
@@ -816,7 +816,7 @@ search_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderS
 }
 
 static ESExpResult *
-search_match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
+search_match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
 {
 	gint i;
 	ESExpResult *r, *r1;
@@ -831,33 +831,33 @@ search_match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFol
 	if (search->current) {
 		d(printf("matching against 1 message: %s\n", camel_message_info_subject(search->current)));
 
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = FALSE;
 
 		if (argc>0) {
-			r1 = e_sexp_term_eval(f, argv[0]);
+			r1 = e_sexp_term_eval (f, argv[0]);
 			if (r1->type == ESEXP_RES_BOOL) {
 				r->value.boolean = r1->value.boolean;
 			} else {
 				g_warning("invalid syntax, matches require a single bool result");
 				error_msg = g_strdup_printf(_("(%s) requires a single bool result"), "match-all");
-				e_sexp_fatal_error(f, error_msg);
-				g_free(error_msg);
+				e_sexp_fatal_error (f, error_msg);
+				g_free (error_msg);
 			}
-			e_sexp_result_free(f, r1);
+			e_sexp_result_free (f, r1);
 		} else {
 			r->value.boolean = TRUE;
 		}
 		return r;
 	}
 
-	r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-	r->value.ptrarray = g_ptr_array_new();
+	r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+	r->value.ptrarray = g_ptr_array_new ();
 
 	if (search->summary == NULL) {
 		/* TODO: make it work - e.g. use the folder and so forth for a slower search */
 		g_warning("No summary supplied, match-all doesn't work with no summary");
-		g_assert(0);
+		g_assert (0);
 		return r;
 	}
 
@@ -873,22 +873,22 @@ search_match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFol
 		search->current = camel_folder_summary_uid (search->folder->summary, v->pdata[i]);
 		if (!search->current)
 			continue;
-		uid = camel_message_info_uid(search->current);
+		uid = camel_message_info_uid (search->current);
 
 		if (argc>0) {
-			r1 = e_sexp_term_eval(f, argv[0]);
+			r1 = e_sexp_term_eval (f, argv[0]);
 			if (r1->type == ESEXP_RES_BOOL) {
 				if (r1->value.boolean)
-					g_ptr_array_add(r->value.ptrarray, (gchar *)uid);
+					g_ptr_array_add (r->value.ptrarray, (gchar *)uid);
 			} else {
 				g_warning("invalid syntax, matches require a single bool result");
 				error_msg = g_strdup_printf(_("(%s) requires a single bool result"), "match-all");
-				e_sexp_fatal_error(f, error_msg);
-				g_free(error_msg);
+				e_sexp_fatal_error (f, error_msg);
+				g_free (error_msg);
 			}
-			e_sexp_result_free(f, r1);
+			e_sexp_result_free (f, r1);
 		} else {
-			g_ptr_array_add(r->value.ptrarray, (gchar *)uid);
+			g_ptr_array_add (r->value.ptrarray, (gchar *)uid);
 		}
 		camel_message_info_free (search->current);
 	}
@@ -897,35 +897,35 @@ search_match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFol
 }
 
 static void
-fill_thread_table(struct _CamelFolderThreadNode *root, GHashTable *id_hash)
+fill_thread_table (struct _CamelFolderThreadNode *root, GHashTable *id_hash)
 {
 	while (root) {
-		g_hash_table_insert(id_hash, (gchar *)camel_message_info_uid(root->message), root);
+		g_hash_table_insert (id_hash, (gchar *)camel_message_info_uid (root->message), root);
 		if (root->child)
-			fill_thread_table(root->child, id_hash);
+			fill_thread_table (root->child, id_hash);
 		root = root->next;
 	}
 }
 
 static void
-add_thread_results(struct _CamelFolderThreadNode *root, GHashTable *result_hash)
+add_thread_results (struct _CamelFolderThreadNode *root, GHashTable *result_hash)
 {
 	while (root) {
-		g_hash_table_insert(result_hash, (gchar *)camel_message_info_uid(root->message), GINT_TO_POINTER (1));
+		g_hash_table_insert (result_hash, (gchar *)camel_message_info_uid (root->message), GINT_TO_POINTER (1));
 		if (root->child)
-			add_thread_results(root->child, result_hash);
+			add_thread_results (root->child, result_hash);
 		root = root->next;
 	}
 }
 
 static void
-add_results(gchar *uid, gpointer dummy, GPtrArray *result)
+add_results (gchar *uid, gpointer dummy, GPtrArray *result)
 {
-	g_ptr_array_add(result, uid);
+	g_ptr_array_add (result, uid);
 }
 
 static ESExpResult *
-search_match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
+search_match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, CamelFolderSearch *search)
 {
 	ESExpResult *r;
 	CamelFolderSearchPrivate *p = search->priv;
@@ -936,21 +936,21 @@ search_match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, Came
 	/* not supported in match-all */
 	if (search->current) {
 		error_msg = g_strdup_printf(_("(%s) not allowed inside %s"), "match-threads", "match-all");
-		e_sexp_fatal_error(f, error_msg);
-		g_free(error_msg);
+		e_sexp_fatal_error (f, error_msg);
+		g_free (error_msg);
 	}
 
 	if (argc == 0) {
 		error_msg = g_strdup_printf(_("(%s) requires a match type string"), "match-threads");
-		e_sexp_fatal_error(f, error_msg);
-		g_free(error_msg);
+		e_sexp_fatal_error (f, error_msg);
+		g_free (error_msg);
 	}
 
-	r = e_sexp_term_eval(f, argv[0]);
+	r = e_sexp_term_eval (f, argv[0]);
 	if (r->type != ESEXP_RES_STRING) {
 		error_msg = g_strdup_printf(_("(%s) requires a match type string"), "match-threads");
-		e_sexp_fatal_error(f, error_msg);
-		g_free(error_msg);
+		e_sexp_fatal_error (f, error_msg);
+		g_free (error_msg);
 	}
 
 	type = 0;
@@ -964,20 +964,20 @@ search_match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, Came
 		type = 3;
 	else if (!strcmp(r->value.string, "single"))
 		type = 4;
-	e_sexp_result_free(f, r);
+	e_sexp_result_free (f, r);
 
 	/* behave as (begin does */
 	r = NULL;
 	for (i=1;i<argc;i++) {
 		if (r)
-			e_sexp_result_free(f, r);
-		r = e_sexp_term_eval(f, argv[i]);
+			e_sexp_result_free (f, r);
+		r = e_sexp_term_eval (f, argv[i]);
 	}
 
 	if (r == NULL || r->type != ESEXP_RES_ARRAY_PTR) {
 		error_msg = g_strdup_printf(_("(%s) expects an array result"), "match-threads");
-		e_sexp_fatal_error(f, error_msg);
-		g_free(error_msg);
+		e_sexp_fatal_error (f, error_msg);
+		g_free (error_msg);
 	}
 
 	if (type == 0)
@@ -985,56 +985,56 @@ search_match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, Came
 
 	if (search->folder == NULL) {
 		error_msg = g_strdup_printf(_("(%s) requires the folder set"), "match-threads");
-		e_sexp_fatal_error(f, error_msg);
-		g_free(error_msg);
+		e_sexp_fatal_error (f, error_msg);
+		g_free (error_msg);
 	}
 
 	/* cache this, so we only have to re-calculate once per search at most */
 	if (p->threads == NULL) {
-		p->threads = camel_folder_thread_messages_new(search->folder, NULL, TRUE);
-		p->threads_hash = g_hash_table_new(g_str_hash, g_str_equal);
+		p->threads = camel_folder_thread_messages_new (search->folder, NULL, TRUE);
+		p->threads_hash = g_hash_table_new (g_str_hash, g_str_equal);
 
-		fill_thread_table(p->threads->tree, p->threads_hash);
+		fill_thread_table (p->threads->tree, p->threads_hash);
 	}
 
-	results = g_hash_table_new(g_str_hash, g_str_equal);
+	results = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i=0;i<r->value.ptrarray->len;i++) {
 		struct _CamelFolderThreadNode *node, *scan;
 
 		if (type != 4)
-			g_hash_table_insert(results, g_ptr_array_index(r->value.ptrarray, i), GINT_TO_POINTER(1));
+			g_hash_table_insert (results, g_ptr_array_index (r->value.ptrarray, i), GINT_TO_POINTER (1));
 
-		node = g_hash_table_lookup(p->threads_hash, (gchar *)g_ptr_array_index(r->value.ptrarray, i));
+		node = g_hash_table_lookup (p->threads_hash, (gchar *)g_ptr_array_index (r->value.ptrarray, i));
 		if (node == NULL) /* this shouldn't happen but why cry over spilt milk */
 			continue;
 
 		/* select messages in thread according to search criteria */
 		if (type == 4) {
 			if (node->child == NULL && node->parent == NULL)
-				g_hash_table_insert(results, (gchar *)camel_message_info_uid(node->message), GINT_TO_POINTER(1));
+				g_hash_table_insert (results, (gchar *)camel_message_info_uid (node->message), GINT_TO_POINTER (1));
 		} else {
 			if (type == 3) {
 				scan = node;
 				while (scan && scan->parent) {
 					scan = scan->parent;
-					g_hash_table_insert(results, (gchar *)camel_message_info_uid(scan->message), GINT_TO_POINTER(1));
+					g_hash_table_insert (results, (gchar *)camel_message_info_uid (scan->message), GINT_TO_POINTER (1));
 				}
 			} else if (type == 1) {
 				while (node && node->parent)
 					node = node->parent;
 			}
-			g_hash_table_insert(results, (gchar *)camel_message_info_uid(node->message), GINT_TO_POINTER(1));
+			g_hash_table_insert (results, (gchar *)camel_message_info_uid (node->message), GINT_TO_POINTER (1));
 			if (node->child)
-				add_thread_results(node->child, results);
+				add_thread_results (node->child, results);
 		}
 	}
-	e_sexp_result_free(f, r);
+	e_sexp_result_free (f, r);
 
-	r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-	r->value.ptrarray = g_ptr_array_new();
+	r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+	r->value.ptrarray = g_ptr_array_new ();
 
-	g_hash_table_foreach(results, (GHFunc)add_results, r->value.ptrarray);
-	g_hash_table_destroy(results);
+	g_hash_table_foreach (results, (GHFunc)add_results, r->value.ptrarray);
+	g_hash_table_destroy (results);
 
 	return r;
 }
@@ -1072,22 +1072,22 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
 		/* only a subset of headers are supported .. */
 		headername = argv[0]->value.string;
 		if (!g_ascii_strcasecmp(headername, "subject")) {
-			header = camel_message_info_subject(search->current);
+			header = camel_message_info_subject (search->current);
 		} else if (!g_ascii_strcasecmp(headername, "date")) {
 			/* FIXME: not a very useful form of the date */
 			sprintf(strbuf, "%d", (gint)camel_message_info_date_sent(search->current));
 			header = strbuf;
 		} else if (!g_ascii_strcasecmp(headername, "from")) {
-			header = camel_message_info_from(search->current);
+			header = camel_message_info_from (search->current);
 			type = CAMEL_SEARCH_TYPE_ADDRESS;
 		} else if (!g_ascii_strcasecmp(headername, "to")) {
-			header = camel_message_info_to(search->current);
+			header = camel_message_info_to (search->current);
 			type = CAMEL_SEARCH_TYPE_ADDRESS;
 		} else if (!g_ascii_strcasecmp(headername, "cc")) {
-			header = camel_message_info_cc(search->current);
+			header = camel_message_info_cc (search->current);
 			type = CAMEL_SEARCH_TYPE_ADDRESS;
 		} else if (!g_ascii_strcasecmp(headername, "x-camel-mlist")) {
-			header = camel_message_info_mlist(search->current);
+			header = camel_message_info_mlist (search->current);
 			type = CAMEL_SEARCH_TYPE_MLIST;
 		} else {
 			message = get_current_message (search);
@@ -1111,7 +1111,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
 					truth = TRUE;
 				} else if (how == CAMEL_SEARCH_MATCH_CONTAINS) {
 					/* doesn't make sense to split words on anything but contains i.e. we can't have an ending match different words */
-					words = camel_search_words_split((const guchar *) argv[i]->value.string);
+					words = camel_search_words_split ((const guchar *) argv[i]->value.string);
 					truth = TRUE;
 					for (j=0;j<words->len && truth;j++) {
 						if (message) {
@@ -1124,18 +1124,18 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
 
 							truth = raw_header != NULL;
 						} else
-							truth = camel_search_header_match(header, words->words[j]->word, how, type, charset);
+							truth = camel_search_header_match (header, words->words[j]->word, how, type, charset);
 					}
-					camel_search_words_free(words);
+					camel_search_words_free (words);
 				} else {
 					if (message) {
 						for (raw_header = ((CamelMimePart *)message)->headers; raw_header && !truth; raw_header = raw_header->next) {
 							if (!g_ascii_strcasecmp (raw_header->name, headername)) {
-								truth = camel_search_header_match(raw_header->value, argv[i]->value.string, how, type, charset);
+								truth = camel_search_header_match (raw_header->value, argv[i]->value.string, how, type, charset);
 							}
 						}
 					} else
-						truth = camel_search_header_match(header, argv[i]->value.string, how, type, charset);
+						truth = camel_search_header_match (header, argv[i]->value.string, how, type, charset);
 				}
 			}
 		}
@@ -1145,7 +1145,7 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
 	}
 	/* TODO: else, find all matches */
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = truth;
 
 	return r;
@@ -1153,34 +1153,34 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFold
 
 /*
 static void
-l_printf(gchar *node)
+l_printf (gchar *node)
 {
 printf("%s\t", node);
 }
 */
 
 static ESExpResult *
-search_header_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_CONTAINS);
+	return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_CONTAINS);
 }
 
 static ESExpResult *
-search_header_matches(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_EXACT);
+	return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_EXACT);
 }
 
 static ESExpResult *
 search_header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_STARTS);
+	return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_STARTS);
 }
 
 static ESExpResult *
 search_header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
-	return check_header(f, argc, argv, search, CAMEL_SEARCH_MATCH_ENDS);
+	return check_header (f, argc, argv, search, CAMEL_SEARCH_MATCH_ENDS);
 }
 
 static ESExpResult *
@@ -1191,13 +1191,13 @@ search_header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, C
 	r(printf ("executing header-exists\n"));
 
 	if (search->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		if (argc == 1 && argv[0]->type == ESEXP_RES_STRING)
-			r->value.boolean = camel_medium_get_header(CAMEL_MEDIUM(search->current), argv[0]->value.string) != NULL;
+			r->value.boolean = camel_medium_get_header (CAMEL_MEDIUM (search->current), argv[0]->value.string) != NULL;
 
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+		r->value.ptrarray = g_ptr_array_new ();
 	}
 
 	return r;
@@ -1234,7 +1234,7 @@ search_header_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Ca
 		g_object_unref (msg);
 	} else {
 		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r->value.ptrarray = g_ptr_array_new ();
 	}
 
 	return r;
@@ -1289,7 +1289,7 @@ search_header_full_regex (struct _ESExp *f, gint argc, struct _ESExpResult **arg
 		g_object_unref (msg);
 	} else {
 		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r->value.ptrarray = g_ptr_array_new ();
 	}
 
 	return r;
@@ -1303,17 +1303,17 @@ struct IterData {
 
 /* or, store all unique values */
 static void
-htor(gchar *key, gint value, struct IterData *iter_data)
+htor (gchar *key, gint value, struct IterData *iter_data)
 {
-	g_ptr_array_add(iter_data->uids, key);
+	g_ptr_array_add (iter_data->uids, key);
 }
 
 /* and, only store duplicates */
 static void
-htand(gchar *key, gint value, struct IterData *iter_data)
+htand (gchar *key, gint value, struct IterData *iter_data)
 {
 	if (value == iter_data->count)
-		g_ptr_array_add(iter_data->uids, key);
+		g_ptr_array_add (iter_data->uids, key);
 }
 
 static gint
@@ -1326,15 +1326,15 @@ match_message_index (CamelIndex *idx,
 	const gchar *word, *name;
 	gint truth = FALSE;
 
-	wc = camel_index_words(idx);
+	wc = camel_index_words (idx);
 	if (wc) {
-		while (!truth && (word = camel_index_cursor_next(wc))) {
-			if (camel_ustrstrcase(word,match) != NULL) {
+		while (!truth && (word = camel_index_cursor_next (wc))) {
+			if (camel_ustrstrcase (word,match) != NULL) {
 				/* perf: could have the wc cursor return the name cursor */
-				nc = camel_index_find(idx, word);
+				nc = camel_index_find (idx, word);
 				if (nc) {
-					while (!truth && (name = camel_index_cursor_next(nc)))
-						truth = strcmp(name, uid) == 0;
+					while (!truth && (name = camel_index_cursor_next (nc)))
+						truth = strcmp (name, uid) == 0;
 					g_object_unref (nc);
 				}
 			}
@@ -1361,8 +1361,8 @@ match_words_index (CamelFolderSearch *search,
                    struct _camel_search_words *words,
                    GError **error)
 {
-	GPtrArray *result = g_ptr_array_new();
-	GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
+	GPtrArray *result = g_ptr_array_new ();
+	GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
 	struct IterData lambdafoo;
 	CamelIndexCursor *wc, *nc;
 	const gchar *word, *name;
@@ -1370,19 +1370,19 @@ match_words_index (CamelFolderSearch *search,
 
 	/* we can have a maximum of 32 words, as we use it as the AND mask */
 
-	wc = camel_index_words(search->body_index);
+	wc = camel_index_words (search->body_index);
 	if (wc) {
-		while ((word = camel_index_cursor_next(wc))) {
+		while ((word = camel_index_cursor_next (wc))) {
 			for (i=0;i<words->len;i++) {
-				if (camel_ustrstrcase(word, words->words[i]->word) != NULL) {
+				if (camel_ustrstrcase (word, words->words[i]->word) != NULL) {
 					/* perf: could have the wc cursor return the name cursor */
-					nc = camel_index_find(search->body_index, word);
+					nc = camel_index_find (search->body_index, word);
 					if (nc) {
-						while ((name = camel_index_cursor_next(nc))) {
+						while ((name = camel_index_cursor_next (nc))) {
 								gint mask;
 
-								mask = (GPOINTER_TO_INT(g_hash_table_lookup(ht, name))) | (1<<i);
-								g_hash_table_insert(ht, (gchar *) camel_pstring_peek(name), GINT_TO_POINTER(mask));
+								mask = (GPOINTER_TO_INT (g_hash_table_lookup (ht, name))) | (1<<i);
+								g_hash_table_insert (ht, (gchar *) camel_pstring_peek (name), GINT_TO_POINTER (mask));
 						}
 						g_object_unref (nc);
 					}
@@ -1393,8 +1393,8 @@ match_words_index (CamelFolderSearch *search,
 
 		lambdafoo.uids = result;
 		lambdafoo.count = (1<<words->len) - 1;
-		g_hash_table_foreach(ht, (GHFunc)htand, &lambdafoo);
-		g_hash_table_destroy(ht);
+		g_hash_table_foreach (ht, (GHFunc)htand, &lambdafoo);
+		g_hash_table_destroy (ht);
 	}
 
 	return result;
@@ -1418,11 +1418,11 @@ match_words_1message (CamelDataWrapper *object, struct _camel_search_words *word
 		for (i = 0; i < parts && truth == FALSE; i++) {
 			CamelDataWrapper *part = (CamelDataWrapper *)camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
 			if (part)
-				truth = match_words_1message(part, words, mask);
+				truth = match_words_1message (part, words, mask);
 		}
 	} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
 		/* for messages we only look at its contents */
-		truth = match_words_1message((CamelDataWrapper *)containee, words, mask);
+		truth = match_words_1message ((CamelDataWrapper *)containee, words, mask);
 	} else if (camel_content_type_is(CAMEL_DATA_WRAPPER (containee)->mime_type, "text", "*")) {
 		/* for all other text parts, we look inside, otherwise we dont care */
 		CamelStream *stream;
@@ -1436,7 +1436,7 @@ match_words_1message (CamelDataWrapper *object, struct _camel_search_words *word
 		camel_stream_write (stream, "", 1, NULL);
 		for (i=0;i<words->len;i++) {
 			/* FIXME: This is horridly slow, and should use a real search algorithm */
-			if (camel_ustrstrcase((const gchar *) byte_array->data, words->words[i]->word) != NULL) {
+			if (camel_ustrstrcase ((const gchar *) byte_array->data, words->words[i]->word) != NULL) {
 				*mask |= (1<<i);
 				/* shortcut a match */
 				if (*mask == (1<<(words->len))-1)
@@ -1460,10 +1460,10 @@ match_words_message (CamelFolder *folder,
 	CamelMimeMessage *msg;
 	gint truth = FALSE;
 
-	msg = camel_folder_get_message(folder, uid, NULL);
+	msg = camel_folder_get_message (folder, uid, NULL);
 	if (msg) {
 		mask = 0;
-		truth = match_words_1message((CamelDataWrapper *)msg, words, &mask);
+		truth = match_words_1message ((CamelDataWrapper *)msg, words, &mask);
 		g_object_unref (msg);
 	}
 
@@ -1476,32 +1476,32 @@ match_words_messages (CamelFolderSearch *search,
                       GError **error)
 {
 	gint i;
-	GPtrArray *matches = g_ptr_array_new();
+	GPtrArray *matches = g_ptr_array_new ();
 
 	if (search->body_index) {
 		GPtrArray *indexed;
 		struct _camel_search_words *simple;
 
-		simple = camel_search_words_simple(words);
-		indexed = match_words_index(search, simple, error);
-		camel_search_words_free(simple);
+		simple = camel_search_words_simple (words);
+		indexed = match_words_index (search, simple, error);
+		camel_search_words_free (simple);
 
 		for (i=0;i<indexed->len;i++) {
-			const gchar *uid = g_ptr_array_index(indexed, i);
+			const gchar *uid = g_ptr_array_index (indexed, i);
 
-			if (match_words_message(search->folder, uid, words, error))
-				g_ptr_array_add(matches, (gchar *)uid);
+			if (match_words_message (search->folder, uid, words, error))
+				g_ptr_array_add (matches, (gchar *)uid);
 		}
 
-		g_ptr_array_free(indexed, TRUE);
+		g_ptr_array_free (indexed, TRUE);
 	} else {
 		GPtrArray *v = search->summary_set?search->summary_set:search->summary;
 
 		for (i=0;i<v->len;i++) {
-			gchar *uid  = g_ptr_array_index(v, i);
+			gchar *uid  = g_ptr_array_index (v, i);
 
-			if (match_words_message(search->folder, uid, words, error))
-				g_ptr_array_add(matches, (gchar *)uid);
+			if (match_words_message (search->folder, uid, words, error))
+				g_ptr_array_add (matches, (gchar *)uid);
 		}
 	}
 
@@ -1509,7 +1509,7 @@ match_words_messages (CamelFolderSearch *search,
 }
 
 static ESExpResult *
-search_body_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	gint i, j;
 	GError **error = search->priv->error;
@@ -1525,55 +1525,55 @@ search_body_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, Ca
 		} else {
 			for (i=0;i<argc && !truth;i++) {
 				if (argv[i]->type == ESEXP_RES_STRING) {
-					words = camel_search_words_split((const guchar *) argv[i]->value.string);
+					words = camel_search_words_split ((const guchar *) argv[i]->value.string);
 					truth = TRUE;
 					if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
 						for (j=0;j<words->len && truth;j++)
-							truth = match_message_index(search->body_index, camel_message_info_uid(search->current), words->words[j]->word, error);
+							truth = match_message_index (search->body_index, camel_message_info_uid (search->current), words->words[j]->word, error);
 					} else {
 						/* TODO: cache current message incase of multiple body search terms */
-						truth = match_words_message(search->folder, camel_message_info_uid(search->current), words, error);
+						truth = match_words_message (search->folder, camel_message_info_uid (search->current), words, error);
 					}
-					camel_search_words_free(words);
+					camel_search_words_free (words);
 				}
 			}
 		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = truth;
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+		r->value.ptrarray = g_ptr_array_new ();
 
 		if (argc == 1 && argv[0]->value.string[0] == 0) {
 			GPtrArray *v = search->summary_set?search->summary_set:search->summary;
 
 			for (i=0;i<v->len;i++) {
-				gchar *uid = g_ptr_array_index(v, i);
+				gchar *uid = g_ptr_array_index (v, i);
 
-				g_ptr_array_add(r->value.ptrarray, uid);
+				g_ptr_array_add (r->value.ptrarray, uid);
 			}
 		} else {
-			GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
+			GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
 			GPtrArray *matches;
 
 			for (i=0;i<argc;i++) {
 				if (argv[i]->type == ESEXP_RES_STRING) {
-					words = camel_search_words_split((const guchar *) argv[i]->value.string);
+					words = camel_search_words_split ((const guchar *) argv[i]->value.string);
 					if ((words->type & CAMEL_SEARCH_WORD_COMPLEX) == 0 && search->body_index) {
-						matches = match_words_index(search, words, error);
+						matches = match_words_index (search, words, error);
 					} else {
-						matches = match_words_messages(search, words, error);
+						matches = match_words_messages (search, words, error);
 					}
 					for (j=0;j<matches->len;j++) {
-						g_hash_table_insert(ht, matches->pdata[j], matches->pdata[j]);
+						g_hash_table_insert (ht, matches->pdata[j], matches->pdata[j]);
 					}
-					g_ptr_array_free(matches, TRUE);
-					camel_search_words_free(words);
+					g_ptr_array_free (matches, TRUE);
+					camel_search_words_free (words);
 				}
 			}
 			lambdafoo.uids = r->value.ptrarray;
-			g_hash_table_foreach(ht, (GHFunc)htor, &lambdafoo);
-			g_hash_table_destroy(ht);
+			g_hash_table_foreach (ht, (GHFunc)htor, &lambdafoo);
+			g_hash_table_destroy (ht);
 		}
 	}
 
@@ -1601,7 +1601,7 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
 	} else {
 		regex_t pattern;
 
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
 
 		if (camel_search_build_match_regex (&pattern, CAMEL_SEARCH_MATCH_ICASE|CAMEL_SEARCH_MATCH_REGEX|CAMEL_SEARCH_MATCH_NEWLINE, argc, argv, search->priv->error) == 0) {
@@ -1610,7 +1610,7 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
 			CamelMimeMessage *message;
 
 			for (i = 0; i < v->len; i++) {
-				gchar *uid = g_ptr_array_index(v, i);
+				gchar *uid = g_ptr_array_index (v, i);
 
 				message = camel_folder_get_message (search->folder, uid, NULL);
 				if (message) {
@@ -1630,7 +1630,7 @@ search_body_regex (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Came
 }
 
 static ESExpResult *
-search_user_flag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	ESExpResult *r;
 	gint i;
@@ -1643,16 +1643,16 @@ search_user_flag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
 		/* performs an OR of all words */
 		for (i=0;i<argc && !truth;i++) {
 			if (argv[i]->type == ESEXP_RES_STRING
-			    && camel_message_info_user_flag(search->current, argv[i]->value.string)) {
+			    && camel_message_info_user_flag (search->current, argv[i]->value.string)) {
 				truth = TRUE;
 				break;
 			}
 		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = truth;
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+		r->value.ptrarray = g_ptr_array_new ();
 	}
 
 	return r;
@@ -1669,12 +1669,12 @@ search_system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
 		gboolean truth = FALSE;
 
 		if (argc == 1)
-			truth = camel_system_flag_get (camel_message_info_flags(search->current), argv[0]->value.string);
+			truth = camel_system_flag_get (camel_message_info_flags (search->current), argv[0]->value.string);
 
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = truth;
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
 	}
 
@@ -1682,7 +1682,7 @@ search_system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
 }
 
 static ESExpResult *
-search_user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	const gchar *value = NULL;
 	ESExpResult *r;
@@ -1690,16 +1690,16 @@ search_user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFo
 	r(printf("executing user-tag\n"));
 
 	if (search->current && argc == 1)
-		value = camel_message_info_user_tag(search->current, argv[0]->value.string);
+		value = camel_message_info_user_tag (search->current, argv[0]->value.string);
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup (value ? value : "");
 
 	return r;
 }
 
 static ESExpResult *
-search_get_sent_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
 {
 	ESExpResult *r;
 
@@ -1707,11 +1707,11 @@ search_get_sent_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, Ca
 
 	/* are we inside a match-all? */
 	if (s->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
+		r = e_sexp_result_new (f, ESEXP_RES_INT);
 
-		r->value.number = camel_message_info_date_sent(s->current);
+		r->value.number = camel_message_info_date_sent (s->current);
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
 	}
 
@@ -1719,7 +1719,7 @@ search_get_sent_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, Ca
 }
 
 static ESExpResult *
-search_get_received_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
 {
 	ESExpResult *r;
 
@@ -1727,11 +1727,11 @@ search_get_received_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv
 
 	/* are we inside a match-all? */
 	if (s->current) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
+		r = e_sexp_result_new (f, ESEXP_RES_INT);
 
-		r->value.number = camel_message_info_date_received(s->current);
+		r->value.number = camel_message_info_date_received (s->current);
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
 	}
 
@@ -1739,13 +1739,13 @@ search_get_received_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv
 }
 
 static ESExpResult *
-search_get_current_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
+search_get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *s)
 {
 	ESExpResult *r;
 
 	r(printf("executing get-current-date\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
+	r = e_sexp_result_new (f, ESEXP_RES_INT);
 	r->value.number = time (NULL);
 	return r;
 }
@@ -1760,7 +1760,7 @@ search_get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
 	/* are we inside a match-all? */
 	if (s->current) {
 		r = e_sexp_result_new (f, ESEXP_RES_INT);
-		r->value.number = camel_message_info_size(s->current) / 1024;
+		r->value.number = camel_message_info_size (s->current) / 1024;
 	} else {
 		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 		r->value.ptrarray = g_ptr_array_new ();
@@ -1770,7 +1770,7 @@ search_get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelF
 }
 
 static ESExpResult *
-search_uid(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
+search_uid (struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderSearch *search)
 {
 	ESExpResult *r;
 	gint i;
@@ -1780,24 +1780,24 @@ search_uid(struct _ESExp *f, gint argc, struct _ESExpResult **argv, CamelFolderS
 	/* are we inside a match-all? */
 	if (search->current) {
 		gint truth = FALSE;
-		const gchar *uid = camel_message_info_uid(search->current);
+		const gchar *uid = camel_message_info_uid (search->current);
 
 		/* performs an OR of all words */
 		for (i=0;i<argc && !truth;i++) {
 			if (argv[i]->type == ESEXP_RES_STRING
-			    && !strcmp(uid, argv[i]->value.string)) {
+			    && !strcmp (uid, argv[i]->value.string)) {
 				truth = TRUE;
 				break;
 			}
 		}
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = truth;
 	} else {
-		r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-		r->value.ptrarray = g_ptr_array_new();
+		r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+		r->value.ptrarray = g_ptr_array_new ();
 		for (i=0;i<argc;i++) {
 			if (argv[i]->type == ESEXP_RES_STRING)
-				g_ptr_array_add(r->value.ptrarray, argv[i]->value.string);
+				g_ptr_array_add (r->value.ptrarray, argv[i]->value.string);
 		}
 	}
 
diff --git a/camel/camel-folder-search.h b/camel/camel-folder-search.h
index 4a28272..e8ba03e 100644
--- a/camel/camel-folder-search.h
+++ b/camel/camel-folder-search.h
@@ -153,15 +153,15 @@ CamelFolderSearch      *camel_folder_search_new	(void);
 void camel_folder_search_construct (CamelFolderSearch *search);
 
 /* This stuff currently gets cleared when you run a search ... what on earth was i thinking ... */
-void camel_folder_search_set_folder(CamelFolderSearch *search, CamelFolder *folder);
-void camel_folder_search_set_summary(CamelFolderSearch *search, GPtrArray *summary);
-void camel_folder_search_set_body_index(CamelFolderSearch *search, CamelIndex *index);
+void camel_folder_search_set_folder (CamelFolderSearch *search, CamelFolder *folder);
+void camel_folder_search_set_summary (CamelFolderSearch *search, GPtrArray *summary);
+void camel_folder_search_set_body_index (CamelFolderSearch *search, CamelIndex *index);
 /* this interface is deprecated */
-GPtrArray *camel_folder_search_execute_expression(CamelFolderSearch *search, const gchar *expr, GError **error);
+GPtrArray *camel_folder_search_execute_expression (CamelFolderSearch *search, const gchar *expr, GError **error);
 
-GPtrArray *camel_folder_search_search(CamelFolderSearch *search, const gchar *expr, GPtrArray *uids, GError **error);
-guint32 camel_folder_search_count(CamelFolderSearch *search, const gchar *expr, GError **error);
-void camel_folder_search_free_result(CamelFolderSearch *search, GPtrArray *);
+GPtrArray *camel_folder_search_search (CamelFolderSearch *search, const gchar *expr, GPtrArray *uids, GError **error);
+guint32 camel_folder_search_count (CamelFolderSearch *search, const gchar *expr, GError **error);
+void camel_folder_search_free_result (CamelFolderSearch *search, GPtrArray *);
 
 G_END_DECLS
 
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 2fb8c9a..421ad9e 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -120,41 +120,41 @@ struct _node {
 
 static void cfs_schedule_info_release_timer (CamelFolderSummary *s);
 
-static struct _node *my_list_append(struct _node **list, struct _node *n);
-static gint my_list_size(struct _node **list);
+static struct _node *my_list_append (struct _node **list, struct _node *n);
+static gint my_list_size (struct _node **list);
 
-static gint summary_header_load(CamelFolderSummary *, FILE *);
-static gint summary_header_save(CamelFolderSummary *, FILE *);
+static gint summary_header_load (CamelFolderSummary *, FILE *);
+static gint summary_header_save (CamelFolderSummary *, FILE *);
 
-static CamelMessageInfo * message_info_new_from_header(CamelFolderSummary *, struct _camel_header_raw *);
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageInfo * message_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure);
-static CamelMessageInfo * message_info_migrate(CamelFolderSummary *, FILE *);
-static void		  message_info_free(CamelFolderSummary *, CamelMessageInfo *);
+static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
+static CamelMessageInfo * message_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure);
+static CamelMessageInfo * message_info_migrate (CamelFolderSummary *, FILE *);
+static void		  message_info_free (CamelFolderSummary *, CamelMessageInfo *);
 
-static CamelMessageContentInfo * content_info_new_from_header(CamelFolderSummary *, struct _camel_header_raw *);
-static CamelMessageContentInfo * content_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageContentInfo * content_info_new_from_message(CamelFolderSummary *s, CamelMimePart *mp);
-static CamelMessageContentInfo * content_info_migrate(CamelFolderSummary *, FILE *);
-static void			 content_info_free(CamelFolderSummary *, CamelMessageContentInfo *);
+static CamelMessageContentInfo * content_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageContentInfo * content_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
+static CamelMessageContentInfo * content_info_new_from_message (CamelFolderSummary *s, CamelMimePart *mp);
+static CamelMessageContentInfo * content_info_migrate (CamelFolderSummary *, FILE *);
+static void			 content_info_free (CamelFolderSummary *, CamelMessageContentInfo *);
 
 static gint save_message_infos_to_db (CamelFolderSummary *s, gboolean fresh_mir, GError **error);
 static gint camel_read_mir_callback (gpointer  ref, gint ncol, gchar ** cols, gchar ** name);
 
-static gchar *next_uid_string(CamelFolderSummary *s);
+static gchar *next_uid_string (CamelFolderSummary *s);
 
-static CamelMessageContentInfo * summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp);
-static CamelMessageContentInfo * summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object);
+static CamelMessageContentInfo * summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp);
+static CamelMessageContentInfo * summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object);
 
 static CamelMessageInfo * message_info_from_uid (CamelFolderSummary *s, const gchar *uid);
 
 G_DEFINE_TYPE (CamelFolderSummary, camel_folder_summary, CAMEL_TYPE_OBJECT)
 
 static void
-free_o_name(gpointer key, gpointer value, gpointer data)
+free_o_name (gpointer key, gpointer value, gpointer data)
 {
 	g_object_unref (value);
-	g_free(key);
+	g_free (key);
 }
 
 static void
@@ -221,16 +221,16 @@ folder_summary_finalize (GObject *object)
 	g_ptr_array_free (summary->uids, TRUE);
 	g_hash_table_destroy (summary->loaded_infos);
 
-	g_hash_table_foreach(summary->priv->filter_charset, free_o_name, NULL);
-	g_hash_table_destroy(summary->priv->filter_charset);
+	g_hash_table_foreach (summary->priv->filter_charset, free_o_name, NULL);
+	g_hash_table_destroy (summary->priv->filter_charset);
 
 	g_hash_table_destroy (summary->priv->preview_updates);
 
-	g_free(summary->summary_path);
+	g_free (summary->summary_path);
 
 	/* Freeing memory occupied by meta-summary-header */
-	g_free(summary->meta_summary->path);
-	g_free(summary->meta_summary);
+	g_free (summary->meta_summary->path);
+	g_free (summary->meta_summary);
 
 	g_static_rec_mutex_free (&summary->priv->summary_lock);
 	g_static_rec_mutex_free (&summary->priv->io_lock);
@@ -334,7 +334,7 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 	gint count;
 	gchar *part, *label;
 
-	mi = (CamelMessageInfoBase *)camel_message_info_new(s);
+	mi = (CamelMessageInfoBase *)camel_message_info_new (s);
 
 	io(printf("Loading message info from db\n"));
 
@@ -362,7 +362,7 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 		EXTRACT_DIGIT (count)
 
 		if (count > 0) {
-			mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
+			mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
 			mi->references->size = count;
 			for (i=0;i<count;i++) {
 				EXTRACT_DIGIT (mi->references->references[i].id.part.hi)
@@ -381,11 +381,11 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 
 			if (part[i] == ' ') {
 				part[i] = 0;
-				camel_flag_set(&mi->user_flags, label, TRUE);
+				camel_flag_set (&mi->user_flags, label, TRUE);
 				label = &(part[i+1]);
 			}
 		}
-		camel_flag_set(&mi->user_flags, label, TRUE);
+		camel_flag_set (&mi->user_flags, label, TRUE);
 	}
 
 	/* Extract User tags */
@@ -396,9 +396,9 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 		gchar *name, *value;
 		EXTRACT_STRING (name)
 		EXTRACT_STRING (value)
-		camel_tag_set(&mi->user_tags, name, value);
-		g_free(name);
-		g_free(value);
+		camel_tag_set (&mi->user_tags, name, value);
+		g_free (name);
+		g_free (value);
 	}
 
 	return (CamelMessageInfo *) mi;
@@ -407,7 +407,7 @@ message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 static CamelMIRecord *
 message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 {
-	CamelMIRecord *record = g_new0(CamelMIRecord, 1);
+	CamelMIRecord *record = g_new0 (CamelMIRecord, 1);
 	CamelMessageInfoBase *mi = (CamelMessageInfoBase *) info;
 	GString *tmp;
 	CamelFlag *flag;
@@ -415,7 +415,7 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 	gint count, i;
 
 	/* Assume that we dont have to take care of DB Safeness. It will be done while doing the DB transaction */
-	record->uid = (gchar *) camel_pstring_strdup(camel_message_info_uid(mi));
+	record->uid = (gchar *) camel_pstring_strdup (camel_message_info_uid (mi));
 	record->flags = mi->flags;
 
 	record->read =  ((mi->flags & (CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK))) ? 1 : 0;
@@ -430,11 +430,11 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 	record->dsent = mi->date_sent;
 	record->dreceived = mi->date_received;
 
-	record->subject = (gchar *) camel_pstring_strdup(camel_message_info_subject (mi));
-	record->from = (gchar *) camel_pstring_strdup(camel_message_info_from (mi));
-	record->to = (gchar *) camel_pstring_strdup(camel_message_info_to (mi));
-	record->cc = (gchar *) camel_pstring_strdup(camel_message_info_cc (mi));
-	record->mlist = (gchar *) camel_pstring_strdup(camel_message_info_mlist (mi));
+	record->subject = (gchar *) camel_pstring_strdup (camel_message_info_subject (mi));
+	record->from = (gchar *) camel_pstring_strdup (camel_message_info_from (mi));
+	record->to = (gchar *) camel_pstring_strdup (camel_message_info_to (mi));
+	record->cc = (gchar *) camel_pstring_strdup (camel_message_info_cc (mi));
+	record->mlist = (gchar *) camel_pstring_strdup (camel_message_info_mlist (mi));
 
 	record->followup_flag = (gchar *) camel_pstring_strdup(camel_message_info_user_tag(info, "follow-up"));
 	record->followup_completed_on = (gchar *) camel_pstring_strdup(camel_message_info_user_tag(info, "completed-on"));
@@ -468,7 +468,7 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 	g_string_free (tmp, FALSE);
 
 	tmp = g_string_new (NULL);
-	count = camel_tag_list_size(&mi->user_tags);
+	count = camel_tag_list_size (&mi->user_tags);
 	g_string_append_printf (tmp, "%lu", (gulong)count);
 	tag = mi->user_tags;
 	while (tag) {
@@ -483,7 +483,7 @@ message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 }
 
 static CamelMessageContentInfo *
-content_info_from_db(CamelFolderSummary *s, CamelMIRecord *record)
+content_info_from_db (CamelFolderSummary *s, CamelMIRecord *record)
 {
 	CamelMessageContentInfo *ci;
 	gchar *type, *subtype;
@@ -497,14 +497,14 @@ content_info_from_db(CamelFolderSummary *s, CamelMIRecord *record)
 	if (!part)
 		return NULL;
 
-	ci = camel_folder_summary_content_info_new(s);
+	ci = camel_folder_summary_content_info_new (s);
 	if (*part == ' ') part++; /* Move off the space in the record*/
 
 	EXTRACT_FIRST_STRING (type)
 	EXTRACT_STRING (subtype)
-	ct = camel_content_type_new(type, subtype);
-	g_free(type);		/* can this be removed? */
-	g_free(subtype);
+	ct = camel_content_type_new (type, subtype);
+	g_free (type);		/* can this be removed? */
+	g_free (subtype);
 	EXTRACT_DIGIT (count)
 
 	for (i = 0; i < count; i++) {
@@ -512,10 +512,10 @@ content_info_from_db(CamelFolderSummary *s, CamelMIRecord *record)
 		EXTRACT_STRING (name)
 		EXTRACT_STRING (value)
 
-		camel_content_type_set_param(ct, name, value);
+		camel_content_type_set_param (ct, name, value);
 		/* TODO: do this so we dont have to double alloc/free */
-		g_free(name);
-		g_free(value);
+		g_free (name);
+		g_free (value);
 	}
 	ci->type = ct;
 
@@ -533,7 +533,7 @@ content_info_from_db(CamelFolderSummary *s, CamelMIRecord *record)
 }
 
 static gint
-content_info_to_db(CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRecord *record)
+content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRecord *record)
 {
 	CamelContentType *ct;
 	struct _camel_header_param *hp;
@@ -587,7 +587,7 @@ content_info_to_db(CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRe
 
 	if (record->cinfo) {
 		oldr = record->cinfo;
-		record->cinfo = g_strconcat(oldr, str->str, NULL);
+		record->cinfo = g_strconcat (oldr, str->str, NULL);
 		g_free (oldr); g_string_free (str, TRUE);
 	} else {
 		record->cinfo = str->str;
@@ -598,29 +598,29 @@ content_info_to_db(CamelFolderSummary *s, CamelMessageContentInfo *ci, CamelMIRe
 }
 
 static gint
-summary_header_save(CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s, FILE *out)
 {
 	gint unread = 0, deleted = 0, junk = 0, count, i;
 
-	fseek(out, 0, SEEK_SET);
+	fseek (out, 0, SEEK_SET);
 
 	io(printf("Savining header\n"));
 
 	/* we always write out the current version */
-	camel_file_util_encode_fixed_int32(out, CAMEL_FOLDER_SUMMARY_VERSION);
-	camel_file_util_encode_fixed_int32(out, s->flags);
-	camel_file_util_encode_fixed_int32(out, s->nextuid);
-	camel_file_util_encode_time_t(out, s->time);
+	camel_file_util_encode_fixed_int32 (out, CAMEL_FOLDER_SUMMARY_VERSION);
+	camel_file_util_encode_fixed_int32 (out, s->flags);
+	camel_file_util_encode_fixed_int32 (out, s->nextuid);
+	camel_file_util_encode_time_t (out, s->time);
 
-	count = camel_folder_summary_count(s);
+	count = camel_folder_summary_count (s);
 	for (i=0; i<count; i++) {
-		CamelMessageInfo *info = camel_folder_summary_index(s, i);
+		CamelMessageInfo *info = camel_folder_summary_index (s, i);
 		guint32 flags;
 
 		if (info == NULL)
 			continue;
 
-		flags = camel_message_info_flags(info);
+		flags = camel_message_info_flags (info);
 		if ((flags & CAMEL_MESSAGE_SEEN) == 0)
 			unread++;
 		if ((flags & CAMEL_MESSAGE_DELETED) != 0)
@@ -628,24 +628,24 @@ summary_header_save(CamelFolderSummary *s, FILE *out)
 		if ((flags & CAMEL_MESSAGE_JUNK) != 0)
 			junk++;
 
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
-	camel_file_util_encode_fixed_int32(out, count);
-	camel_file_util_encode_fixed_int32(out, unread);
-	camel_file_util_encode_fixed_int32(out, deleted);
+	camel_file_util_encode_fixed_int32 (out, count);
+	camel_file_util_encode_fixed_int32 (out, unread);
+	camel_file_util_encode_fixed_int32 (out, deleted);
 
-	return camel_file_util_encode_fixed_int32(out, junk);
+	return camel_file_util_encode_fixed_int32 (out, junk);
 }
 
 static CamelMessageInfo *
-message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
+message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
 {
 	CamelMessageInfoBase *to, *from = (CamelMessageInfoBase *)mi;
 	CamelFlag *flag;
 	CamelTag *tag;
 
-	to = (CamelMessageInfoBase *)camel_message_info_new(s);
+	to = (CamelMessageInfoBase *)camel_message_info_new (s);
 
 	to->flags = from->flags;
 	to->size = from->size;
@@ -655,29 +655,29 @@ message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
 
 	/* NB: We don't clone the uid */
 
-	to->subject = camel_pstring_strdup(from->subject);
-	to->from = camel_pstring_strdup(from->from);
-	to->to = camel_pstring_strdup(from->to);
-	to->cc = camel_pstring_strdup(from->cc);
-	to->mlist = camel_pstring_strdup(from->mlist);
-	memcpy(&to->message_id, &from->message_id, sizeof(to->message_id));
+	to->subject = camel_pstring_strdup (from->subject);
+	to->from = camel_pstring_strdup (from->from);
+	to->to = camel_pstring_strdup (from->to);
+	to->cc = camel_pstring_strdup (from->cc);
+	to->mlist = camel_pstring_strdup (from->mlist);
+	memcpy (&to->message_id, &from->message_id, sizeof (to->message_id));
 	to->preview = g_strdup (from->preview);
 	if (from->references) {
-		gint len = sizeof(*from->references) + ((from->references->size-1) * sizeof(from->references->references[0]));
+		gint len = sizeof (*from->references) + ((from->references->size-1) * sizeof (from->references->references[0]));
 
-		to->references = g_malloc(len);
-		memcpy(to->references, from->references, len);
+		to->references = g_malloc (len);
+		memcpy (to->references, from->references, len);
 	}
 
 	flag = from->user_flags;
 	while (flag) {
-		camel_flag_set(&to->user_flags, flag->name, TRUE);
+		camel_flag_set (&to->user_flags, flag->name, TRUE);
 		flag = flag->next;
 	}
 
 	tag = from->user_tags;
 	while (tag) {
-		camel_tag_set(&to->user_tags, tag->name, tag->value);
+		camel_tag_set (&to->user_tags, tag->name, tag->value);
 		tag = tag->next;
 	}
 
@@ -689,7 +689,7 @@ message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
 }
 
 static gconstpointer
-info_ptr(const CamelMessageInfo *mi, gint id)
+info_ptr (const CamelMessageInfo *mi, gint id)
 {
 	switch (id) {
 		case CAMEL_MESSAGE_INFO_SUBJECT:
@@ -722,7 +722,7 @@ info_ptr(const CamelMessageInfo *mi, gint id)
 }
 
 static guint32
-info_uint32(const CamelMessageInfo *mi, gint id)
+info_uint32 (const CamelMessageInfo *mi, gint id)
 {
 	switch (id) {
 		case CAMEL_MESSAGE_INFO_FLAGS:
@@ -735,7 +735,7 @@ info_uint32(const CamelMessageInfo *mi, gint id)
 }
 
 static time_t
-info_time(const CamelMessageInfo *mi, gint id)
+info_time (const CamelMessageInfo *mi, gint id)
 {
 	switch (id) {
 		case CAMEL_MESSAGE_INFO_DATE_SENT:
@@ -748,64 +748,64 @@ info_time(const CamelMessageInfo *mi, gint id)
 }
 
 static gboolean
-info_user_flag(const CamelMessageInfo *mi, const gchar *id)
+info_user_flag (const CamelMessageInfo *mi, const gchar *id)
 {
-	return camel_flag_get(&((CamelMessageInfoBase *)mi)->user_flags, id);
+	return camel_flag_get (&((CamelMessageInfoBase *)mi)->user_flags, id);
 }
 
 static const gchar *
-info_user_tag(const CamelMessageInfo *mi, const gchar *id)
+info_user_tag (const CamelMessageInfo *mi, const gchar *id)
 {
-	return camel_tag_get(&((CamelMessageInfoBase *)mi)->user_tags, id);
+	return camel_tag_get (&((CamelMessageInfoBase *)mi)->user_tags, id);
 }
 
 static gboolean
-info_set_user_flag(CamelMessageInfo *info, const gchar *name, gboolean value)
+info_set_user_flag (CamelMessageInfo *info, const gchar *name, gboolean value)
 {
 	CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
 	gint res;
 
-	res = camel_flag_set(&mi->user_flags, name, value);
+	res = camel_flag_set (&mi->user_flags, name, value);
 
 	/* TODO: check this item is still in the summary first */
 	if (mi->summary && res && mi->summary->folder && mi->uid) {
-		CamelFolderChangeInfo *changes = camel_folder_change_info_new();
+		CamelFolderChangeInfo *changes = camel_folder_change_info_new ();
 
 		mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 		mi->dirty = TRUE;
-		camel_folder_summary_touch(mi->summary);
-		camel_folder_change_info_change_uid(changes, camel_message_info_uid(info));
+		camel_folder_summary_touch (mi->summary);
+		camel_folder_change_info_change_uid (changes, camel_message_info_uid (info));
 		camel_folder_changed (mi->summary->folder, changes);
-		camel_folder_change_info_free(changes);
+		camel_folder_change_info_free (changes);
 	}
 
 	return res;
 }
 
 static gboolean
-info_set_user_tag(CamelMessageInfo *info, const gchar *name, const gchar *value)
+info_set_user_tag (CamelMessageInfo *info, const gchar *name, const gchar *value)
 {
 	CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
 	gint res;
 
-	res = camel_tag_set(&mi->user_tags, name, value);
+	res = camel_tag_set (&mi->user_tags, name, value);
 
 	if (mi->summary && res && mi->summary->folder && mi->uid) {
-		CamelFolderChangeInfo *changes = camel_folder_change_info_new();
+		CamelFolderChangeInfo *changes = camel_folder_change_info_new ();
 
 		mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 		mi->dirty = TRUE;
-		camel_folder_summary_touch(mi->summary);
-		camel_folder_change_info_change_uid(changes, camel_message_info_uid(info));
+		camel_folder_summary_touch (mi->summary);
+		camel_folder_change_info_change_uid (changes, camel_message_info_uid (info));
 		camel_folder_changed (mi->summary->folder, changes);
-		camel_folder_change_info_free(changes);
+		camel_folder_change_info_free (changes);
 	}
 
 	return res;
 }
 
 static gboolean
-info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set)
+info_set_flags (CamelMessageInfo *info, guint32 flags, guint32 set)
 {
 	guint32 old;
 	CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
@@ -827,7 +827,7 @@ info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set)
 		mi->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 		mi->dirty = TRUE;
 		if (mi->summary)
-			camel_folder_summary_touch(mi->summary);
+			camel_folder_summary_touch (mi->summary);
 	}
 
 	if (((old & ~CAMEL_MESSAGE_SYSTEM_MASK) == (mi->flags & ~CAMEL_MESSAGE_SYSTEM_MASK)) && !((set & CAMEL_MESSAGE_JUNK_LEARN) && !(set & CAMEL_MESSAGE_JUNK)))
@@ -854,13 +854,13 @@ info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set)
 			mi->summary->visible_count -= junk ? junk : deleted;
 	}
 	if (mi->uid)
-		g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(mi->summary)->flag_cache, (gchar *)mi->uid, GUINT_TO_POINTER(mi->flags));
+		g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (mi->summary)->flag_cache, (gchar *)mi->uid, GUINT_TO_POINTER (mi->flags));
 	if (mi->summary && mi->summary->folder && mi->uid) {
-		CamelFolderChangeInfo *changes = camel_folder_change_info_new();
+		CamelFolderChangeInfo *changes = camel_folder_change_info_new ();
 
-		camel_folder_change_info_change_uid(changes, camel_message_info_uid(info));
+		camel_folder_change_info_change_uid (changes, camel_message_info_uid (info));
 		camel_folder_changed (mi->summary->folder, changes);
-		camel_folder_change_info_free(changes);
+		camel_folder_change_info_free (changes);
 	}
 
 	d(printf("%d %d %d %d %d\n", mi->summary->unread_count, mi->summary->deleted_count, mi->summary->junk_count, mi->summary->junk_not_deleted_count, mi->summary->visible_count));
@@ -952,7 +952,7 @@ camel_folder_summary_init (CamelFolderSummary *summary)
 	g_static_rec_mutex_init (&summary->priv->alloc_lock);
 	g_static_rec_mutex_init (&summary->priv->ref_lock);
 
-	summary->meta_summary = g_malloc0(sizeof(CamelFolderMetaSummary));
+	summary->meta_summary = g_malloc0 (sizeof (CamelFolderMetaSummary));
 
 	/* Default is 20, any implementor having UIDs that has length
 	   exceeding 20, has to override this value
@@ -989,14 +989,14 @@ camel_folder_summary_new (struct _CamelFolder *folder)
  * Set the filename where the summary will be loaded to/saved from.
  **/
 void
-camel_folder_summary_set_filename(CamelFolderSummary *s, const gchar *name)
+camel_folder_summary_set_filename (CamelFolderSummary *s, const gchar *name)
 {
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
-	g_free(s->summary_path);
-	s->summary_path = g_strdup(name);
+	g_free (s->summary_path);
+	s->summary_path = g_strdup (name);
 
-	g_free(s->meta_summary->path);
+	g_free (s->meta_summary->path);
 	s->meta_summary->path = g_strconcat(name, "-meta", NULL);
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -1013,9 +1013,9 @@ camel_folder_summary_set_filename(CamelFolderSummary *s, const gchar *name)
  * Unlike earlier behaviour, build_content need not be set to perform indexing.
  **/
 void
-camel_folder_summary_set_index(CamelFolderSummary *s, CamelIndex *index)
+camel_folder_summary_set_index (CamelFolderSummary *s, CamelIndex *index)
 {
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 
 	if (p->index)
 		g_object_unref (p->index);
@@ -1035,7 +1035,7 @@ camel_folder_summary_set_index(CamelFolderSummary *s, CamelIndex *index)
  * info summaries.
  **/
 void
-camel_folder_summary_set_build_content(CamelFolderSummary *s, gboolean state)
+camel_folder_summary_set_build_content (CamelFolderSummary *s, gboolean state)
 {
 	s->build_content = state;
 }
@@ -1049,7 +1049,7 @@ camel_folder_summary_set_build_content(CamelFolderSummary *s, gboolean state)
  * Returns: the number of items in the summary
  **/
 guint
-camel_folder_summary_count(CamelFolderSummary *s)
+camel_folder_summary_count (CamelFolderSummary *s)
 {
 	return s->uids->len;
 }
@@ -1117,7 +1117,7 @@ camel_folder_summary_uid_from_index (CamelFolderSummary *s, gint i)
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	if (i<s->uids->len)
-		uid = g_strdup (g_ptr_array_index(s->uids, i));
+		uid = g_strdup (g_ptr_array_index (s->uids, i));
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
@@ -1146,7 +1146,7 @@ camel_folder_summary_check_uid (CamelFolderSummary *s, const gchar *uid)
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	for (i=0; i<s->uids->len; i++) {
-		if (strcmp(s->uids->pdata[i], uid) == 0) {
+		if (strcmp (s->uids->pdata[i], uid) == 0) {
 			camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 			return TRUE;
 		}
@@ -1169,16 +1169,16 @@ camel_folder_summary_check_uid (CamelFolderSummary *s, const gchar *uid)
  * Returns: a #GPtrArray of uids
  **/
 GPtrArray *
-camel_folder_summary_array(CamelFolderSummary *s)
+camel_folder_summary_array (CamelFolderSummary *s)
 {
-	GPtrArray *res = g_ptr_array_new();
+	GPtrArray *res = g_ptr_array_new ();
 	gint i;
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
-	g_ptr_array_set_size(res, s->uids->len);
+	g_ptr_array_set_size (res, s->uids->len);
 	for (i=0;i<s->uids->len;i++)
-		res->pdata[i] = (gpointer) camel_pstring_strdup ((gchar *)g_ptr_array_index(s->uids, i));
+		res->pdata[i] = (gpointer) camel_pstring_strdup ((gchar *)g_ptr_array_index (s->uids, i));
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
@@ -1199,7 +1199,7 @@ camel_folder_summary_array(CamelFolderSummary *s)
  * Since: 2.26
  **/
 GHashTable *
-camel_folder_summary_get_hashtable(CamelFolderSummary *s)
+camel_folder_summary_get_hashtable (CamelFolderSummary *s)
 {
 	GHashTable *hash = g_hash_table_new (g_str_hash, g_str_equal);
 	gint i;
@@ -1207,7 +1207,7 @@ camel_folder_summary_get_hashtable(CamelFolderSummary *s)
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	for (i=0;i<s->uids->len;i++)
-		g_hash_table_insert (hash, (gpointer)camel_pstring_strdup ((gchar *)g_ptr_array_index(s->uids, i)), GINT_TO_POINTER(1));
+		g_hash_table_insert (hash, (gpointer)camel_pstring_strdup ((gchar *)g_ptr_array_index (s->uids, i)), GINT_TO_POINTER (1));
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
@@ -1234,10 +1234,10 @@ camel_folder_summary_free_hashtable (GHashTable *ht)
 CamelMessageInfo *
 camel_folder_summary_peek_info (CamelFolderSummary *s, const gchar *uid)
 {
-	CamelMessageInfo *info = g_hash_table_lookup(s->loaded_infos, uid);
+	CamelMessageInfo *info = g_hash_table_lookup (s->loaded_infos, uid);
 
 	if (info)
-		camel_message_info_ref(info);
+		camel_message_info_ref (info);
 	return info;
 }
 
@@ -1329,7 +1329,7 @@ camel_folder_summary_uid (CamelFolderSummary *summary,
  * Returns: the next unique uid value
  **/
 guint32
-camel_folder_summary_next_uid(CamelFolderSummary *s)
+camel_folder_summary_next_uid (CamelFolderSummary *s)
 {
 	guint32 uid;
 
@@ -1354,12 +1354,12 @@ camel_folder_summary_next_uid(CamelFolderSummary *s)
  * ensure new uid's do not clash with existing uid's.
  **/
 void
-camel_folder_summary_set_uid(CamelFolderSummary *s, guint32 uid)
+camel_folder_summary_set_uid (CamelFolderSummary *s, guint32 uid)
 {
 	/* TODO: sync to disk? */
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
-	s->nextuid = MAX(s->nextuid, uid);
+	s->nextuid = MAX (s->nextuid, uid);
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 }
@@ -1407,7 +1407,7 @@ perform_content_info_load_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
 	for (i=0;i<count;i++) {
 		pci = perform_content_info_load_from_db (s, mir);
 		if (pci ) {
-			my_list_append((struct _node **)&ci->childs, (struct _node *)pci);
+			my_list_append ((struct _node **)&ci->childs, (struct _node *)pci);
 			pci->parent = ci;
 		} else {
 			d(fprintf (stderr, "Summary file format messed up?"));
@@ -1420,7 +1420,7 @@ perform_content_info_load_from_db (CamelFolderSummary *s, CamelMIRecord *mir)
 
 /* loads the content descriptions, recursively */
 static CamelMessageContentInfo *
-perform_content_info_migrate(CamelFolderSummary *s, FILE *in)
+perform_content_info_migrate (CamelFolderSummary *s, FILE *in)
 {
 	gint i;
 	guint32 count;
@@ -1430,15 +1430,15 @@ perform_content_info_migrate(CamelFolderSummary *s, FILE *in)
 	if (ci == NULL)
 		return NULL;
 
-	if (camel_file_util_decode_uint32(in, &count) == -1) {
+	if (camel_file_util_decode_uint32 (in, &count) == -1) {
 		camel_folder_summary_content_info_free (s, ci);
 		return NULL;
 	}
 
 	for (i=0;i<count;i++) {
-		part = perform_content_info_migrate(s, in);
+		part = perform_content_info_migrate (s, in);
 		if (part) {
-			my_list_append((struct _node **)&ci->childs, (struct _node *)part);
+			my_list_append ((struct _node **)&ci->childs, (struct _node *)part);
 			part->parent = ci;
 		} else {
 			d(fprintf (stderr, "Summary file format messed up?"));
@@ -1453,7 +1453,7 @@ static void
 append_changed_uids (gchar *key, CamelMessageInfoBase *info, GPtrArray *array)
 {
 	if (info->dirty || info->flags & CAMEL_MESSAGE_FOLDER_FLAGGED)
-		g_ptr_array_add (array, (gpointer)camel_pstring_strdup((camel_message_info_uid(info))));
+		g_ptr_array_add (array, (gpointer)camel_pstring_strdup ((camel_message_info_uid (info))));
 }
 
 /**
@@ -1464,7 +1464,7 @@ append_changed_uids (gchar *key, CamelMessageInfoBase *info, GPtrArray *array)
 GPtrArray *
 camel_folder_summary_get_changed (CamelFolderSummary *s)
 {
-	GPtrArray *res = g_ptr_array_new();
+	GPtrArray *res = g_ptr_array_new ();
 
 	/* FIXME[disk-summary] sucks, this function returns from memory.
 	 * We need to have collate or something to get the modified ones
@@ -1522,7 +1522,7 @@ remove_cache (CamelSession *session, CamelSessionThreadMsg *msg)
 
 	CAMEL_DB_RELEASE_SQLITE_MEMORY;
 
-	if (time(NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
+	if (time (NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
 		return;
 
 	/* FIXME[disk-summary] hack. fix it */
@@ -1541,7 +1541,7 @@ remove_cache (CamelSession *session, CamelSessionThreadMsg *msg)
 	dd(printf("   done .. now %d\n", g_hash_table_size (s->loaded_infos)));
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
-	s->cache_load_time = time(NULL);
+	s->cache_load_time = time (NULL);
 }
 
 static void remove_cache_end (CamelSession *session, CamelSessionThreadMsg *msg)
@@ -1563,7 +1563,7 @@ cfs_try_release_memory (CamelFolderSummary *s)
 	CamelSession *session;
 
 	/* If folder is freed or if the cache is nil then clean up */
-	if (!s->folder || !g_hash_table_size(s->loaded_infos)) {
+	if (!s->folder || !g_hash_table_size (s->loaded_infos)) {
 		s->cache_load_time = 0;
 		s->timeout_handle = 0;
 		return FALSE;
@@ -1572,12 +1572,12 @@ cfs_try_release_memory (CamelFolderSummary *s)
 	parent_store = camel_folder_get_parent_store (s->folder);
 	session = CAMEL_SERVICE (parent_store)->session;
 
-	if (time(NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
+	if (time (NULL) - s->cache_load_time < SUMMARY_CACHE_DROP)
 		return TRUE;
 
-	m = camel_session_thread_msg_new(session, &remove_timeout_ops, sizeof(*m));
+	m = camel_session_thread_msg_new (session, &remove_timeout_ops, sizeof (*m));
 	m->summary = g_object_ref (s);
-	camel_session_thread_queue(session, &m->msg, 0);
+	camel_session_thread_queue (session, &m->msg, 0);
 
 	return TRUE;
 }
@@ -1608,7 +1608,7 @@ static gint
 cfs_cache_size (CamelFolderSummary *s)
 {
 	/* FIXME[disk-summary] this is a timely hack. fix it well */
-	if (!CAMEL_IS_VEE_FOLDER(s->folder))
+	if (!CAMEL_IS_VEE_FOLDER (s->folder))
 		return g_hash_table_size (s->loaded_infos);
 	else
 		return s->uids->len;
@@ -1639,14 +1639,14 @@ msg_update_preview (const gchar *uid, gpointer value, CamelFolder *folder)
 		if (camel_mime_message_build_preview ((CamelMimePart *)msg, (CamelMessageInfo *)info) && info->preview)
 			camel_db_write_preview_record (parent_store->cdb_w, full_name, info->uid, info->preview, NULL);
 	}
-	camel_message_info_free(info);
+	camel_message_info_free (info);
 }
 
 static void
 pick_uids (const gchar *uid, CamelMessageInfoBase *mi, GPtrArray *array)
 {
 	if (mi->preview)
-		g_ptr_array_add (array, (gchar *)camel_pstring_strdup(uid));
+		g_ptr_array_add (array, (gchar *)camel_pstring_strdup (uid));
 }
 
 static gboolean
@@ -1696,7 +1696,7 @@ preview_update_exec (CamelSession *session, CamelSessionThreadMsg *msg)
 	g_hash_table_foreach (hash, (GHFunc)msg_update_preview, m->folder);
 	camel_db_end_transaction (parent_store->cdb_w, NULL);
 	camel_folder_unlock (m->folder, CAMEL_FOLDER_REC_LOCK);
-	camel_folder_free_uids(m->folder, uids_uncached);
+	camel_folder_free_uids (m->folder, uids_uncached);
 	camel_folder_summary_free_hashtable (hash);
 }
 
@@ -1738,13 +1738,13 @@ cfs_reload_from_db (CamelFolderSummary *s, GError **error)
 
 	cfs_schedule_info_release_timer (s);
 
-	if (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->need_preview) {
+	if (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->need_preview) {
 		struct _preview_update_msg *m;
 
-		m = camel_session_thread_msg_new(((CamelService *)parent_store)->session, &preview_update_ops, sizeof(*m));
+		m = camel_session_thread_msg_new (((CamelService *)parent_store)->session, &preview_update_ops, sizeof (*m));
 		m->folder = s->folder;
 		m->error = NULL;
-		camel_session_thread_queue(((CamelService *)parent_store)->session, &m->msg, 0);
+		camel_session_thread_queue (((CamelService *)parent_store)->session, &m->msg, 0);
 	}
 
 	return ret == 0 ? 0 : -1;
@@ -1759,7 +1759,7 @@ void
 camel_folder_summary_add_preview (CamelFolderSummary *s, CamelMessageInfo *info)
 {
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-	g_hash_table_insert (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->preview_updates, (gchar *)info->uid, ((CamelMessageInfoBase *)info)->preview);
+	g_hash_table_insert (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->preview_updates, (gchar *)info->uid, ((CamelMessageInfoBase *)info)->preview);
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 }
 
@@ -1804,7 +1804,7 @@ camel_folder_summary_prepare_fetch_all (CamelFolderSummary *s,
 GHashTable *
 camel_folder_summary_get_flag_cache (CamelFolderSummary *summary)
 {
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(summary);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (summary);
 
 	return p->flag_cache;
 }
@@ -1822,7 +1822,7 @@ camel_folder_summary_load_from_db (CamelFolderSummary *s,
 	CamelStore *parent_store;
 	const gchar *full_name;
 	gint ret = 0;
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 	GError *local_error = NULL;
 
 	/* struct _db_pass_data data; */
@@ -1888,15 +1888,15 @@ mir_from_cols (CamelMIRecord *mir, CamelFolderSummary *s, gint ncol, gchar ** co
 		else if (!strcmp (name [i], "mail_to"))
 			mir->to = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "mail_cc"))
-			mir->cc = (gchar *) camel_pstring_strdup(cols[i]);
+			mir->cc = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "mlist"))
 			mir->mlist = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "followup_flag"))
-			mir->followup_flag = (gchar *) camel_pstring_strdup(cols[i]);
+			mir->followup_flag = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "followup_completed_on"))
-			mir->followup_completed_on = (gchar *) camel_pstring_strdup(cols[i]);
+			mir->followup_completed_on = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "followup_due_by"))
-			mir->followup_due_by = (gchar *) camel_pstring_strdup(cols[i]);
+			mir->followup_due_by = (gchar *) camel_pstring_strdup (cols[i]);
 		else if (!strcmp (name [i], "part"))
 			mir->part = g_strdup (cols[i]);
 		else if (!strcmp (name [i], "labels"))
@@ -1904,12 +1904,12 @@ mir_from_cols (CamelMIRecord *mir, CamelFolderSummary *s, gint ncol, gchar ** co
 		else if (!strcmp (name [i], "usertags"))
 			mir->usertags = g_strdup (cols[i]);
 		else if (!strcmp (name [i], "cinfo"))
-			mir->cinfo = g_strdup(cols[i]);
+			mir->cinfo = g_strdup (cols[i]);
 		else if (!strcmp (name [i], "bdata"))
-			mir->bdata = g_strdup(cols[i]);
+			mir->bdata = g_strdup (cols[i]);
 		/* Evolution itself doesn't yet use this, ignoring
 		else if (!strcmp (name [i], "bodystructure"))
-			mir->bodystructure = g_strdup(cols[i]); */
+			mir->bodystructure = g_strdup (cols[i]); */
 
 	}
 }
@@ -1945,7 +1945,7 @@ camel_read_mir_callback (gpointer  ref, gint ncol, gchar ** cols, gchar ** name)
 			/* FIXME: this should be done differently, how i don't know */
 			((CamelMessageInfoBase *)info)->content = perform_content_info_load_from_db (s, mir);
 			if (((CamelMessageInfoBase *)info)->content == NULL) {
-				camel_message_info_free(info);
+				camel_message_info_free (info);
 				info = NULL;
 			}
 			mir->cinfo = tmp;
@@ -1979,7 +1979,7 @@ camel_read_mir_callback (gpointer  ref, gint ncol, gchar ** cols, gchar ** name)
  * Since: 2.24
  **/
 gint
-camel_folder_summary_migrate_infos(CamelFolderSummary *s)
+camel_folder_summary_migrate_infos (CamelFolderSummary *s)
 {
 	FILE *in;
 	gint i;
@@ -2025,7 +2025,7 @@ camel_folder_summary_migrate_infos(CamelFolderSummary *s)
 		if (s->build_content) {
 			((CamelMessageInfoBase *)mi)->content = perform_content_info_migrate (s, in);
 			if (((CamelMessageInfoBase *)mi)->content == NULL) {
-				camel_message_info_free(mi);
+				camel_message_info_free (mi);
 				goto error;
 			}
 		}
@@ -2034,7 +2034,7 @@ camel_folder_summary_migrate_infos(CamelFolderSummary *s)
 		tag = info->user_tags;
 		while (tag) {
 			if (strcmp (tag->name, "label")) {
-				camel_flag_set(&info->user_flags, tag->value, TRUE);
+				camel_flag_set (&info->user_flags, tag->value, TRUE);
 			}
 			tag = tag->next;
 		}
@@ -2231,11 +2231,11 @@ camel_folder_summary_save_to_db (CamelFolderSummary *s,
 	cdb = parent_store->cdb_w;
 
 	d(printf ("\ncamel_folder_summary_save_to_db called \n"));
-	if (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->need_preview && g_hash_table_size(CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->preview_updates)) {
+	if (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->need_preview && g_hash_table_size (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->preview_updates)) {
 		camel_db_begin_transaction (parent_store->cdb_w, NULL);
 		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-		g_hash_table_foreach (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->preview_updates, (GHFunc)msg_save_preview, s->folder);
-		g_hash_table_remove_all (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->preview_updates);
+		g_hash_table_foreach (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->preview_updates, (GHFunc)msg_save_preview, s->folder);
+		g_hash_table_remove_all (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->preview_updates);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		camel_db_end_transaction (parent_store->cdb_w, NULL);
 	}
@@ -2245,7 +2245,7 @@ camel_folder_summary_save_to_db (CamelFolderSummary *s,
 
 	s->flags &= ~CAMEL_SUMMARY_DIRTY;
 
-	count = cfs_count_dirty(s);
+	count = cfs_count_dirty (s);
 	if (!count)
 		return camel_folder_summary_header_save_to_db (s, error);
 
@@ -2384,7 +2384,7 @@ camel_folder_summary_header_load_from_db (CamelFolderSummary *s,
 }
 
 static gint
-summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
+summary_assign_uid (CamelFolderSummary *s, CamelMessageInfo *info)
 {
 	const gchar *uid;
 	CamelMessageInfo *mi;
@@ -2393,12 +2393,12 @@ summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
 
 	if (uid == NULL || uid[0] == 0) {
 		camel_pstring_free (info->uid);
-		uid = info->uid = (gchar *)camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
+		uid = info->uid = (gchar *)camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
 	}
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
-	while ((mi = g_hash_table_lookup(s->loaded_infos, uid))) {
+	while ((mi = g_hash_table_lookup (s->loaded_infos, uid))) {
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 		if (mi == info)
@@ -2407,8 +2407,8 @@ summary_assign_uid(CamelFolderSummary *s, CamelMessageInfo *info)
 		d(printf ("Trying to insert message with clashing uid (%s).  new uid re-assigned", camel_message_info_uid (info)));
 
 		camel_pstring_free (info->uid);
-		uid = info->uid = camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
-		camel_message_info_set_flags(info, CAMEL_MESSAGE_FOLDER_FLAGGED, CAMEL_MESSAGE_FOLDER_FLAGGED);
+		uid = info->uid = camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
+		camel_message_info_set_flags (info, CAMEL_MESSAGE_FOLDER_FLAGGED, CAMEL_MESSAGE_FOLDER_FLAGGED);
 
 		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	}
@@ -2437,7 +2437,7 @@ camel_folder_summary_add (CamelFolderSummary *s, CamelMessageInfo *info)
 	if (info == NULL)
 		return;
 
-	if (summary_assign_uid(s, info) == 0)
+	if (summary_assign_uid (s, info) == 0)
 		return;
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -2446,8 +2446,8 @@ camel_folder_summary_add (CamelFolderSummary *s, CamelMessageInfo *info)
 	/* camel_message_info_ref(info); FIXME: Check how things are loaded. */
 	/* FIXME[disk-summary] SHould we ref it or redesign it later on */
 	/* The uid array should have its own memory. We will unload the infos when not reqd.*/
-	g_ptr_array_add (s->uids, (gpointer) camel_pstring_strdup((camel_message_info_uid(info))));
-	g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->flag_cache, (gchar *)info->uid, GUINT_TO_POINTER(camel_message_info_flags(info)));
+	g_ptr_array_add (s->uids, (gpointer) camel_pstring_strdup ((camel_message_info_uid (info))));
+	g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->flag_cache, (gchar *)info->uid, GUINT_TO_POINTER (camel_message_info_flags (info)));
 
 	g_hash_table_insert (s->loaded_infos, (gpointer) camel_message_info_uid (info), info);
 	s->flags |= CAMEL_SUMMARY_DIRTY;
@@ -2473,11 +2473,11 @@ camel_folder_summary_insert (CamelFolderSummary *s, CamelMessageInfo *info, gboo
 	/* FIXME[disk-summary] SHould we ref it or redesign it later on */
 	/* The uid array should have its own memory. We will unload the infos when not reqd.*/
 	if (!load)
-		g_ptr_array_add (s->uids, (gchar *) camel_pstring_strdup(camel_message_info_uid(info)));
+		g_ptr_array_add (s->uids, (gchar *) camel_pstring_strdup (camel_message_info_uid (info)));
 
 	g_hash_table_insert (s->loaded_infos, (gchar *) camel_message_info_uid (info), info);
 	if (load) {
-		g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->flag_cache, (gchar *)info->uid, GUINT_TO_POINTER(camel_message_info_flags(info)));
+		g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->flag_cache, (gchar *)info->uid, GUINT_TO_POINTER (camel_message_info_flags (info)));
 	}
 
 	if (!load)
@@ -2520,7 +2520,7 @@ update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info)
 			summary->visible_count -= junk ? junk : deleted;
 
 		summary->saved_count++;
-		camel_folder_summary_touch(summary);
+		camel_folder_summary_touch (summary);
 	}
 
 	dd(printf("%p: %d %d %d | %d %d %d\n", (gpointer) summary, unread, deleted, junk, summary->unread_count, summary->visible_count, summary->saved_count));
@@ -2570,14 +2570,14 @@ camel_folder_summary_add_from_header (CamelFolderSummary *summary,
  * Returns: the newly added record
  **/
 CamelMessageInfo *
-camel_folder_summary_add_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
+camel_folder_summary_add_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
 {
 	CamelMessageInfo *info;
 
 	g_return_val_if_fail (CAMEL_IS_FOLDER_SUMMARY (s), NULL);
 	g_return_val_if_fail (CAMEL_IS_MIME_PARSER (mp), NULL);
 
-	info = camel_folder_summary_info_new_from_parser(s, mp);
+	info = camel_folder_summary_info_new_from_parser (s, mp);
 
 	camel_folder_summary_add (s, info);
 	update_summary (s, (CamelMessageInfoBase *) info);
@@ -2596,7 +2596,7 @@ camel_folder_summary_add_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
 CamelMessageInfo *
 camel_folder_summary_add_from_message (CamelFolderSummary *s, CamelMimeMessage *msg)
 {
-	CamelMessageInfo *info = camel_folder_summary_info_new_from_message(s, msg, NULL);
+	CamelMessageInfo *info = camel_folder_summary_info_new_from_message (s, msg, NULL);
 
 	camel_folder_summary_add (s, info);
 	update_summary (s, (CamelMessageInfoBase *) info);
@@ -2649,43 +2649,43 @@ camel_folder_summary_info_new_from_header (CamelFolderSummary *summary,
  * #camel_message_info_free
  **/
 CamelMessageInfo *
-camel_folder_summary_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
+camel_folder_summary_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
 {
 	CamelMessageInfo *info = NULL;
 	gchar *buffer;
 	gsize len;
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 	goffset start;
 	CamelIndexName *name = NULL;
 
 	/* should this check the parser is in the right state, or assume it is?? */
 
-	start = camel_mime_parser_tell(mp);
-	if (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_EOF) {
+	start = camel_mime_parser_tell (mp);
+	if (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_EOF) {
 		info = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->message_info_new_from_parser (s, mp);
 
-		camel_mime_parser_unstep(mp);
+		camel_mime_parser_unstep (mp);
 
 		/* assign a unique uid, this is slightly 'wrong' as we do not really
 		 * know if we are going to store this in the summary, but no matter */
 		if (p->index)
-			summary_assign_uid(s, info);
+			summary_assign_uid (s, info);
 
 		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_FILTER_LOCK);
 
 		if (p->index) {
 			if (p->filter_index == NULL)
 				p->filter_index = camel_mime_filter_index_new (p->index);
-			camel_index_delete_name(p->index, camel_message_info_uid(info));
-			name = camel_index_add_name(p->index, camel_message_info_uid(info));
-			camel_mime_filter_index_set_name(CAMEL_MIME_FILTER_INDEX (p->filter_index), name);
+			camel_index_delete_name (p->index, camel_message_info_uid (info));
+			name = camel_index_add_name (p->index, camel_message_info_uid (info));
+			camel_mime_filter_index_set_name (CAMEL_MIME_FILTER_INDEX (p->filter_index), name);
 		}
 
 		/* always scan the content info, even if we dont save it */
-		((CamelMessageInfoBase *)info)->content = summary_build_content_info(s, info, mp);
+		((CamelMessageInfoBase *)info)->content = summary_build_content_info (s, info, mp);
 
 		if (name && p->index) {
-			camel_index_write_name(p->index, name);
+			camel_index_write_name (p->index, name);
 			g_object_unref (name);
 			camel_mime_filter_index_set_name (
 				CAMEL_MIME_FILTER_INDEX (p->filter_index), NULL);
@@ -2693,7 +2693,7 @@ camel_folder_summary_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser
 
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_FILTER_LOCK);
 
-		((CamelMessageInfoBase *)info)->size = camel_mime_parser_tell(mp) - start;
+		((CamelMessageInfoBase *)info)->size = camel_mime_parser_tell (mp) - start;
 	}
 	return info;
 }
@@ -2710,10 +2710,10 @@ camel_folder_summary_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser
  * #camel_message_info_free
  **/
 CamelMessageInfo *
-camel_folder_summary_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
+camel_folder_summary_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
 {
 	CamelMessageInfo *info;
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 	CamelIndexName *name = NULL;
 
 	info = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->message_info_new_from_message (s, msg, bodystructure);
@@ -2721,30 +2721,30 @@ camel_folder_summary_info_new_from_message(CamelFolderSummary *s, CamelMimeMessa
 	/* assign a unique uid, this is slightly 'wrong' as we do not really
 	 * know if we are going to store this in the summary, but we need it set for indexing */
 	if (p->index)
-		summary_assign_uid(s, info);
+		summary_assign_uid (s, info);
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_FILTER_LOCK);
 
 	if (p->index) {
 		if (p->filter_index == NULL)
 			p->filter_index = camel_mime_filter_index_new (p->index);
-		camel_index_delete_name(p->index, camel_message_info_uid(info));
-		name = camel_index_add_name(p->index, camel_message_info_uid(info));
+		camel_index_delete_name (p->index, camel_message_info_uid (info));
+		name = camel_index_add_name (p->index, camel_message_info_uid (info));
 		camel_mime_filter_index_set_name (
 			CAMEL_MIME_FILTER_INDEX (p->filter_index), name);
 
 		if (p->filter_stream == NULL) {
-			CamelStream *null = camel_stream_null_new();
+			CamelStream *null = camel_stream_null_new ();
 
 			p->filter_stream = camel_stream_filter_new (null);
 			g_object_unref (null);
 		}
 	}
 
-	((CamelMessageInfoBase *)info)->content = summary_build_content_info_message(s, info, (CamelMimePart *)msg);
+	((CamelMessageInfoBase *)info)->content = summary_build_content_info_message (s, info, (CamelMimePart *)msg);
 
 	if (name) {
-		camel_index_write_name(p->index, name);
+		camel_index_write_name (p->index, name);
 		g_object_unref (name);
 		camel_mime_filter_index_set_name (
 			CAMEL_MIME_FILTER_INDEX (p->filter_index), NULL);
@@ -2763,7 +2763,7 @@ camel_folder_summary_info_new_from_message(CamelFolderSummary *s, CamelMimeMessa
  * Free the content info @ci, and all associated memory.
  **/
 void
-camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
+camel_folder_summary_content_info_free (CamelFolderSummary *s, CamelMessageContentInfo *ci)
 {
 	CamelMessageContentInfo *pw, *pn;
 
@@ -2771,7 +2771,7 @@ camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageConten
 	CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->content_info_free (s, ci);
 	while (pw) {
 		pn = pw->next;
-		camel_folder_summary_content_info_free(s, pw);
+		camel_folder_summary_content_info_free (s, pw);
 		pw = pn;
 	}
 }
@@ -2784,7 +2784,7 @@ camel_folder_summary_content_info_free(CamelFolderSummary *s, CamelMessageConten
  * written back to disk.
  **/
 void
-camel_folder_summary_touch(CamelFolderSummary *s)
+camel_folder_summary_touch (CamelFolderSummary *s)
 {
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	s->flags |= CAMEL_SUMMARY_DIRTY;
@@ -2798,13 +2798,13 @@ camel_folder_summary_touch(CamelFolderSummary *s)
  * Empty the summary contents.
  **/
 void
-camel_folder_summary_clear(CamelFolderSummary *s)
+camel_folder_summary_clear (CamelFolderSummary *s)
 {
 	d(printf ("\ncamel_folder_summary_clearcalled \n"));
 	s->flags &= ~CAMEL_SUMMARY_DIRTY;
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-	if (camel_folder_summary_count(s) == 0) {
+	if (camel_folder_summary_count (s) == 0) {
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		return;
 	}
@@ -2814,8 +2814,8 @@ camel_folder_summary_clear(CamelFolderSummary *s)
 	s->uids = g_ptr_array_new ();
 	s->visible_count = s->deleted_count = s->unread_count = 0;
 
-	g_hash_table_destroy(s->loaded_infos);
-	s->loaded_infos = g_hash_table_new(g_str_hash, g_str_equal);
+	g_hash_table_destroy (s->loaded_infos);
+	s->loaded_infos = g_hash_table_new (g_str_hash, g_str_equal);
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 }
@@ -2844,7 +2844,7 @@ camel_folder_summary_clear_db (CamelFolderSummary *s)
 	cdb = parent_store->cdb_w;
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-	if (camel_folder_summary_count(s) == 0) {
+	if (camel_folder_summary_count (s) == 0) {
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		return;
 	}
@@ -2854,8 +2854,8 @@ camel_folder_summary_clear_db (CamelFolderSummary *s)
 	s->uids = g_ptr_array_new ();
 	s->visible_count = s->deleted_count = s->unread_count = 0;
 
-	g_hash_table_destroy(s->loaded_infos);
-	s->loaded_infos = g_hash_table_new(g_str_hash, g_str_equal);
+	g_hash_table_destroy (s->loaded_infos);
+	s->loaded_infos = g_hash_table_new (g_str_hash, g_str_equal);
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
@@ -2873,9 +2873,9 @@ summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
 
 	/* This could be slower, but no otherway really. FIXME: Callers have to effective and shouldn't call it recursively. */
 	for (i=0; i<s->uids->len; i++) {
-		if (strcmp(s->uids->pdata[i], uid) == 0) {
+		if (strcmp (s->uids->pdata[i], uid) == 0) {
 			/* FIXME: Does using fast remove affect anything ? */
-			g_ptr_array_remove_index(s->uids, i);
+			g_ptr_array_remove_index (s->uids, i);
 			camel_pstring_free (uid);
 			return 0;
 		}
@@ -2903,8 +2903,8 @@ camel_folder_summary_remove (CamelFolderSummary *s, CamelMessageInfo *info)
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	found = g_hash_table_lookup (s->loaded_infos, camel_message_info_uid (info)) != NULL;
-	g_hash_table_remove (s->loaded_infos, camel_message_info_uid(info));
-	ret = summary_remove_uid (s, camel_message_info_uid(info));
+	g_hash_table_remove (s->loaded_infos, camel_message_info_uid (info));
+	ret = summary_remove_uid (s, camel_message_info_uid (info));
 
 	s->flags |= CAMEL_SUMMARY_DIRTY;
 	s->meta_summary->msg_expunged = TRUE;
@@ -2913,7 +2913,7 @@ camel_folder_summary_remove (CamelFolderSummary *s, CamelMessageInfo *info)
 	full_name = camel_folder_get_full_name (s->folder);
 	parent_store = camel_folder_get_parent_store (s->folder);
 
-	if (!ret && camel_db_delete_uid (parent_store->cdb_w, full_name, camel_message_info_uid(info), NULL) != 0)
+	if (!ret && camel_db_delete_uid (parent_store->cdb_w, full_name, camel_message_info_uid (info), NULL) != 0)
 		return;
 
 	if (found)
@@ -2928,20 +2928,20 @@ camel_folder_summary_remove (CamelFolderSummary *s, CamelMessageInfo *info)
  * Remove a specific info record from the summary, by @uid.
  **/
 void
-camel_folder_summary_remove_uid(CamelFolderSummary *s, const gchar *uid)
+camel_folder_summary_remove_uid (CamelFolderSummary *s, const gchar *uid)
 {
 	CamelMessageInfo *oldinfo;
 	gchar *olduid;
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
-	if (g_hash_table_lookup_extended(s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+	if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
 		/* make sure it doesn't vanish while we're removing it */
 		camel_message_info_ref (oldinfo);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-		camel_folder_summary_remove(s, oldinfo);
-		camel_message_info_free(oldinfo);
+		camel_folder_summary_remove (s, oldinfo);
+		camel_message_info_free (oldinfo);
 	} else {
 		CamelStore *parent_store;
 		const gchar *full_name;
@@ -2955,7 +2955,7 @@ camel_folder_summary_remove_uid(CamelFolderSummary *s, const gchar *uid)
 		full_name = camel_folder_get_full_name (s->folder);
 		parent_store = camel_folder_get_parent_store (s->folder);
 		if (!ret && camel_db_delete_uid (parent_store->cdb_w, full_name, tmpid, NULL) != 0) {
-			g_free(tmpid);
+			g_free (tmpid);
 			return;
 		}
 		g_free (tmpid);
@@ -2977,7 +2977,7 @@ camel_folder_summary_remove_uid_fast (CamelFolderSummary *s, const gchar *uid)
 
 		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
-		if (g_hash_table_lookup_extended(s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+		if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
 				/* make sure it doesn't vanish while we're removing it */
 				camel_message_info_ref (oldinfo);
 				camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
@@ -2985,8 +2985,8 @@ camel_folder_summary_remove_uid_fast (CamelFolderSummary *s, const gchar *uid)
 				summary_remove_uid (s, olduid);
 				s->flags |= CAMEL_SUMMARY_DIRTY;
 				s->meta_summary->msg_expunged = TRUE;
-				camel_message_info_free(oldinfo);
-				camel_message_info_free(oldinfo);
+				camel_message_info_free (oldinfo);
+				camel_message_info_free (oldinfo);
 				camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 		} else {
 				gchar *tmpid = g_strdup (uid);
@@ -3013,17 +3013,17 @@ camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index)
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
 
-	if (g_hash_table_lookup_extended(s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
+	if (g_hash_table_lookup_extended (s->loaded_infos, uid, (gpointer)&olduid, (gpointer)&oldinfo)) {
 		/* make sure it doesn't vanish while we're removing it */
 		g_hash_table_remove (s->loaded_infos, uid);
 		camel_pstring_free (uid);
-		g_ptr_array_remove_index(s->uids, index);
+		g_ptr_array_remove_index (s->uids, index);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-		camel_message_info_free(oldinfo);
+		camel_message_info_free (oldinfo);
 	} else {
 		/* Info isn't loaded into the memory. We must just remove the UID*/
-		g_ptr_array_remove_index(s->uids, index);
+		g_ptr_array_remove_index (s->uids, index);
 		camel_pstring_free (uid);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_REF_LOCK);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -3038,7 +3038,7 @@ camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index)
  * Remove a specific info record from the summary, by index.
  **/
 void
-camel_folder_summary_remove_index(CamelFolderSummary *s, gint index)
+camel_folder_summary_remove_index (CamelFolderSummary *s, gint index)
 {
 	const gchar *uid = s->uids->pdata[index];
 
@@ -3070,7 +3070,7 @@ camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
 		const gchar *folder_name;
 		GSList *uids = NULL;
 
-		end = MIN(end+1, s->uids->len);
+		end = MIN (end+1, s->uids->len);
 
 		for (i = start; i < end; i++) {
 			const gchar *uid = s->uids->pdata[i];
@@ -3098,8 +3098,8 @@ camel_folder_summary_remove_range (CamelFolderSummary *s, gint start, gint end)
 		g_slist_foreach (uids, (GFunc) camel_pstring_free, NULL);
 		g_slist_free (uids);
 
-		memmove(s->uids->pdata+start, s->uids->pdata+end, (s->uids->len-end)*sizeof(s->uids->pdata[0]));
-		g_ptr_array_set_size(s->uids, s->uids->len - (end - start));
+		memmove (s->uids->pdata+start, s->uids->pdata+end, (s->uids->len-end)*sizeof (s->uids->pdata[0]));
+		g_ptr_array_set_size (s->uids, s->uids->len - (end - start));
 
 		s->flags |= CAMEL_SUMMARY_DIRTY;
 
@@ -3143,16 +3143,16 @@ static const gchar * tokens[] = {
 
 /* baiscally ...
     0 = null
-    1-len(tokens) == tokens[id-1]
+    1-len (tokens) == tokens[id-1]
     >=32 string, length = n-32
 */
 
 #ifdef USE_BSEARCH
 static gint
-token_search_cmp(gchar *key, gchar **index)
+token_search_cmp (gchar *key, gchar **index)
 {
 	d(printf("comparing '%s' to '%s'\n", key, *index));
-	return strcmp(key, *index);
+	return strcmp (key, *index);
 }
 #endif
 
@@ -3168,14 +3168,14 @@ token_search_cmp(gchar *key, gchar **index)
  * Returns: %0 on success or %-1 on fail
  **/
 gint
-camel_folder_summary_encode_token(FILE *out, const gchar *str)
+camel_folder_summary_encode_token (FILE *out, const gchar *str)
 {
 	io(printf("Encoding token: '%s'\n", str));
 
 	if (str == NULL) {
-		return camel_file_util_encode_uint32(out, 0);
+		return camel_file_util_encode_uint32 (out, 0);
 	} else {
-		gint len = strlen(str);
+		gint len = strlen (str);
 		gint i, token=-1;
 
 		if (len <= 16) {
@@ -3183,15 +3183,15 @@ camel_folder_summary_encode_token(FILE *out, const gchar *str)
 			const gchar **match;
 
 			for (i=0;i<len;i++)
-				lower[i] = tolower(str[i]);
+				lower[i] = tolower (str[i]);
 			lower[i] = 0;
 #ifdef USE_BSEARCH
-			match = bsearch(lower, tokens, G_N_ELEMENTS (tokens), sizeof(gchar *), (gint (*)(gconstpointer , gconstpointer ))token_search_cmp);
+			match = bsearch (lower, tokens, G_N_ELEMENTS (tokens), sizeof (gchar *), (gint (*)(gconstpointer , gconstpointer ))token_search_cmp);
 			if (match)
 				token = match-tokens;
 #else
 			for (i = 0; i < G_N_ELEMENTS (tokens); i++) {
-				if (!strcmp(tokens[i], lower)) {
+				if (!strcmp (tokens[i], lower)) {
 					token = i;
 					break;
 				}
@@ -3199,11 +3199,11 @@ camel_folder_summary_encode_token(FILE *out, const gchar *str)
 #endif
 		}
 		if (token != -1) {
-			return camel_file_util_encode_uint32(out, token+1);
+			return camel_file_util_encode_uint32 (out, token+1);
 		} else {
-			if (camel_file_util_encode_uint32(out, len+32) == -1)
+			if (camel_file_util_encode_uint32 (out, len+32) == -1)
 				return -1;
-			if (fwrite(str, len, 1, out) != 1)
+			if (fwrite (str, len, 1, out) != 1)
 				return -1;
 		}
 	}
@@ -3220,14 +3220,14 @@ camel_folder_summary_encode_token(FILE *out, const gchar *str)
  * Returns: %0 on success or %-1 on fail
  **/
 gint
-camel_folder_summary_decode_token(FILE *in, gchar **str)
+camel_folder_summary_decode_token (FILE *in, gchar **str)
 {
 	gchar *ret;
 	guint32 len;
 
 	io(printf("Decode token ...\n"));
 
-	if (camel_file_util_decode_uint32(in, &len) == -1) {
+	if (camel_file_util_decode_uint32 (in, &len) == -1) {
 		io(printf ("Could not decode token from file"));
 		*str = NULL;
 		return -1;
@@ -3237,7 +3237,7 @@ camel_folder_summary_decode_token(FILE *in, gchar **str)
 		if (len <= 0) {
 			ret = NULL;
 		} else if (len<= G_N_ELEMENTS (tokens)) {
-			ret = g_strdup(tokens[len-1]);
+			ret = g_strdup (tokens[len-1]);
 		} else {
 			io(printf ("Invalid token encountered: %d", len));
 			*str = NULL;
@@ -3249,9 +3249,9 @@ camel_folder_summary_decode_token(FILE *in, gchar **str)
 		return -1;
 	} else {
 		len -= 32;
-		ret = g_malloc(len+1);
-		if (len > 0 && fread(ret, len, 1, in) != 1) {
-			g_free(ret);
+		ret = g_malloc (len+1);
+		if (len > 0 && fread (ret, len, 1, in) != 1) {
+			g_free (ret);
 			*str = NULL;
 			return -1;
 		}
@@ -3265,7 +3265,7 @@ camel_folder_summary_decode_token(FILE *in, gchar **str)
 }
 
 static struct _node *
-my_list_append(struct _node **list, struct _node *n)
+my_list_append (struct _node **list, struct _node *n)
 {
 	struct _node *ln = *list;
 	n->next = NULL;
@@ -3282,7 +3282,7 @@ my_list_append(struct _node **list, struct _node *n)
 }
 
 static gint
-my_list_size(struct _node **list)
+my_list_size (struct _node **list)
 {
 	gint len = 0;
 	struct _node *ln = (struct _node *)list;
@@ -3294,16 +3294,16 @@ my_list_size(struct _node **list)
 }
 
 static gint
-summary_header_load(CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s, FILE *in)
 {
 	if (!s->summary_path)
 		return -1;
 
-	fseek(in, 0, SEEK_SET);
+	fseek (in, 0, SEEK_SET);
 
 	io(printf("Loading header\n"));
 
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &s->version) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->version) == -1)
 		return -1;
 
 	/* Legacy version check, before version 12 we have no upgrade knowledge */
@@ -3320,18 +3320,18 @@ summary_header_load(CamelFolderSummary *s, FILE *in)
 	}
 
 	/* legacy version */
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &s->flags) == -1
-	    || camel_file_util_decode_fixed_int32(in, (gint32 *) &s->nextuid) == -1
-	    || camel_file_util_decode_time_t(in, &s->time) == -1
-	    || camel_file_util_decode_fixed_int32(in, (gint32 *) &s->saved_count) == -1) {
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->flags) == -1
+	    || camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->nextuid) == -1
+	    || camel_file_util_decode_time_t (in, &s->time) == -1
+	    || camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->saved_count) == -1) {
 		return -1;
 	}
 
 	/* version 13 */
 	if (s->version < 0x100 && s->version >= 13
-	    && (camel_file_util_decode_fixed_int32(in, (gint32 *) &s->unread_count) == -1
-		|| camel_file_util_decode_fixed_int32(in, (gint32 *) &s->deleted_count) == -1
-		|| camel_file_util_decode_fixed_int32(in, (gint32 *) &s->junk_count) == -1)) {
+	    && (camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->unread_count) == -1
+		|| camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->deleted_count) == -1
+		|| camel_file_util_decode_fixed_int32 (in, (gint32 *) &s->junk_count) == -1)) {
 		return -1;
 	}
 
@@ -3340,12 +3340,12 @@ summary_header_load(CamelFolderSummary *s, FILE *in)
 
 /* are these even useful for anything??? */
 static CamelMessageInfo *
-message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
+message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
 {
 	CamelMessageInfo *mi = NULL;
 	gint state;
 
-	state = camel_mime_parser_state(mp);
+	state = camel_mime_parser_state (mp);
 	switch (state) {
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
@@ -3360,18 +3360,18 @@ message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
 }
 
 static CamelMessageContentInfo *
-content_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
+content_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
 {
 	CamelMessageContentInfo *ci = NULL;
 
-	switch (camel_mime_parser_state(mp)) {
+	switch (camel_mime_parser_state (mp)) {
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 	case CAMEL_MIME_PARSER_STATE_MULTIPART:
 		ci = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->content_info_new_from_header (s, camel_mime_parser_headers_raw (mp));
 		if (ci) {
-			ci->type = camel_mime_parser_content_type(mp);
-			camel_content_type_ref(ci->type);
+			ci->type = camel_mime_parser_content_type (mp);
+			camel_content_type_ref (ci->type);
 		}
 		break;
 	default:
@@ -3382,28 +3382,28 @@ content_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
 }
 
 static CamelMessageInfo *
-message_info_new_from_message(CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
+message_info_new_from_message (CamelFolderSummary *s, CamelMimeMessage *msg, const gchar *bodystructure)
 {
 	CamelMessageInfo *mi;
 
-	mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_header(s, ((CamelMimePart *)msg)->headers);
+	mi = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS (s)))->message_info_new_from_header (s, ((CamelMimePart *)msg)->headers);
 	((CamelMessageInfoBase *)mi)->bodystructure = g_strdup (bodystructure);
 
 	return mi;
 }
 
 static CamelMessageContentInfo *
-content_info_new_from_message(CamelFolderSummary *s, CamelMimePart *mp)
+content_info_new_from_message (CamelFolderSummary *s, CamelMimePart *mp)
 {
 	CamelMessageContentInfo *ci;
 
-	ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_header(s, mp->headers);
+	ci = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS (s)))->content_info_new_from_header (s, mp->headers);
 
 	return ci;
 }
 
 static gchar *
-summary_format_address(struct _camel_header_raw *h, const gchar *name, const gchar *charset)
+summary_format_address (struct _camel_header_raw *h, const gchar *name, const gchar *charset)
 {
 	struct _camel_header_address *addr;
 	gchar *text, *str;
@@ -3455,7 +3455,7 @@ summary_format_string (struct _camel_header_raw *h, const gchar *name, const gch
  * Returns: a newly allocated #CamelMessageContentInfo
  **/
 CamelMessageContentInfo *
-camel_folder_summary_content_info_new(CamelFolderSummary *s)
+camel_folder_summary_content_info_new (CamelFolderSummary *s)
 {
 	CamelFolderSummaryClass *class;
 	CamelMessageContentInfo *ci;
@@ -3470,7 +3470,7 @@ camel_folder_summary_content_info_new(CamelFolderSummary *s)
 }
 
 static CamelMessageInfo *
-message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
 {
 	const gchar *received, *date, *content, *charset = NULL;
 	struct _camel_header_references *refs, *irt, *scan;
@@ -3485,10 +3485,10 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 	length = g_checksum_type_get_length (G_CHECKSUM_MD5);
 	digest = g_alloca (length);
 
-	mi = (CamelMessageInfoBase *)camel_message_info_new(s);
+	mi = (CamelMessageInfoBase *)camel_message_info_new (s);
 
 	if ((content = camel_header_raw_find(&h, "Content-Type", NULL))
-	     && (ct = camel_content_type_decode(content))
+	     && (ct = camel_content_type_decode (content))
 	     && (charset = camel_content_type_param(ct, "charset"))
 	     && (g_ascii_strcasecmp(charset, "us-ascii") == 0))
 		charset = NULL;
@@ -3499,10 +3499,10 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 	from = summary_format_address(h, "from", charset);
 	to = summary_format_address(h, "to", charset);
 	cc = summary_format_address(h, "cc", charset);
-	mlist = camel_header_raw_check_mailing_list(&h);
+	mlist = camel_header_raw_check_mailing_list (&h);
 
 	if (ct)
-		camel_content_type_unref(ct);
+		camel_content_type_unref (ct);
 
 	mi->subject = camel_pstring_add (subject, TRUE);
 	mi->from = camel_pstring_add (from, TRUE);
@@ -3520,9 +3520,9 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 
 	received = camel_header_raw_find(&h, "received", NULL);
 	if (received)
-		received = strrchr(received, ';');
+		received = strrchr (received, ';');
 	if (received)
-		mi->date_received = camel_header_decode_date(received + 1, NULL);
+		mi->date_received = camel_header_decode_date (received + 1, NULL);
 	else
 		mi->date_received = 0;
 
@@ -3535,8 +3535,8 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 		g_checksum_get_digest (checksum, digest, &length);
 		g_checksum_free (checksum);
 
-		memcpy(mi->message_id.id.hash, digest, sizeof(mi->message_id.id.hash));
-		g_free(msgid);
+		memcpy (mi->message_id.id.hash, digest, sizeof (mi->message_id.id.hash));
+		g_free (msgid);
 	}
 
 	/* decode our references and in-reply-to headers */
@@ -3554,8 +3554,8 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 			refs = irt;
 		}
 
-		count = camel_header_references_list_size(&refs);
-		mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
+		count = camel_header_references_list_size (&refs);
+		mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
 		count = 0;
 		scan = refs;
 		while (scan) {
@@ -3566,12 +3566,12 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 			g_checksum_get_digest (checksum, digest, &length);
 			g_checksum_free (checksum);
 
-			memcpy(mi->references->references[count].id.hash, digest, sizeof(mi->message_id.id.hash));
+			memcpy (mi->references->references[count].id.hash, digest, sizeof (mi->message_id.id.hash));
 			count++;
 			scan = scan->next;
 		}
 		mi->references->size = count;
-		camel_header_references_list_clear(&refs);
+		camel_header_references_list_clear (&refs);
 	}
 
 	return (CamelMessageInfo *)mi;
@@ -3585,20 +3585,20 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 	gint i;
 	gchar *subject, *from, *to, *cc, *mlist, *uid;
 
-	mi = (CamelMessageInfoBase *)camel_message_info_new(s);
+	mi = (CamelMessageInfoBase *)camel_message_info_new (s);
 
 	io(printf("Loading message info\n"));
 
-	camel_file_util_decode_string(in, &uid);
-	camel_file_util_decode_uint32(in, &mi->flags);
-	camel_file_util_decode_uint32(in, &mi->size);
-	camel_file_util_decode_time_t(in, &mi->date_sent);
-	camel_file_util_decode_time_t(in, &mi->date_received);
-	camel_file_util_decode_string(in, &subject);
-	camel_file_util_decode_string(in, &from);
-	camel_file_util_decode_string(in, &to);
-	camel_file_util_decode_string(in, &cc);
-	camel_file_util_decode_string(in, &mlist);
+	camel_file_util_decode_string (in, &uid);
+	camel_file_util_decode_uint32 (in, &mi->flags);
+	camel_file_util_decode_uint32 (in, &mi->size);
+	camel_file_util_decode_time_t (in, &mi->date_sent);
+	camel_file_util_decode_time_t (in, &mi->date_received);
+	camel_file_util_decode_string (in, &subject);
+	camel_file_util_decode_string (in, &from);
+	camel_file_util_decode_string (in, &to);
+	camel_file_util_decode_string (in, &cc);
+	camel_file_util_decode_string (in, &mlist);
 
 	mi->uid = camel_pstring_add (uid, TRUE);
 	mi->subject = camel_pstring_add (subject, TRUE);
@@ -3609,56 +3609,56 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 
 	mi->content = NULL;
 
-	camel_file_util_decode_fixed_int32(in, (gint32 *) &mi->message_id.id.part.hi);
-	camel_file_util_decode_fixed_int32(in, (gint32 *) &mi->message_id.id.part.lo);
+	camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->message_id.id.part.hi);
+	camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->message_id.id.part.lo);
 
-	if (camel_file_util_decode_uint32(in, &count) == -1)
+	if (camel_file_util_decode_uint32 (in, &count) == -1)
 		goto error;
 
 	if (count > 0) {
-		mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
+		mi->references = g_malloc (sizeof (*mi->references) + ((count-1) * sizeof (mi->references->references[0])));
 		mi->references->size = count;
 		for (i=0;i<count;i++) {
-			camel_file_util_decode_fixed_int32(in, (gint32 *) &mi->references->references[i].id.part.hi);
-			camel_file_util_decode_fixed_int32(in, (gint32 *) &mi->references->references[i].id.part.lo);
+			camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.hi);
+			camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.lo);
 		}
 	}
 
-	if (camel_file_util_decode_uint32(in, &count) == -1)
+	if (camel_file_util_decode_uint32 (in, &count) == -1)
 		goto error;
 
 	for (i=0;i<count;i++) {
 		gchar *name;
-		if (camel_file_util_decode_string(in, &name) == -1 || name == NULL)
+		if (camel_file_util_decode_string (in, &name) == -1 || name == NULL)
 			goto error;
-		camel_flag_set(&mi->user_flags, name, TRUE);
-		g_free(name);
+		camel_flag_set (&mi->user_flags, name, TRUE);
+		g_free (name);
 	}
 
-	if (camel_file_util_decode_uint32(in, &count) == -1)
+	if (camel_file_util_decode_uint32 (in, &count) == -1)
 		goto error;
 
 	for (i=0;i<count;i++) {
 		gchar *name, *value;
-		if (camel_file_util_decode_string(in, &name) == -1 || name == NULL
-		    || camel_file_util_decode_string(in, &value) == -1)
+		if (camel_file_util_decode_string (in, &name) == -1 || name == NULL
+		    || camel_file_util_decode_string (in, &value) == -1)
 			goto error;
-		camel_tag_set(&mi->user_tags, name, value);
-		g_free(name);
-		g_free(value);
+		camel_tag_set (&mi->user_tags, name, value);
+		g_free (name);
+		g_free (value);
 	}
 
-	if (!ferror(in))
+	if (!ferror (in))
 		return (CamelMessageInfo *)mi;
 
 error:
-	camel_message_info_free((CamelMessageInfo *)mi);
+	camel_message_info_free ((CamelMessageInfo *)mi);
 
 	return NULL;
 }
 
 static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
 {
 	CamelFolderSummaryClass *class;
 	CamelMessageInfoBase *mi = (CamelMessageInfoBase *)info;
@@ -3667,18 +3667,18 @@ message_info_free(CamelFolderSummary *s, CamelMessageInfo *info)
 		if (s && g_hash_table_lookup (s->loaded_infos, mi->uid) == mi) {
 			g_hash_table_remove (s->loaded_infos, mi->uid);
 		}
-		camel_pstring_free(mi->uid);
+		camel_pstring_free (mi->uid);
 	}
-	camel_pstring_free(mi->subject);
-	camel_pstring_free(mi->from);
-	camel_pstring_free(mi->to);
-	camel_pstring_free(mi->cc);
-	camel_pstring_free(mi->mlist);
+	camel_pstring_free (mi->subject);
+	camel_pstring_free (mi->from);
+	camel_pstring_free (mi->to);
+	camel_pstring_free (mi->cc);
+	camel_pstring_free (mi->mlist);
 	g_free (mi->bodystructure);
-	g_free(mi->references);
+	g_free (mi->references);
 	g_free (mi->preview);
-	camel_flag_list_free(&mi->user_flags);
-	camel_tag_list_free(&mi->user_tags);
+	camel_flag_list_free (&mi->user_flags);
+	camel_tag_list_free (&mi->user_tags);
 	if (mi->headers)
 		camel_header_param_list_free (mi->headers);
 
@@ -3690,7 +3690,7 @@ message_info_free(CamelFolderSummary *s, CamelMessageInfo *info)
 }
 
 static CamelMessageContentInfo *
-content_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
+content_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
 {
 	CamelMessageContentInfo *ci;
 	const gchar *charset;
@@ -3716,63 +3716,63 @@ content_info_migrate (CamelFolderSummary *s, FILE *in)
 
 	io(printf("Loading content info\n"));
 
-	ci = camel_folder_summary_content_info_new(s);
+	ci = camel_folder_summary_content_info_new (s);
 
-	camel_folder_summary_decode_token(in, &type);
-	camel_folder_summary_decode_token(in, &subtype);
-	ct = camel_content_type_new(type, subtype);
-	g_free(type);		/* can this be removed? */
-	g_free(subtype);
+	camel_folder_summary_decode_token (in, &type);
+	camel_folder_summary_decode_token (in, &subtype);
+	ct = camel_content_type_new (type, subtype);
+	g_free (type);		/* can this be removed? */
+	g_free (subtype);
 
-	if (camel_file_util_decode_uint32(in, &count) == -1)
+	if (camel_file_util_decode_uint32 (in, &count) == -1)
 		goto error;
 
 	for (i = 0; i < count; i++) {
 		gchar *name, *value;
-		camel_folder_summary_decode_token(in, &name);
-		camel_folder_summary_decode_token(in, &value);
+		camel_folder_summary_decode_token (in, &name);
+		camel_folder_summary_decode_token (in, &value);
 		if (!(name && value))
 			goto error;
 
-		camel_content_type_set_param(ct, name, value);
+		camel_content_type_set_param (ct, name, value);
 		/* TODO: do this so we dont have to double alloc/free */
-		g_free(name);
-		g_free(value);
+		g_free (name);
+		g_free (value);
 	}
 	ci->type = ct;
 
-	camel_folder_summary_decode_token(in, &ci->id);
-	camel_folder_summary_decode_token(in, &ci->description);
-	camel_folder_summary_decode_token(in, &ci->encoding);
+	camel_folder_summary_decode_token (in, &ci->id);
+	camel_folder_summary_decode_token (in, &ci->description);
+	camel_folder_summary_decode_token (in, &ci->encoding);
 
-	camel_file_util_decode_uint32(in, &ci->size);
+	camel_file_util_decode_uint32 (in, &ci->size);
 
 	ci->childs = NULL;
 
-	if (!ferror(in))
+	if (!ferror (in))
 		return ci;
 
  error:
-	camel_folder_summary_content_info_free(s, ci);
+	camel_folder_summary_content_info_free (s, ci);
 	return NULL;
 }
 
 static void
-content_info_free(CamelFolderSummary *s, CamelMessageContentInfo *ci)
+content_info_free (CamelFolderSummary *s, CamelMessageContentInfo *ci)
 {
 	CamelFolderSummaryClass *class;
 
 	class = CAMEL_FOLDER_SUMMARY_GET_CLASS (s);
 
-	camel_content_type_unref(ci->type);
-	g_free(ci->id);
-	g_free(ci->description);
-	g_free(ci->encoding);
+	camel_content_type_unref (ci->type);
+	g_free (ci->id);
+	g_free (ci->description);
+	g_free (ci->encoding);
 	g_slice_free1 (class->content_info_size, ci);
 }
 
 static gchar *
-next_uid_string(CamelFolderSummary *s)
+next_uid_string (CamelFolderSummary *s)
 {
 	return g_strdup_printf("%u", camel_folder_summary_next_uid(s));
 }
@@ -3785,7 +3785,7 @@ next_uid_string(CamelFolderSummary *s)
 
 /* must have filter_lock before calling this function */
 static CamelMessageContentInfo *
-summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
+summary_build_content_info (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimeParser *mp)
 {
 	gint state;
 	gsize len;
@@ -3793,7 +3793,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 	CamelMessageContentInfo *info = NULL;
 	CamelContentType *ct;
 	gint enc_id = -1, chr_id = -1, html_id = -1, idx_id = -1;
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 	CamelMimeFilter *mfc;
 	CamelMessageContentInfo *part;
 	const gchar *calendar_header;
@@ -3801,7 +3801,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 	d(printf("building content info\n"));
 
 	/* start of this part */
-	state = camel_mime_parser_step(mp, &buffer, &len);
+	state = camel_mime_parser_step (mp, &buffer, &len);
 
 	if (s->build_content)
 		info = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->content_info_new_from_parser (s, mp);
@@ -3809,7 +3809,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 	switch (state) {
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 		/* check content type for indexing, then read body */
-		ct = camel_mime_parser_content_type(mp);
+		ct = camel_mime_parser_content_type (mp);
 		/* update attachments flag as we go */
 		if (camel_content_type_is(ct, "application", "pgp-signature")
 #ifdef ENABLE_SMIME
@@ -3817,7 +3817,7 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 		    || camel_content_type_is(ct, "application", "pkcs7-signature")
 #endif
 			)
-			camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
+			camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
 
 		calendar_header = camel_mime_parser_header (mp, "Content-class", NULL);
 		if (calendar_header && g_ascii_strcasecmp (calendar_header, "urn:content-classes:calendarmessage") != 0)
@@ -3842,26 +3842,26 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 					if (p->filter_64 == NULL)
 						p->filter_64 = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_BASE64_DEC);
 					else
-						camel_mime_filter_reset(p->filter_64);
-					enc_id = camel_mime_parser_filter_add(mp, p->filter_64);
+						camel_mime_filter_reset (p->filter_64);
+					enc_id = camel_mime_parser_filter_add (mp, p->filter_64);
 				} else if (!g_ascii_strcasecmp(encoding, "quoted-printable")) {
 					d(printf(" decoding quoted-printable\n"));
 					if (p->filter_qp == NULL)
 						p->filter_qp = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_QP_DEC);
 					else
-						camel_mime_filter_reset(p->filter_qp);
-					enc_id = camel_mime_parser_filter_add(mp, p->filter_qp);
+						camel_mime_filter_reset (p->filter_qp);
+					enc_id = camel_mime_parser_filter_add (mp, p->filter_qp);
 				} else if (!g_ascii_strcasecmp (encoding, "x-uuencode")) {
 					d(printf(" decoding x-uuencode\n"));
 					if (p->filter_uu == NULL)
 						p->filter_uu = camel_mime_filter_basic_new (CAMEL_MIME_FILTER_BASIC_UU_DEC);
 					else
-						camel_mime_filter_reset(p->filter_uu);
-					enc_id = camel_mime_parser_filter_add(mp, p->filter_uu);
+						camel_mime_filter_reset (p->filter_uu);
+					enc_id = camel_mime_parser_filter_add (mp, p->filter_uu);
 				} else {
 					d(printf(" ignoring encoding %s\n", encoding));
 				}
-				g_free(encoding);
+				g_free (encoding);
 			}
 
 			charset = camel_content_type_param(ct, "charset");
@@ -3869,16 +3869,16 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 			    && !(g_ascii_strcasecmp(charset, "us-ascii")==0
 				 || g_ascii_strcasecmp(charset, "utf-8")==0)) {
 				d(printf(" Adding conversion filter from %s to UTF-8\n", charset));
-				mfc = g_hash_table_lookup(p->filter_charset, charset);
+				mfc = g_hash_table_lookup (p->filter_charset, charset);
 				if (mfc == NULL) {
 					mfc = camel_mime_filter_charset_new (charset, "UTF-8");
 					if (mfc)
-						g_hash_table_insert(p->filter_charset, g_strdup(charset), mfc);
+						g_hash_table_insert (p->filter_charset, g_strdup (charset), mfc);
 				} else {
-					camel_mime_filter_reset((CamelMimeFilter *)mfc);
+					camel_mime_filter_reset ((CamelMimeFilter *)mfc);
 				}
 				if (mfc) {
-					chr_id = camel_mime_parser_filter_add(mp, mfc);
+					chr_id = camel_mime_parser_filter_add (mp, mfc);
 				} else {
 					w(g_warning("Cannot convert '%s' to 'UTF-8', message index may be corrupt", charset));
 				}
@@ -3888,57 +3888,57 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 			   but works in most cases */
 			if (camel_content_type_is(ct, "text", "html")) {
 				if (p->filter_html == NULL)
-					p->filter_html = camel_mime_filter_html_new();
+					p->filter_html = camel_mime_filter_html_new ();
 				else
-					camel_mime_filter_reset((CamelMimeFilter *)p->filter_html);
-				html_id = camel_mime_parser_filter_add(mp, (CamelMimeFilter *)p->filter_html);
+					camel_mime_filter_reset ((CamelMimeFilter *)p->filter_html);
+				html_id = camel_mime_parser_filter_add (mp, (CamelMimeFilter *)p->filter_html);
 			}
 
 			/* and this filter actually does the indexing */
-			idx_id = camel_mime_parser_filter_add(mp, p->filter_index);
+			idx_id = camel_mime_parser_filter_add (mp, p->filter_index);
 		}
 		/* and scan/index everything */
-		while (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
+		while (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
 			;
 		/* and remove the filters */
-		camel_mime_parser_filter_remove(mp, enc_id);
-		camel_mime_parser_filter_remove(mp, chr_id);
-		camel_mime_parser_filter_remove(mp, html_id);
-		camel_mime_parser_filter_remove(mp, idx_id);
+		camel_mime_parser_filter_remove (mp, enc_id);
+		camel_mime_parser_filter_remove (mp, chr_id);
+		camel_mime_parser_filter_remove (mp, html_id);
+		camel_mime_parser_filter_remove (mp, idx_id);
 		break;
 	case CAMEL_MIME_PARSER_STATE_MULTIPART:
 		d(printf("Summarising multipart\n"));
 		/* update attachments flag as we go */
-		ct = camel_mime_parser_content_type(mp);
+		ct = camel_mime_parser_content_type (mp);
 		if (camel_content_type_is(ct, "multipart", "mixed"))
-			camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
+			camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
 		if (camel_content_type_is(ct, "multipart", "signed")
 		    || camel_content_type_is(ct, "multipart", "encrypted"))
-			camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
+			camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
 
-		while (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
-			camel_mime_parser_unstep(mp);
-			part = summary_build_content_info(s, msginfo, mp);
+		while (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
+			camel_mime_parser_unstep (mp);
+			part = summary_build_content_info (s, msginfo, mp);
 			if (part) {
 				part->parent = info;
-				my_list_append((struct _node **)&info->childs, (struct _node *)part);
+				my_list_append ((struct _node **)&info->childs, (struct _node *)part);
 			}
 		}
 		break;
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 		d(printf("Summarising message\n"));
 		/* update attachments flag as we go */
-		camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
+		camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
 
-		part = summary_build_content_info(s, msginfo, mp);
+		part = summary_build_content_info (s, msginfo, mp);
 		if (part) {
 			part->parent = info;
-			my_list_append((struct _node **)&info->childs, (struct _node *)part);
+			my_list_append ((struct _node **)&info->childs, (struct _node *)part);
 		}
-		state = camel_mime_parser_step(mp, &buffer, &len);
+		state = camel_mime_parser_step (mp, &buffer, &len);
 		if (state != CAMEL_MIME_PARSER_STATE_MESSAGE_END) {
 			g_error("Bad parser state: Expecing MESSAGE_END or MESSAGE_EOF, got: %d", state);
-			camel_mime_parser_unstep(mp);
+			camel_mime_parser_unstep (mp);
 		}
 		break;
 	}
@@ -3951,11 +3951,11 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
 /* build the content-info, from a message */
 /* this needs the filter lock since it uses filters to perform indexing */
 static CamelMessageContentInfo *
-summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object)
+summary_build_content_info_message (CamelFolderSummary *s, CamelMessageInfo *msginfo, CamelMimePart *object)
 {
 	CamelDataWrapper *containee;
 	gint parts, i;
-	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s);
+	struct _CamelFolderSummaryPrivate *p = CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s);
 	CamelMessageContentInfo *info = NULL, *child;
 	CamelContentType *ct;
 	const struct _camel_header_raw *header;
@@ -3963,7 +3963,7 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
 	if (s->build_content)
 		info = CAMEL_FOLDER_SUMMARY_GET_CLASS (s)->content_info_new_from_message (s, object);
 
-	containee = camel_medium_get_content (CAMEL_MEDIUM(object));
+	containee = camel_medium_get_content (CAMEL_MEDIUM (object));
 
 	if (containee == NULL)
 		return info;
@@ -3975,17 +3975,17 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
 	ct = ((CamelDataWrapper *)containee)->mime_type;
 	if (camel_content_type_is(ct, "multipart", "*")) {
 		if (camel_content_type_is(ct, "multipart", "mixed"))
-			camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
+			camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_ATTACHMENTS, CAMEL_MESSAGE_ATTACHMENTS);
 		if (camel_content_type_is(ct, "multipart", "signed")
 		    || camel_content_type_is(ct, "multipart", "encrypted"))
-			camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
+			camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
 	} else if (camel_content_type_is(ct, "application", "pgp-signature")
 #ifdef ENABLE_SMIME
 		    || camel_content_type_is(ct, "application", "x-pkcs7-signature")
 		    || camel_content_type_is(ct, "application", "pkcs7-signature")
 #endif
 		) {
-		camel_message_info_set_flags(msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
+		camel_message_info_set_flags (msginfo, CAMEL_MESSAGE_SECURE, CAMEL_MESSAGE_SECURE);
 	}
 
 	for (header = object->headers; header; header = header->next) {
@@ -4005,24 +4005,24 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
 		camel_message_info_set_user_flag (msginfo, "$has_cal", TRUE);
 
 	/* using the object types is more accurate than using the mime/types */
-	if (CAMEL_IS_MULTIPART(containee)) {
-		parts = camel_multipart_get_number(CAMEL_MULTIPART(containee));
+	if (CAMEL_IS_MULTIPART (containee)) {
+		parts = camel_multipart_get_number (CAMEL_MULTIPART (containee));
 
 		for (i=0;i<parts;i++) {
-			CamelMimePart *part = camel_multipart_get_part(CAMEL_MULTIPART(containee), i);
-			g_assert(part);
-			child = summary_build_content_info_message(s, msginfo, part);
+			CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
+			g_assert (part);
+			child = summary_build_content_info_message (s, msginfo, part);
 			if (child) {
 				child->parent = info;
-				my_list_append((struct _node **)&info->childs, (struct _node *)child);
+				my_list_append ((struct _node **)&info->childs, (struct _node *)child);
 			}
 		}
-	} else if (CAMEL_IS_MIME_MESSAGE(containee)) {
+	} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
 		/* for messages we only look at its contents */
-		child = summary_build_content_info_message(s, msginfo, (CamelMimePart *)containee);
+		child = summary_build_content_info_message (s, msginfo, (CamelMimePart *)containee);
 		if (child) {
 			child->parent = info;
-			my_list_append((struct _node **)&info->childs, (struct _node *)child);
+			my_list_append ((struct _node **)&info->childs, (struct _node *)child);
 		}
 	} else if (p->filter_stream
 		   && camel_content_type_is(ct, "text", "*")) {
@@ -4031,9 +4031,9 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
 		/* pre-attach html filter if required, otherwise just index filter */
 		if (camel_content_type_is(ct, "text", "html")) {
 			if (p->filter_html == NULL)
-				p->filter_html = camel_mime_filter_html_new();
+				p->filter_html = camel_mime_filter_html_new ();
 			else
-				camel_mime_filter_reset((CamelMimeFilter *)p->filter_html);
+				camel_mime_filter_reset ((CamelMimeFilter *)p->filter_html);
 			html_id = camel_stream_filter_add (
 				CAMEL_STREAM_FILTER (p->filter_stream),
 				(CamelMimeFilter *)p->filter_html);
@@ -4065,12 +4065,12 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
  * Returns: the state of the flag (%TRUE or %FALSE)
  **/
 gboolean
-camel_flag_get(CamelFlag **list, const gchar *name)
+camel_flag_get (CamelFlag **list, const gchar *name)
 {
 	CamelFlag *flag;
 	flag = *list;
 	while (flag) {
-		if (!strcmp(flag->name, name))
+		if (!strcmp (flag->name, name))
 			return TRUE;
 		flag = flag->next;
 	}
@@ -4089,7 +4089,7 @@ camel_flag_get(CamelFlag **list, const gchar *name)
  * otherwise
  **/
 gboolean
-camel_flag_set(CamelFlag **list, const gchar *name, gboolean value)
+camel_flag_set (CamelFlag **list, const gchar *name, gboolean value)
 {
 	CamelFlag *flag, *tmp;
 
@@ -4100,10 +4100,10 @@ camel_flag_set(CamelFlag **list, const gchar *name, gboolean value)
 	flag = (CamelFlag *)list;
 	while (flag->next) {
 		tmp = flag->next;
-		if (!strcmp(flag->next->name, name)) {
+		if (!strcmp (flag->next->name, name)) {
 			if (!value) {
 				flag->next = tmp->next;
-				g_free(tmp);
+				g_free (tmp);
 			}
 			return !value;
 		}
@@ -4111,8 +4111,8 @@ camel_flag_set(CamelFlag **list, const gchar *name, gboolean value)
 	}
 
 	if (value) {
-		tmp = g_malloc(sizeof(*tmp) + strlen(name));
-		strcpy(tmp->name, name);
+		tmp = g_malloc (sizeof (*tmp) + strlen (name));
+		strcpy (tmp->name, name);
 		tmp->next = NULL;
 		flag->next = tmp;
 	}
@@ -4128,7 +4128,7 @@ camel_flag_set(CamelFlag **list, const gchar *name, gboolean value)
  * Returns: the number of flags in the list
  **/
 gint
-camel_flag_list_size(CamelFlag **list)
+camel_flag_list_size (CamelFlag **list)
 {
 	gint count=0;
 	CamelFlag *flag;
@@ -4148,13 +4148,13 @@ camel_flag_list_size(CamelFlag **list)
  * Free the memory associated with the flag list @list.
  **/
 void
-camel_flag_list_free(CamelFlag **list)
+camel_flag_list_free (CamelFlag **list)
 {
 	CamelFlag *flag, *tmp;
 	flag = *list;
 	while (flag) {
 		tmp = flag->next;
-		g_free(flag);
+		g_free (flag);
 		flag = tmp;
 	}
 	*list = NULL;
@@ -4170,7 +4170,7 @@ camel_flag_list_free(CamelFlag **list)
  * Returns: %TRUE if @to is changed or %FALSE otherwise
  **/
 gboolean
-camel_flag_list_copy(CamelFlag **to, CamelFlag **from)
+camel_flag_list_copy (CamelFlag **to, CamelFlag **from)
 {
 	CamelFlag *flag, *tmp;
 	gint changed = FALSE;
@@ -4182,9 +4182,9 @@ camel_flag_list_copy(CamelFlag **to, CamelFlag **from)
 	flag = (CamelFlag *)to;
 	while (flag->next) {
 		tmp = flag->next;
-		if (!camel_flag_get(from, tmp->name)) {
+		if (!camel_flag_get (from, tmp->name)) {
 			flag->next = tmp->next;
-			g_free(tmp);
+			g_free (tmp);
 			changed = TRUE;
 		} else {
 			flag = tmp;
@@ -4194,7 +4194,7 @@ camel_flag_list_copy(CamelFlag **to, CamelFlag **from)
 	/* Add any new flags */
 	flag = *from;
 	while (flag) {
-		changed |= camel_flag_set(to, flag->name, TRUE);
+		changed |= camel_flag_set (to, flag->name, TRUE);
 		flag = flag->next;
 	}
 
@@ -4211,13 +4211,13 @@ camel_flag_list_copy(CamelFlag **to, CamelFlag **from)
  * Returns: the value of the flag  or %NULL if unset
  **/
 const gchar *
-camel_tag_get(CamelTag **list, const gchar *name)
+camel_tag_get (CamelTag **list, const gchar *name)
 {
 	CamelTag *tag;
 
 	tag = *list;
 	while (tag) {
-		if (!strcmp(tag->name, name))
+		if (!strcmp (tag->name, name))
 			return (const gchar *)tag->value;
 		tag = tag->next;
 	}
@@ -4235,7 +4235,7 @@ camel_tag_get(CamelTag **list, const gchar *name)
  * Returns: %TRUE if the value on the tag changed or %FALSE otherwise
  **/
 gboolean
-camel_tag_set(CamelTag **list, const gchar *name, const gchar *value)
+camel_tag_set (CamelTag **list, const gchar *name, const gchar *value)
 {
 	CamelTag *tag, *tmp;
 
@@ -4243,15 +4243,15 @@ camel_tag_set(CamelTag **list, const gchar *name, const gchar *value)
 	tag = (CamelTag *)list;
 	while (tag->next) {
 		tmp = tag->next;
-		if (!strcmp(tmp->name, name)) {
+		if (!strcmp (tmp->name, name)) {
 			if (value == NULL) { /* clear it? */
 				tag->next = tmp->next;
-				g_free(tmp->value);
-				g_free(tmp);
+				g_free (tmp->value);
+				g_free (tmp);
 				return TRUE;
-			} else if (strcmp(tmp->value, value)) { /* has it changed? */
-				g_free(tmp->value);
-				tmp->value = g_strdup(value);
+			} else if (strcmp (tmp->value, value)) { /* has it changed? */
+				g_free (tmp->value);
+				tmp->value = g_strdup (value);
 				return TRUE;
 			}
 			return FALSE;
@@ -4260,9 +4260,9 @@ camel_tag_set(CamelTag **list, const gchar *name, const gchar *value)
 	}
 
 	if (value) {
-		tmp = g_malloc(sizeof(*tmp)+strlen(name));
-		strcpy(tmp->name, name);
-		tmp->value = g_strdup(value);
+		tmp = g_malloc (sizeof (*tmp)+strlen (name));
+		strcpy (tmp->name, name);
+		tmp->value = g_strdup (value);
 		tmp->next = NULL;
 		tag->next = tmp;
 		return TRUE;
@@ -4279,7 +4279,7 @@ camel_tag_set(CamelTag **list, const gchar *name, const gchar *value)
  * Returns: the number of tags
  **/
 gint
-camel_tag_list_size(CamelTag **list)
+camel_tag_list_size (CamelTag **list)
 {
 	gint count=0;
 	CamelTag *tag;
@@ -4293,9 +4293,9 @@ camel_tag_list_size(CamelTag **list)
 }
 
 static void
-rem_tag(gchar *key, gchar *value, CamelTag **to)
+rem_tag (gchar *key, gchar *value, CamelTag **to)
 {
-	camel_tag_set(to, key, NULL);
+	camel_tag_set (to, key, NULL);
 }
 
 /**
@@ -4308,7 +4308,7 @@ rem_tag(gchar *key, gchar *value, CamelTag **to)
  * Returns: %TRUE if @to is changed or %FALSE otherwise
  **/
 gboolean
-camel_tag_list_copy(CamelTag **to, CamelTag **from)
+camel_tag_list_copy (CamelTag **to, CamelTag **from)
 {
 	gint changed = FALSE;
 	CamelTag *tag;
@@ -4317,25 +4317,25 @@ camel_tag_list_copy(CamelTag **to, CamelTag **from)
 	if (*to == NULL && from == NULL)
 		return FALSE;
 
-	left = g_hash_table_new(g_str_hash, g_str_equal);
+	left = g_hash_table_new (g_str_hash, g_str_equal);
 	tag = *to;
 	while (tag) {
-		g_hash_table_insert(left, tag->name, tag);
+		g_hash_table_insert (left, tag->name, tag);
 		tag = tag->next;
 	}
 
 	tag = *from;
 	while (tag) {
-		changed |= camel_tag_set(to, tag->name, tag->value);
-		g_hash_table_remove(left, tag->name);
+		changed |= camel_tag_set (to, tag->name, tag->value);
+		g_hash_table_remove (left, tag->name);
 		tag = tag->next;
 	}
 
-	if (g_hash_table_size(left)>0) {
-		g_hash_table_foreach(left, (GHFunc)rem_tag, to);
+	if (g_hash_table_size (left)>0) {
+		g_hash_table_foreach (left, (GHFunc)rem_tag, to);
 		changed = TRUE;
 	}
-	g_hash_table_destroy(left);
+	g_hash_table_destroy (left);
 
 	return changed;
 }
@@ -4347,14 +4347,14 @@ camel_tag_list_copy(CamelTag **to, CamelTag **from)
  * Free the tag list @list.
  **/
 void
-camel_tag_list_free(CamelTag **list)
+camel_tag_list_free (CamelTag **list)
 {
 	CamelTag *tag, *tmp;
 	tag = *list;
 	while (tag) {
 		tmp = tag->next;
-		g_free(tag->value);
-		g_free(tag);
+		g_free (tag->value);
+		g_free (tag);
 		tag = tmp;
 	}
 	*list = NULL;
@@ -4433,7 +4433,7 @@ camel_message_info_new (CamelFolderSummary *s)
 		info = g_slice_alloc0 (class->message_info_size);
 		camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_ALLOC_LOCK);
 	} else {
-		info = g_slice_alloc0 (sizeof(CamelMessageInfoBase));
+		info = g_slice_alloc0 (sizeof (CamelMessageInfoBase));
 	}
 
 	info->refcount = 1;
@@ -4452,20 +4452,20 @@ camel_message_info_new (CamelFolderSummary *s)
  * Reference an info.
  **/
 void
-camel_message_info_ref(gpointer o)
+camel_message_info_ref (gpointer o)
 {
 	CamelMessageInfo *mi = o;
 
 	if (mi->summary) {
 		camel_folder_summary_lock (mi->summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
-		g_assert(mi->refcount >= 1);
+		g_assert (mi->refcount >= 1);
 		mi->refcount++;
 		camel_folder_summary_unlock (mi->summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
 	} else {
-		GLOBAL_INFO_LOCK(info);
-		g_assert(mi->refcount >= 1);
+		GLOBAL_INFO_LOCK (info);
+		g_assert (mi->refcount >= 1);
 		mi->refcount++;
-		GLOBAL_INFO_UNLOCK(info);
+		GLOBAL_INFO_UNLOCK (info);
 	}
 }
 
@@ -4497,11 +4497,11 @@ camel_message_info_new_from_header (CamelFolderSummary *summary,
  * Unref's and potentially frees a #CamelMessageInfo and its contents.
  **/
 void
-camel_message_info_free(gpointer o)
+camel_message_info_free (gpointer o)
 {
 	CamelMessageInfo *mi = o;
 
-	g_return_if_fail(mi != NULL);
+	g_return_if_fail (mi != NULL);
 
 	if (mi->summary) {
 		camel_folder_summary_lock (mi->summary, CAMEL_FOLDER_SUMMARY_REF_LOCK);
@@ -4518,20 +4518,20 @@ camel_message_info_free(gpointer o)
 		/* FIXME: this is kinda busted, should really be handled by message info free */
 		if (mi->summary->build_content
 		    && ((CamelMessageInfoBase *)mi)->content) {
-			camel_folder_summary_content_info_free(mi->summary, ((CamelMessageInfoBase *)mi)->content);
+			camel_folder_summary_content_info_free (mi->summary, ((CamelMessageInfoBase *)mi)->content);
 		}
 
 		CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->message_info_free (mi->summary, mi);
 	} else {
-		GLOBAL_INFO_LOCK(info);
+		GLOBAL_INFO_LOCK (info);
 		mi->refcount--;
 		if (mi->refcount > 0) {
-			GLOBAL_INFO_UNLOCK(info);
+			GLOBAL_INFO_UNLOCK (info);
 			return;
 		}
-		GLOBAL_INFO_UNLOCK(info);
+		GLOBAL_INFO_UNLOCK (info);
 
-		message_info_free(NULL, mi);
+		message_info_free (NULL, mi);
 	}
 }
 
@@ -4544,14 +4544,14 @@ camel_message_info_free(gpointer o)
  * Returns: the duplicated #CamelMessageInfo
  **/
 gpointer
-camel_message_info_clone(gconstpointer o)
+camel_message_info_clone (gconstpointer o)
 {
 	const CamelMessageInfo *mi = o;
 
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->message_info_clone (mi->summary, mi);
 	else
-		return message_info_clone(NULL, mi);
+		return message_info_clone (NULL, mi);
 }
 
 /**
@@ -4564,12 +4564,12 @@ camel_message_info_clone(gconstpointer o)
  * Returns: the pointer data
  **/
 gconstpointer
-camel_message_info_ptr(const CamelMessageInfo *mi, gint id)
+camel_message_info_ptr (const CamelMessageInfo *mi, gint id)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_ptr (mi, id);
 	else
-		return info_ptr(mi, id);
+		return info_ptr (mi, id);
 }
 
 /**
@@ -4582,12 +4582,12 @@ camel_message_info_ptr(const CamelMessageInfo *mi, gint id)
  * Returns: the gint data
  **/
 guint32
-camel_message_info_uint32(const CamelMessageInfo *mi, gint id)
+camel_message_info_uint32 (const CamelMessageInfo *mi, gint id)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_uint32 (mi, id);
 	else
-		return info_uint32(mi, id);
+		return info_uint32 (mi, id);
 }
 
 /**
@@ -4600,12 +4600,12 @@ camel_message_info_uint32(const CamelMessageInfo *mi, gint id)
  * Returns: the time_t data
  **/
 time_t
-camel_message_info_time(const CamelMessageInfo *mi, gint id)
+camel_message_info_time (const CamelMessageInfo *mi, gint id)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_time (mi, id);
 	else
-		return info_time(mi, id);
+		return info_time (mi, id);
 }
 
 /**
@@ -4618,12 +4618,12 @@ camel_message_info_time(const CamelMessageInfo *mi, gint id)
  * Returns: the state of the user flag
  **/
 gboolean
-camel_message_info_user_flag(const CamelMessageInfo *mi, const gchar *id)
+camel_message_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_user_flag (mi, id);
 	else
-		return info_user_flag(mi, id);
+		return info_user_flag (mi, id);
 }
 
 /**
@@ -4636,12 +4636,12 @@ camel_message_info_user_flag(const CamelMessageInfo *mi, const gchar *id)
  * Returns: the value of the user tag
  **/
 const gchar *
-camel_message_info_user_tag(const CamelMessageInfo *mi, const gchar *id)
+camel_message_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_user_tag (mi, id);
 	else
-		return info_user_tag(mi, id);
+		return info_user_tag (mi, id);
 }
 
 /**
@@ -4652,7 +4652,7 @@ camel_message_info_user_tag(const CamelMessageInfo *mi, const gchar *id)
 void
 camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const gchar *uid, guint32 flag)
 {
-	g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE(s)->flag_cache, (gchar *) uid, GUINT_TO_POINTER(flag));
+	g_hash_table_replace (CAMEL_FOLDER_SUMMARY_GET_PRIVATE (s)->flag_cache, (gchar *) uid, GUINT_TO_POINTER (flag));
 }
 
 /**
@@ -4666,12 +4666,12 @@ camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const gchar *uid,
  * Returns: %TRUE if any of the flags changed or %FALSE otherwise
  **/
 gboolean
-camel_message_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
+camel_message_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_flags (mi, flags, set);
 	else
-		return info_set_flags(mi, flags, set);
+		return info_set_flags (mi, flags, set);
 }
 
 /**
@@ -4685,12 +4685,12 @@ camel_message_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
  * Returns: %TRUE if the state changed or %FALSE otherwise
  **/
 gboolean
-camel_message_info_set_user_flag(CamelMessageInfo *mi, const gchar *id, gboolean state)
+camel_message_info_set_user_flag (CamelMessageInfo *mi, const gchar *id, gboolean state)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_user_flag (mi, id, state);
 	else
-		return info_set_user_flag(mi, id, state);
+		return info_set_user_flag (mi, id, state);
 }
 
 /**
@@ -4704,12 +4704,12 @@ camel_message_info_set_user_flag(CamelMessageInfo *mi, const gchar *id, gboolean
  * Returns: %TRUE if the value changed or %FALSE otherwise
  **/
 gboolean
-camel_message_info_set_user_tag(CamelMessageInfo *mi, const gchar *id, const gchar *val)
+camel_message_info_set_user_tag (CamelMessageInfo *mi, const gchar *id, const gchar *val)
 {
 	if (mi->summary)
 		return CAMEL_FOLDER_SUMMARY_GET_CLASS (mi->summary)->info_set_user_tag (mi, id, val);
 	else
-		return info_set_user_tag(mi, id, val);
+		return info_set_user_tag (mi, id, val);
 }
 
 void
@@ -4756,7 +4756,7 @@ camel_message_info_dump (CamelMessageInfo *mi)
 	printf("From: %s\n", camel_message_info_from(mi));
 	printf("UID: %s\n", camel_message_info_uid(mi));
 	printf("Flags: %04x\n", camel_message_info_flags(mi));
-	camel_content_info_dump(((CamelMessageInfoBase *) mi)->content, 0);
+	camel_content_info_dump (((CamelMessageInfoBase *) mi)->content, 0);
 }
 
 /**
@@ -4767,7 +4767,7 @@ camel_message_info_dump (CamelMessageInfo *mi)
 void
 camel_folder_summary_set_need_preview (CamelFolderSummary *summary, gboolean preview)
 {
-	CAMEL_FOLDER_SUMMARY_GET_PRIVATE(summary)->need_preview = preview;
+	CAMEL_FOLDER_SUMMARY_GET_PRIVATE (summary)->need_preview = preview;
 }
 
 /**
@@ -4778,7 +4778,7 @@ camel_folder_summary_set_need_preview (CamelFolderSummary *summary, gboolean pre
 gboolean
 camel_folder_summary_get_need_preview (CamelFolderSummary *summary)
 {
-	return CAMEL_FOLDER_SUMMARY_GET_PRIVATE(summary)->need_preview;
+	return CAMEL_FOLDER_SUMMARY_GET_PRIVATE (summary)->need_preview;
 }
 
 static gboolean
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 8995cd7..5dcd835 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -338,10 +338,10 @@ GType			 camel_folder_summary_get_type	(void);
 CamelFolderSummary      *camel_folder_summary_new	(struct _CamelFolder *folder);
 
 /* Deprecated */
-void camel_folder_summary_set_filename(CamelFolderSummary *summary, const gchar *filename);
+void camel_folder_summary_set_filename (CamelFolderSummary *summary, const gchar *filename);
 
-void camel_folder_summary_set_index(CamelFolderSummary *summary, CamelIndex *index);
-void camel_folder_summary_set_build_content(CamelFolderSummary *summary, gboolean state);
+void camel_folder_summary_set_index (CamelFolderSummary *summary, CamelIndex *index);
+void camel_folder_summary_set_build_content (CamelFolderSummary *summary, gboolean state);
 
 guint32  camel_folder_summary_next_uid        (CamelFolderSummary *summary);
 gchar    *camel_folder_summary_next_uid_string (CamelFolderSummary *summary);
@@ -352,12 +352,12 @@ gint camel_folder_summary_save_to_db (CamelFolderSummary *s, GError **error);
 gint camel_folder_summary_load_from_db (CamelFolderSummary *s, GError **error);
 
 /* only load the header */
-gint camel_folder_summary_header_load(CamelFolderSummary *summary);
+gint camel_folder_summary_header_load (CamelFolderSummary *summary);
 gint camel_folder_summary_header_load_from_db (CamelFolderSummary *s, struct _CamelStore *store, const gchar *folder_name, GError **error);
 gint camel_folder_summary_header_save_to_db (CamelFolderSummary *s, GError **error);
 
 /* set the dirty bit on the summary */
-void camel_folder_summary_touch(CamelFolderSummary *summary);
+void camel_folder_summary_touch (CamelFolderSummary *summary);
 
 /* add a new raw summary item */
 void camel_folder_summary_add (CamelFolderSummary *summary, CamelMessageInfo *info);
@@ -376,74 +376,74 @@ void camel_folder_summary_remove_index_fast (CamelFolderSummary *s, gint index);
 void camel_folder_summary_remove_uid_fast (CamelFolderSummary *s, const gchar *uid);
 
 /* build/add raw summary items */
-CamelMessageInfo *camel_folder_summary_add_from_header(CamelFolderSummary *summary, struct _camel_header_raw *headers);
-CamelMessageInfo *camel_folder_summary_add_from_parser(CamelFolderSummary *summary, CamelMimeParser *parser);
-CamelMessageInfo *camel_folder_summary_add_from_message(CamelFolderSummary *summary, CamelMimeMessage *message);
+CamelMessageInfo *camel_folder_summary_add_from_header (CamelFolderSummary *summary, struct _camel_header_raw *headers);
+CamelMessageInfo *camel_folder_summary_add_from_parser (CamelFolderSummary *summary, CamelMimeParser *parser);
+CamelMessageInfo *camel_folder_summary_add_from_message (CamelFolderSummary *summary, CamelMimeMessage *message);
 
 /* Just build raw summary items */
-CamelMessageInfo *camel_folder_summary_info_new_from_header(CamelFolderSummary *summary, struct _camel_header_raw *headers);
-CamelMessageInfo *camel_folder_summary_info_new_from_parser(CamelFolderSummary *summary, CamelMimeParser *parser);
-CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary *summary, CamelMimeMessage *message, const gchar *bodystructure);
+CamelMessageInfo *camel_folder_summary_info_new_from_header (CamelFolderSummary *summary, struct _camel_header_raw *headers);
+CamelMessageInfo *camel_folder_summary_info_new_from_parser (CamelFolderSummary *summary, CamelMimeParser *parser);
+CamelMessageInfo *camel_folder_summary_info_new_from_message (CamelFolderSummary *summary, CamelMimeMessage *message, const gchar *bodystructure);
 
-CamelMessageContentInfo *camel_folder_summary_content_info_new(CamelFolderSummary *summary);
-void camel_folder_summary_content_info_free(CamelFolderSummary *summary, CamelMessageContentInfo *ci);
+CamelMessageContentInfo *camel_folder_summary_content_info_new (CamelFolderSummary *summary);
+void camel_folder_summary_content_info_free (CamelFolderSummary *summary, CamelMessageContentInfo *ci);
 
 /* removes a summary item, doesn't fix content offsets */
-void camel_folder_summary_remove(CamelFolderSummary *summary, CamelMessageInfo *info);
-void camel_folder_summary_remove_uid(CamelFolderSummary *summary, const gchar *uid);
-void camel_folder_summary_remove_index(CamelFolderSummary *summary, gint index);
-void camel_folder_summary_remove_range(CamelFolderSummary *summary, gint start, gint end);
+void camel_folder_summary_remove (CamelFolderSummary *summary, CamelMessageInfo *info);
+void camel_folder_summary_remove_uid (CamelFolderSummary *summary, const gchar *uid);
+void camel_folder_summary_remove_index (CamelFolderSummary *summary, gint index);
+void camel_folder_summary_remove_range (CamelFolderSummary *summary, gint start, gint end);
 
 /* remove all items */
-void camel_folder_summary_clear(CamelFolderSummary *summary);
+void camel_folder_summary_clear (CamelFolderSummary *summary);
 void camel_folder_summary_clear_db (CamelFolderSummary *s);
 
 /* lookup functions */
-guint camel_folder_summary_count(CamelFolderSummary *summary);
-CamelMessageInfo *camel_folder_summary_index(CamelFolderSummary *summary, gint index);
-CamelMessageInfo *camel_folder_summary_uid(CamelFolderSummary *summary, const gchar *uid);
+guint camel_folder_summary_count (CamelFolderSummary *summary);
+CamelMessageInfo *camel_folder_summary_index (CamelFolderSummary *summary, gint index);
+CamelMessageInfo *camel_folder_summary_uid (CamelFolderSummary *summary, const gchar *uid);
 gchar * camel_folder_summary_uid_from_index (CamelFolderSummary *s, gint i);
 gboolean camel_folder_summary_check_uid (CamelFolderSummary *s, const gchar *uid);
 
-GPtrArray *camel_folder_summary_array(CamelFolderSummary *summary);
-GHashTable *camel_folder_summary_get_hashtable(CamelFolderSummary *s);
+GPtrArray *camel_folder_summary_array (CamelFolderSummary *summary);
+GHashTable *camel_folder_summary_get_hashtable (CamelFolderSummary *s);
 void camel_folder_summary_free_hashtable (GHashTable *ht);
 GHashTable *camel_folder_summary_get_flag_cache (CamelFolderSummary *summary);
 void camel_folder_summary_update_flag_cache (CamelFolderSummary *s, const gchar *uid, guint32 flag);
 
 /* basically like strings, but certain keywords can be compressed and de-cased */
-gint camel_folder_summary_encode_token(FILE *out, const gchar *str);
-gint camel_folder_summary_decode_token(FILE *in, gchar **str);
+gint camel_folder_summary_encode_token (FILE *out, const gchar *str);
+gint camel_folder_summary_decode_token (FILE *in, gchar **str);
 
 /* message flag operations */
-gboolean	camel_flag_get(CamelFlag **list, const gchar *name);
-gboolean	camel_flag_set(CamelFlag **list, const gchar *name, gboolean value);
-gboolean	camel_flag_list_copy(CamelFlag **to, CamelFlag **from);
-gint		camel_flag_list_size(CamelFlag **list);
-void		camel_flag_list_free(CamelFlag **list);
+gboolean	camel_flag_get (CamelFlag **list, const gchar *name);
+gboolean	camel_flag_set (CamelFlag **list, const gchar *name, gboolean value);
+gboolean	camel_flag_list_copy (CamelFlag **to, CamelFlag **from);
+gint		camel_flag_list_size (CamelFlag **list);
+void		camel_flag_list_free (CamelFlag **list);
 
 guint32         camel_system_flag (const gchar *name);
 gboolean        camel_system_flag_get (guint32 flags, const gchar *name);
 
 /* message tag operations */
-const gchar	*camel_tag_get(CamelTag **list, const gchar *name);
-gboolean	camel_tag_set(CamelTag **list, const gchar *name, const gchar *value);
-gboolean	camel_tag_list_copy(CamelTag **to, CamelTag **from);
-gint		camel_tag_list_size(CamelTag **list);
-void		camel_tag_list_free(CamelTag **list);
+const gchar	*camel_tag_get (CamelTag **list, const gchar *name);
+gboolean	camel_tag_set (CamelTag **list, const gchar *name, const gchar *value);
+gboolean	camel_tag_list_copy (CamelTag **to, CamelTag **from);
+gint		camel_tag_list_size (CamelTag **list);
+void		camel_tag_list_free (CamelTag **list);
 
 /* Summary may be null */
 /* Use anonymous pointers to avoid tons of cast crap */
-gpointer camel_message_info_new(CamelFolderSummary *summary);
-void camel_message_info_ref(gpointer info);
-CamelMessageInfo *camel_message_info_new_from_header(CamelFolderSummary *summary, struct _camel_header_raw *header);
-void camel_message_info_free(gpointer info);
-gpointer camel_message_info_clone(gconstpointer info);
+gpointer camel_message_info_new (CamelFolderSummary *summary);
+void camel_message_info_ref (gpointer info);
+CamelMessageInfo *camel_message_info_new_from_header (CamelFolderSummary *summary, struct _camel_header_raw *header);
+void camel_message_info_free (gpointer info);
+gpointer camel_message_info_clone (gconstpointer info);
 
 /* accessors */
-gconstpointer camel_message_info_ptr(const CamelMessageInfo *mi, gint id);
-guint32 camel_message_info_uint32(const CamelMessageInfo *mi, gint id);
-time_t camel_message_info_time(const CamelMessageInfo *mi, gint id);
+gconstpointer camel_message_info_ptr (const CamelMessageInfo *mi, gint id);
+guint32 camel_message_info_uint32 (const CamelMessageInfo *mi, gint id);
+time_t camel_message_info_time (const CamelMessageInfo *mi, gint id);
 
 #define camel_message_info_uid(mi) ((const gchar *)((const CamelMessageInfo *)mi)->uid)
 
@@ -495,12 +495,12 @@ time_t camel_message_info_time(const CamelMessageInfo *mi, gint id);
  **/
 #define camel_message_info_content(mi) ((const CamelMessageContentInfo *)camel_message_info_ptr((const CamelMessageInfo *)mi, CAMEL_MESSAGE_INFO_CONTENT))
 
-gboolean camel_message_info_user_flag(const CamelMessageInfo *mi, const gchar *id);
-const gchar *camel_message_info_user_tag(const CamelMessageInfo *mi, const gchar *id);
+gboolean camel_message_info_user_flag (const CamelMessageInfo *mi, const gchar *id);
+const gchar *camel_message_info_user_tag (const CamelMessageInfo *mi, const gchar *id);
 
-gboolean camel_message_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set);
-gboolean camel_message_info_set_user_flag(CamelMessageInfo *mi, const gchar *id, gboolean state);
-gboolean camel_message_info_set_user_tag(CamelMessageInfo *mi, const gchar *id, const gchar *val);
+gboolean camel_message_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set);
+gboolean camel_message_info_set_user_flag (CamelMessageInfo *mi, const gchar *id, gboolean state);
+gboolean camel_message_info_set_user_tag (CamelMessageInfo *mi, const gchar *id, const gchar *val);
 
 void camel_folder_summary_set_need_preview (CamelFolderSummary *summary, gboolean preview);
 void camel_folder_summary_add_preview (CamelFolderSummary *s, CamelMessageInfo *info);
@@ -514,7 +514,7 @@ void camel_content_info_dump (CamelMessageContentInfo *ci, gint depth);
 void camel_message_info_dump (CamelMessageInfo *mi);
 
 /* Migration code */
-gint camel_folder_summary_migrate_infos(CamelFolderSummary *s);
+gint camel_folder_summary_migrate_infos (CamelFolderSummary *s);
 
 void camel_folder_summary_lock   (CamelFolderSummary *summary, CamelFolderSummaryLock lock);
 void camel_folder_summary_unlock (CamelFolderSummary *summary, CamelFolderSummaryLock lock);
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index 9b6dd80..6674411 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -48,7 +48,7 @@
 #endif
 
 static void
-container_add_child(CamelFolderThreadNode *node, CamelFolderThreadNode *child)
+container_add_child (CamelFolderThreadNode *node, CamelFolderThreadNode *child)
 {
 	d(printf("\nAdding child %p to parent %p \n", child, node));
 	child->next = node->child;
@@ -57,7 +57,7 @@ container_add_child(CamelFolderThreadNode *node, CamelFolderThreadNode *child)
 }
 
 static void
-container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *child)
+container_parent_child (CamelFolderThreadNode *parent, CamelFolderThreadNode *child)
 {
 	CamelFolderThreadNode *c, *node;
 
@@ -75,7 +75,7 @@ container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *chi
 
 	/* are we unparented? */
 	if (child->parent == NULL) {
-		container_add_child(parent, child);
+		container_add_child (parent, child);
 		return;
 	}
 
@@ -89,7 +89,7 @@ container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *chi
 			d(printf("found node %p\n", child));
 			c->next = c->next->next;
 			child->parent = NULL;
-			container_add_child(parent, child);
+			container_add_child (parent, child);
 			return;
 		}
 		c = c->next;
@@ -99,7 +99,7 @@ container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *chi
 }
 
 static void
-prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
+prune_empty (CamelFolderThread *thread, CamelFolderThreadNode **cp)
 {
 	CamelFolderThreadNode *child, *next, *c, *lastc;
 
@@ -107,7 +107,7 @@ prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 	lastc = (CamelFolderThreadNode *)cp;
 	while (lastc->next) {
 		c = lastc->next;
-		prune_empty(thread, &c->child);
+		prune_empty (thread, &c->child);
 
 		d(printf("checking message %p %p (%08x%08x)\n", c,
 			 c->message, c->message?c->message->message_id.id.part.hi:0,
@@ -116,8 +116,8 @@ prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 			if (c->child == NULL) {
 				d(printf("removing empty node\n"));
 				lastc->next = c->next;
-				m(memset(c, 0xfe, sizeof(*c)));
-				e_memchunk_free(thread->node_chunks, c);
+				m (memset (c, 0xfe, sizeof (*c)));
+				e_memchunk_free (thread->node_chunks, c);
 				continue;
 			}
 			if (c->parent || c->child->next == NULL) {
@@ -141,7 +141,7 @@ prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 }
 
 static void
-hashloop(gpointer key, gpointer value, gpointer data)
+hashloop (gpointer key, gpointer value, gpointer data)
 {
 	CamelFolderThreadNode *c = value;
 	CamelFolderThreadNode *tail = data;
@@ -153,7 +153,7 @@ hashloop(gpointer key, gpointer value, gpointer data)
 }
 
 static gchar *
-get_root_subject(CamelFolderThreadNode *c)
+get_root_subject (CamelFolderThreadNode *c)
 {
 	gchar *s, *p;
 	CamelFolderThreadNode *scan;
@@ -161,13 +161,13 @@ get_root_subject(CamelFolderThreadNode *c)
 	s = NULL;
 	c->re = FALSE;
 	if (c->message)
-		s = (gchar *)camel_message_info_subject(c->message);
+		s = (gchar *)camel_message_info_subject (c->message);
 	else {
 		/* one of the children will always have a message */
 		scan = c->child;
 		while (scan) {
 			if (scan->message) {
-				s = (gchar *)camel_message_info_subject(scan->message);
+				s = (gchar *)camel_message_info_subject (scan->message);
 				break;
 			}
 			scan = scan->next;
@@ -175,14 +175,14 @@ get_root_subject(CamelFolderThreadNode *c)
 	}
 	if (s != NULL) {
 		while (*s) {
-			while (isspace(*s))
+			while (isspace (*s))
 				s++;
 			if (s[0] == 0)
 				break;
 			if ((s[0] == 'r' || s[0]=='R')
 			    && (s[1] == 'e' || s[1]=='E')) {
 				p = s+2;
-				while (isdigit(*p) || (ispunct(*p) && (*p != ':')))
+				while (isdigit (*p) || (ispunct (*p) && (*p != ':')))
 					p++;
 				if (*p==':') {
 					c->re = TRUE;
@@ -201,7 +201,7 @@ get_root_subject(CamelFolderThreadNode *c)
 /* this can be pretty slow, but not used often */
 /* clast cannot be null */
 static void
-remove_node(CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFolderThreadNode **clast)
+remove_node (CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFolderThreadNode **clast)
 {
 	CamelFolderThreadNode *c;
 
@@ -227,9 +227,9 @@ remove_node(CamelFolderThreadNode **list, CamelFolderThreadNode *node, CamelFold
 }
 
 static void
-group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
+group_root_set (CamelFolderThread *thread, CamelFolderThreadNode **cp)
 {
-	GHashTable *subject_table = g_hash_table_new(g_str_hash, g_str_equal);
+	GHashTable *subject_table = g_hash_table_new (g_str_hash, g_str_equal);
 	CamelFolderThreadNode *c, *clast, *scan, *container;
 
 	/* gather subject lines */
@@ -237,13 +237,13 @@ group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 	clast = (CamelFolderThreadNode *)cp;
 	c = clast->next;
 	while (c) {
-		c->root_subject = get_root_subject(c);
+		c->root_subject = get_root_subject (c);
 		if (c->root_subject) {
-			container = g_hash_table_lookup(subject_table, c->root_subject);
+			container = g_hash_table_lookup (subject_table, c->root_subject);
 			if (container == NULL
 			    || (container->message == NULL && c->message)
 			    || (container->re == TRUE && !c->re)) {
-				g_hash_table_insert(subject_table, c->root_subject, c);
+				g_hash_table_insert (subject_table, c->root_subject, c);
 			}
 		}
 		c = c->next;
@@ -255,7 +255,7 @@ group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 		c = clast->next;
 		d(printf("checking %p %s\n", c, c->root_subject));
 		if (c->root_subject
-		    && (container = g_hash_table_lookup(subject_table, c->root_subject))
+		    && (container = g_hash_table_lookup (subject_table, c->root_subject))
 		    && (container != c)) {
 			d(printf(" matching %p %s\n", container, container->root_subject));
 			if (c->message == NULL && container->message == NULL) {
@@ -266,50 +266,50 @@ group_root_set(CamelFolderThread *thread, CamelFolderThreadNode **cp)
 					scan = scan->next;
 				scan->next = c->child;
 				clast->next = c->next;
-				m(memset(c, 0xee, sizeof(*c)));
-				e_memchunk_free(thread->node_chunks, c);
+				m (memset (c, 0xee, sizeof (*c)));
+				e_memchunk_free (thread->node_chunks, c);
 				continue;
 			} if (c->message == NULL && container->message != NULL) {
 				d(printf("container is non-empty parent\n"));
-				remove_node(cp, container, &clast);
-				container_add_child(c, container);
+				remove_node (cp, container, &clast);
+				container_add_child (c, container);
 			} else if (c->message != NULL && container->message == NULL) {
 				d(printf("container is empty child\n"));
 				clast->next = c->next;
-				container_add_child(container, c);
+				container_add_child (container, c);
 				continue;
 			} else if (c->re && !container->re) {
 				d(printf("container is re\n"));
 				clast->next = c->next;
-				container_add_child(container, c);
+				container_add_child (container, c);
 				continue;
 			} else if (!c->re && container->re) {
 				d(printf("container is not re\n"));
-				remove_node(cp, container, &clast);
-				container_add_child(c, container);
+				remove_node (cp, container, &clast);
+				container_add_child (c, container);
 			} else {
 				d(printf("subjects are common %p and %p\n", c, container));
 
 				/* build a phantom node */
-				remove_node(cp, container, &clast);
-				remove_node(cp, c, &clast);
+				remove_node (cp, container, &clast);
+				remove_node (cp, c, &clast);
 
-				scan = e_memchunk_alloc0(thread->node_chunks);
+				scan = e_memchunk_alloc0 (thread->node_chunks);
 
 				scan->root_subject = c->root_subject;
 				scan->re = c->re && container->re;
 				scan->next = c->next;
 				clast->next = scan;
-				container_add_child(scan, c);
-				container_add_child(scan, container);
+				container_add_child (scan, c);
+				container_add_child (scan, container);
 				clast = scan;
-				g_hash_table_insert(subject_table, scan->root_subject, scan);
+				g_hash_table_insert (subject_table, scan->root_subject, scan);
 				continue;
 			}
 		}
 		clast = c;
 	}
-	g_hash_table_destroy(subject_table);
+	g_hash_table_destroy (subject_table);
 }
 
 struct _tree_info {
@@ -317,49 +317,49 @@ struct _tree_info {
 };
 
 static gint
-dump_tree_rec(struct _tree_info *info, CamelFolderThreadNode *c, gint depth)
+dump_tree_rec (struct _tree_info *info, CamelFolderThreadNode *c, gint depth)
 {
 	gchar *p;
 	gint count=0;
 
-	p = alloca(depth*2+1);
-	memset(p, ' ', depth*2);
+	p = alloca (depth*2+1);
+	memset (p, ' ', depth*2);
 	p[depth*2] = 0;
 
 	while (c) {
-		if (g_hash_table_lookup(info->visited, c)) {
+		if (g_hash_table_lookup (info->visited, c)) {
 			printf("WARNING: NODE REVISITED: %p\n", (gpointer) c);
 		} else {
-			g_hash_table_insert(info->visited, c, c);
+			g_hash_table_insert (info->visited, c, c);
 		}
 		if (c->message) {
 			printf("%s %p Subject: %s <%08x%08x>\n", p, (gpointer) c, camel_message_info_subject(c->message),
-			       camel_message_info_message_id(c->message)->id.part.hi, camel_message_info_message_id(c->message)->id.part.lo);
+			       camel_message_info_message_id (c->message)->id.part.hi, camel_message_info_message_id (c->message)->id.part.lo);
 			count += 1;
 		} else {
 			printf("%s %p <empty>\n", p, (gpointer) c);
 		}
 		if (c->child)
-			count += dump_tree_rec(info, c->child, depth+1);
+			count += dump_tree_rec (info, c->child, depth+1);
 		c = c->next;
 	}
 	return count;
 }
 
 gint
-camel_folder_threaded_messages_dump(CamelFolderThreadNode *c)
+camel_folder_threaded_messages_dump (CamelFolderThreadNode *c)
 {
 	gint count;
 	struct _tree_info info;
 
-	info.visited = g_hash_table_new(g_direct_hash, g_direct_equal);
-	count = dump_tree_rec(&info, c, 0);
-	g_hash_table_destroy(info.visited);
+	info.visited = g_hash_table_new (g_direct_hash, g_direct_equal);
+	count = dump_tree_rec (&info, c, 0);
+	g_hash_table_destroy (info.visited);
 	return count;
 }
 
 static gint
-sort_node(gconstpointer a, gconstpointer b)
+sort_node (gconstpointer a, gconstpointer b)
 {
 	const CamelFolderThreadNode *a1 = ((CamelFolderThreadNode **)a)[0];
 	const CamelFolderThreadNode *b1 = ((CamelFolderThreadNode **)b)[0];
@@ -380,7 +380,7 @@ sort_node(gconstpointer a, gconstpointer b)
 }
 
 static void
-sort_thread(CamelFolderThreadNode **cp)
+sort_thread (CamelFolderThreadNode **cp)
 {
 	CamelFolderThreadNode *c, *head, **carray;
 	gint size=0;
@@ -389,13 +389,13 @@ sort_thread(CamelFolderThreadNode **cp)
 	while (c) {
 		/* sort the children while we're at it */
 		if (c->child)
-			sort_thread(&c->child);
+			sort_thread (&c->child);
 		size++;
 		c = c->next;
 	}
 	if (size<2)
 		return;
-	carray = alloca(size*sizeof(CamelFolderThreadNode *));
+	carray = alloca (size*sizeof (CamelFolderThreadNode *));
 	c = *cp;
 	size=0;
 	while (c) {
@@ -403,7 +403,7 @@ sort_thread(CamelFolderThreadNode **cp)
 		c = c->next;
 		size++;
 	}
-	qsort(carray, size, sizeof(CamelFolderThreadNode *), sort_node);
+	qsort (carray, size, sizeof (CamelFolderThreadNode *), sort_node);
 	size--;
 	head = carray[size];
 	head->next = NULL;
@@ -417,21 +417,21 @@ sort_thread(CamelFolderThreadNode **cp)
 	*cp = head;
 }
 
-static guint id_hash(gpointer key)
+static guint id_hash (gpointer key)
 {
 	CamelSummaryMessageID *id = (CamelSummaryMessageID *)key;
 
 	return id->id.part.lo;
 }
 
-static gint id_equal(gpointer a, gpointer b)
+static gint id_equal (gpointer a, gpointer b)
 {
 	return ((CamelSummaryMessageID *)a)->id.id == ((CamelSummaryMessageID *)b)->id.id;
 }
 
 /* perform actual threading */
 static void
-thread_summary(CamelFolderThread *thread, GPtrArray *summary)
+thread_summary (CamelFolderThread *thread, GPtrArray *summary)
 {
 	GHashTable *id_table, *no_id_table;
 	gint i;
@@ -440,34 +440,34 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 	struct timeval start, end;
 	gulong diff;
 
-	gettimeofday(&start, NULL);
+	gettimeofday (&start, NULL);
 #endif
 
-	id_table = g_hash_table_new((GHashFunc)id_hash, (GCompareFunc)id_equal);
-	no_id_table = g_hash_table_new(NULL, NULL);
+	id_table = g_hash_table_new ((GHashFunc)id_hash, (GCompareFunc)id_equal);
+	no_id_table = g_hash_table_new (NULL, NULL);
 	for (i=0;i<summary->len;i++) {
 		CamelMessageInfo *mi = summary->pdata[i];
-		const CamelSummaryMessageID *mid = camel_message_info_message_id(mi);
-		const CamelSummaryReferences *references = camel_message_info_references(mi);
+		const CamelSummaryMessageID *mid = camel_message_info_message_id (mi);
+		const CamelSummaryReferences *references = camel_message_info_references (mi);
 
 		if (mid != NULL && mid->id.id) {
-			c = g_hash_table_lookup(id_table, mid);
+			c = g_hash_table_lookup (id_table, mid);
 			/* check for duplicate messages */
 			if (c && c->order) {
 				/* if duplicate, just make out it is a no-id message,  but try and insert it
 				   into the right spot in the tree */
 				d(printf("doing: (duplicate message id)\n"));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(no_id_table, (gpointer)mi, c);
+				c = e_memchunk_alloc0 (thread->node_chunks);
+				g_hash_table_insert (no_id_table, (gpointer)mi, c);
 			} else if (!c) {
 				d(printf("doing : %08x%08x (%s)\n", mid->id.part.hi, mid->id.part.lo, camel_message_info_subject(mi)));
-				c = e_memchunk_alloc0(thread->node_chunks);
-				g_hash_table_insert(id_table, (gpointer)mid, c);
+				c = e_memchunk_alloc0 (thread->node_chunks);
+				g_hash_table_insert (id_table, (gpointer)mid, c);
 			}
 		} else {
 			d(printf("doing : (no message id)\n"));
-			c = e_memchunk_alloc0(thread->node_chunks);
-			g_hash_table_insert(no_id_table, (gpointer)mi, c);
+			c = e_memchunk_alloc0 (thread->node_chunks);
+			g_hash_table_insert (no_id_table, (gpointer)mi, c);
 		}
 
 		c->message = mi;
@@ -482,14 +482,14 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 				if (references->references[j].id.id == 0)
 					continue;
 
-				c = g_hash_table_lookup(id_table, &references->references[j]);
+				c = g_hash_table_lookup (id_table, &references->references[j]);
 				if (c == NULL) {
 					d(printf("%s (%s) not found\n", G_STRLOC, G_STRFUNC));
-					c = e_memchunk_alloc0(thread->node_chunks);
-					g_hash_table_insert(id_table, (gpointer)&references->references[j], c);
+					c = e_memchunk_alloc0 (thread->node_chunks);
+					g_hash_table_insert (id_table, (gpointer)&references->references[j], c);
 				}
 				if (c!=child)
-					container_parent_child(c, child);
+					container_parent_child (c, child);
 				child = c;
 			}
 		}
@@ -498,14 +498,14 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 	d(printf("\n\n"));
 	/* build a list of root messages (no parent) */
 	head = NULL;
-	g_hash_table_foreach(id_table, hashloop, &head);
-	g_hash_table_foreach(no_id_table, hashloop, &head);
+	g_hash_table_foreach (id_table, hashloop, &head);
+	g_hash_table_foreach (no_id_table, hashloop, &head);
 
-	g_hash_table_destroy(id_table);
-	g_hash_table_destroy(no_id_table);
+	g_hash_table_destroy (id_table);
+	g_hash_table_destroy (no_id_table);
 
 	/* remove empty parent nodes */
-	prune_empty(thread, &head);
+	prune_empty (thread, &head);
 
 	/* find any siblings which missed out - but only if we are allowing threading by subject */
 	if (thread->subject)
@@ -513,11 +513,11 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 
 #if 0
 	printf("finished\n");
-	i = camel_folder_threaded_messages_dump(head);
+	i = camel_folder_threaded_messages_dump (head);
 	printf("%d count, %d items in tree\n", summary->len, i);
 #endif
 
-	sort_thread(&head);
+	sort_thread (&head);
 
 	/* remove any phantom nodes, this could possibly be put in group_root_set()? */
 	c = (CamelFolderThreadNode *)&head;
@@ -545,8 +545,8 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 			/* and link the now 'real' node into the list */
 			newtop->next = child->next;
 			c = newtop;
-			m(memset(child, 0xde, sizeof(*child)));
-			e_memchunk_free(thread->node_chunks, child);
+			m (memset (child, 0xde, sizeof (*child)));
+			e_memchunk_free (thread->node_chunks, child);
 		} else {
 			c = child;
 		}
@@ -565,7 +565,7 @@ thread_summary(CamelFolderThread *thread, GPtrArray *summary)
 	thread->tree = head;
 
 #ifdef TIMEIT
-	gettimeofday(&end, NULL);
+	gettimeofday (&end, NULL);
 	diff = end.tv_sec * 1000 + end.tv_usec/1000;
 	diff -= start.tv_sec * 1000 + start.tv_usec/1000;
 	printf("Message threading %d messages took %ld.%03ld seconds\n",
@@ -600,16 +600,16 @@ camel_folder_thread_messages_new (CamelFolder *folder, GPtrArray *uids, gboolean
 	GPtrArray *fsummary;
 	gint i;
 
-	thread = g_malloc(sizeof(*thread));
+	thread = g_malloc (sizeof (*thread));
 	thread->refcount = 1;
 	thread->subject = thread_subject;
 	thread->tree = NULL;
-	thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
+	thread->node_chunks = e_memchunk_new (32, sizeof (CamelFolderThreadNode));
 	thread->folder = g_object_ref (folder);
 
 	camel_folder_summary_prepare_fetch_all (folder->summary, NULL);
 	fsummary = camel_folder_summary_array (folder->summary);
-	thread->summary = summary = g_ptr_array_new();
+	thread->summary = summary = g_ptr_array_new ();
 
 	/* prefer given order from the summary order */
 	if (!uids)
@@ -625,66 +625,66 @@ camel_folder_thread_messages_new (CamelFolder *folder, GPtrArray *uids, gboolean
 		/* FIXME: Check if the info is leaking */
 	}
 
-	camel_folder_free_summary(folder, fsummary);
+	camel_folder_free_summary (folder, fsummary);
 
-	thread_summary(thread, summary);
+	thread_summary (thread, summary);
 
 	return thread;
 }
 
 /* add any still there, in the existing order */
 static void
-add_present_rec(CamelFolderThread *thread, GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
+add_present_rec (CamelFolderThread *thread, GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
 {
 	while (node) {
-		const gchar *uid = camel_message_info_uid(node->message);
+		const gchar *uid = camel_message_info_uid (node->message);
 
-		if (g_hash_table_lookup(have, (gchar *)uid)) {
-			g_hash_table_remove(have, (gchar *)camel_message_info_uid(node->message));
-			g_ptr_array_add(summary, (gpointer) node->message);
+		if (g_hash_table_lookup (have, (gchar *)uid)) {
+			g_hash_table_remove (have, (gchar *)camel_message_info_uid (node->message));
+			g_ptr_array_add (summary, (gpointer) node->message);
 		} else {
-			camel_folder_free_message_info(thread->folder, (CamelMessageInfo *)node->message);
+			camel_folder_free_message_info (thread->folder, (CamelMessageInfo *)node->message);
 		}
 
 		if (node->child)
-			add_present_rec(thread, have, summary, node->child);
+			add_present_rec (thread, have, summary, node->child);
 		node = node->next;
 	}
 }
 
 void
-camel_folder_thread_messages_apply(CamelFolderThread *thread, GPtrArray *uids)
+camel_folder_thread_messages_apply (CamelFolderThread *thread, GPtrArray *uids)
 {
 	gint i;
 	GPtrArray *all;
 	GHashTable *table;
 	CamelMessageInfo *info;
 
-	all = g_ptr_array_new();
-	table = g_hash_table_new(g_str_hash, g_str_equal);
+	all = g_ptr_array_new ();
+	table = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i=0;i<uids->len;i++)
-		g_hash_table_insert(table, uids->pdata[i], uids->pdata[i]);
+		g_hash_table_insert (table, uids->pdata[i], uids->pdata[i]);
 
-	add_present_rec(thread, table, all, thread->tree);
+	add_present_rec (thread, table, all, thread->tree);
 
 	/* add any new ones, in supplied order */
 	for (i=0;i<uids->len;i++)
-		if (g_hash_table_lookup(table, uids->pdata[i]) && (info = camel_folder_get_message_info(thread->folder, uids->pdata[i])))
-			g_ptr_array_add(all, info);
+		if (g_hash_table_lookup (table, uids->pdata[i]) && (info = camel_folder_get_message_info (thread->folder, uids->pdata[i])))
+			g_ptr_array_add (all, info);
 
-	g_hash_table_destroy(table);
+	g_hash_table_destroy (table);
 
 	thread->tree = NULL;
-	e_memchunk_destroy(thread->node_chunks);
-	thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
-	thread_summary(thread, all);
+	e_memchunk_destroy (thread->node_chunks);
+	thread->node_chunks = e_memchunk_new (32, sizeof (CamelFolderThreadNode));
+	thread_summary (thread, all);
 
-	g_ptr_array_free(thread->summary, TRUE);
+	g_ptr_array_free (thread->summary, TRUE);
 	thread->summary = all;
 }
 
 void
-camel_folder_thread_messages_ref(CamelFolderThread *thread)
+camel_folder_thread_messages_ref (CamelFolderThread *thread)
 {
 	thread->refcount++;
 }
@@ -696,7 +696,7 @@ camel_folder_thread_messages_ref(CamelFolderThread *thread)
  * Free all memory associated with the thread descriptor @thread.
  **/
 void
-camel_folder_thread_messages_unref(CamelFolderThread *thread)
+camel_folder_thread_messages_unref (CamelFolderThread *thread)
 {
 	if (thread->refcount > 1) {
 		thread->refcount--;
@@ -707,12 +707,12 @@ camel_folder_thread_messages_unref(CamelFolderThread *thread)
 		gint i;
 
 		for (i=0;i<thread->summary->len;i++)
-			camel_folder_free_message_info(thread->folder, thread->summary->pdata[i]);
-		g_ptr_array_free(thread->summary, TRUE);
+			camel_folder_free_message_info (thread->folder, thread->summary->pdata[i]);
+		g_ptr_array_free (thread->summary, TRUE);
 		g_object_unref (thread->folder);
 	}
-	e_memchunk_destroy(thread->node_chunks);
-	g_free(thread);
+	e_memchunk_destroy (thread->node_chunks);
+	g_free (thread);
 }
 
 #if 0
@@ -728,7 +728,7 @@ camel_folder_thread_messages_unref(CamelFolderThread *thread)
  * which represent the threaded structure of the messages.
  **/
 CamelFolderThread *
-camel_folder_thread_messages_new_summary(GPtrArray *summary)
+camel_folder_thread_messages_new_summary (GPtrArray *summary)
 {
 	CamelFolderThread *thread;
 
@@ -736,37 +736,37 @@ camel_folder_thread_messages_new_summary(GPtrArray *summary)
 	struct timeval start, end;
 	gulong diff;
 
-	gettimeofday(&start, NULL);
+	gettimeofday (&start, NULL);
 #endif
 
-	thread = g_malloc(sizeof(*thread));
+	thread = g_malloc (sizeof (*thread));
 	thread->refcount = 1;
 	thread->tree = NULL;
-	thread->node_chunks = e_memchunk_new(32, sizeof(CamelFolderThreadNode));
+	thread->node_chunks = e_memchunk_new (32, sizeof (CamelFolderThreadNode));
 	thread->folder = NULL;
 	thread->summary = NULL;
 
-	thread_summary(thread, summary);
+	thread_summary (thread, summary);
 
 	return thread;
 }
 
 /* scan the list in depth-first fashion */
 static void
-build_summary_rec(GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
+build_summary_rec (GHashTable *have, GPtrArray *summary, CamelFolderThreadNode *node)
 {
 	while (node) {
 		if (node->message)
-			g_hash_table_insert(have, (gchar *)camel_message_info_uid(node->message), node->message);
-		g_ptr_array_add(summary, node);
+			g_hash_table_insert (have, (gchar *)camel_message_info_uid (node->message), node->message);
+		g_ptr_array_add (summary, node);
 		if (node->child)
-			build_summary_rec(have, summary, node->child);
+			build_summary_rec (have, summary, node->child);
 		node = node->next;
 	}
 }
 
 void
-camel_folder_thread_messages_add(CamelFolderThread *thread, GPtrArray *summary)
+camel_folder_thread_messages_add (CamelFolderThread *thread, GPtrArray *summary)
 {
 	GPtrArray *all;
 	gint i;
@@ -777,26 +777,26 @@ camel_folder_thread_messages_add(CamelFolderThread *thread, GPtrArray *summary)
 	   thing with the summary in the current order - so it comes out
 	   in the same order */
 
-	all = g_ptr_array_new();
-	table = g_hash_table_new(g_str_hash, g_str_equal);
-	build_summary_rec(table, all, thread->tree);
+	all = g_ptr_array_new ();
+	table = g_hash_table_new (g_str_hash, g_str_equal);
+	build_summary_rec (table, all, thread->tree);
 	for (i=0;i<summary->len;i++) {
 		CamelMessageInfo *info = summary->pdata[i];
 
 		/* check its not already there, we dont want duplicates */
-		if (g_hash_table_lookup(table, camel_message_info_uid(info)) == NULL)
-			g_ptr_array_add(all, info);
+		if (g_hash_table_lookup (table, camel_message_info_uid (info)) == NULL)
+			g_ptr_array_add (all, info);
 	}
-	g_hash_table_destroy(table);
+	g_hash_table_destroy (table);
 
 	/* reset the tree, and rebuild fully */
 	thread->tree = NULL;
-	e_memchunk_empty(thread->node_chunks);
-	thread_summary(thread, all);
+	e_memchunk_empty (thread->node_chunks);
+	thread_summary (thread, all);
 }
 
 static void
-remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThreadNode **list, CamelFolderThreadNode *parent)
+remove_uid_node_rec (CamelFolderThread *thread, GHashTable *table, CamelFolderThreadNode **list, CamelFolderThreadNode *parent)
 {
 	CamelFolderThreadNode *prev = NULL;
 	CamelFolderThreadNode *node, *next, *child, *rest;
@@ -806,10 +806,10 @@ remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThr
 	while (next) {
 
 		if (next->child)
-			remove_uid_node_rec(thread, table, &next->child, next);
+			remove_uid_node_rec (thread, table, &next->child, next);
 
 		/* do we have a node to remove? */
-		if (next->message && g_hash_table_lookup(table, (gchar *)camel_message_info_uid(node->message))) {
+		if (next->message && g_hash_table_lookup (table, (gchar *)camel_message_info_uid (node->message))) {
 			child = next->child;
 			if (child) {
 				/*
@@ -828,7 +828,7 @@ remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThr
 
 				rest = next->next;
 				node->next = child;
-				e_memchunk_free(thread->node_chunks, next);
+				e_memchunk_free (thread->node_chunks, next);
 				next = child;
 				do {
 					lchild = child;
@@ -845,7 +845,7 @@ remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThr
 				  node
 				  rest */
 				node->next = next->next;
-				e_memchunk_free(thread->node_chunks, next);
+				e_memchunk_free (thread->node_chunks, next);
 				next = node->next;
 			}
 		} else {
@@ -856,17 +856,17 @@ remove_uid_node_rec(CamelFolderThread *thread, GHashTable *table, CamelFolderThr
 }
 
 void
-camel_folder_thread_messages_remove(CamelFolderThread *thread, GPtrArray *uids)
+camel_folder_thread_messages_remove (CamelFolderThread *thread, GPtrArray *uids)
 {
 	GHashTable *table;
 	gint i;
 
-	table = g_hash_table_new(g_str_hash, g_str_equal);
+	table = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i=0;i<uids->len;i++)
-		g_hash_table_insert(table, uids->pdata[i], uids->pdata[i]);
+		g_hash_table_insert (table, uids->pdata[i], uids->pdata[i]);
 
-	remove_uid_node_rec(thread, table, &thread->tree, NULL);
-	g_hash_table_destroy(table);
+	remove_uid_node_rec (thread, table, &thread->tree, NULL);
+	g_hash_table_destroy (table);
 }
 
 #endif
diff --git a/camel/camel-folder-thread.h b/camel/camel-folder-thread.h
index 9a72f55..3ec1a42 100644
--- a/camel/camel-folder-thread.h
+++ b/camel/camel-folder-thread.h
@@ -50,22 +50,22 @@ typedef struct _CamelFolderThread {
 } CamelFolderThread;
 
 /* interface 1: using uid's */
-CamelFolderThread *camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids, gboolean thread_subject);
-void camel_folder_thread_messages_apply(CamelFolderThread *thread, GPtrArray *uids);
+CamelFolderThread *camel_folder_thread_messages_new (CamelFolder *folder, GPtrArray *uids, gboolean thread_subject);
+void camel_folder_thread_messages_apply (CamelFolderThread *thread, GPtrArray *uids);
 
 /* interface 2: using messageinfo's.  Currently disabled. */
 #if 0
 /* new improved interface */
-CamelFolderThread *camel_folder_thread_messages_new_summary(GPtrArray *summary);
-void camel_folder_thread_messages_add(CamelFolderThread *thread, GPtrArray *summary);
-void camel_folder_thread_messages_remove(CamelFolderThread *thread, GPtrArray *uids);
+CamelFolderThread *camel_folder_thread_messages_new_summary (GPtrArray *summary);
+void camel_folder_thread_messages_add (CamelFolderThread *thread, GPtrArray *summary);
+void camel_folder_thread_messages_remove (CamelFolderThread *thread, GPtrArray *uids);
 #endif
 
-void camel_folder_thread_messages_ref(CamelFolderThread *thread);
-void camel_folder_thread_messages_unref(CamelFolderThread *thread);
+void camel_folder_thread_messages_ref (CamelFolderThread *thread);
+void camel_folder_thread_messages_unref (CamelFolderThread *thread);
 
 /* debugging function only */
-gint camel_folder_threaded_messages_dump(CamelFolderThreadNode *c);
+gint camel_folder_threaded_messages_dump (CamelFolderThreadNode *c);
 
 G_END_DECLS
 
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index d00fc76..97a8fe8 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -273,7 +273,7 @@ void		camel_folder_set_description	(CamelFolder *folder,
 						 const gchar *description);
 
 /* various properties accessors */
-guint32		camel_folder_get_permanent_flags(CamelFolder *folder);
+guint32		camel_folder_get_permanent_flags (CamelFolder *folder);
 
 #ifndef CAMEL_DISABLE_DEPRECATED
 guint32		camel_folder_get_message_flags	(CamelFolder *folder,
@@ -371,7 +371,7 @@ GPtrArray *	camel_folder_search_by_uids	(CamelFolder *folder,
 						 GError **error);
 void		camel_folder_search_free	(CamelFolder *folder,
 						 GPtrArray *result);
-guint32		camel_folder_count_by_expression(CamelFolder *folder,
+guint32		camel_folder_count_by_expression (CamelFolder *folder,
 						 const gchar *expression,
 						 GError **error);
 
@@ -434,7 +434,7 @@ CamelFolderChangeInfo *
 		camel_folder_change_info_new	(void);
 void		camel_folder_change_info_clear	(CamelFolderChangeInfo *info);
 void		camel_folder_change_info_free	(CamelFolderChangeInfo *info);
-gboolean	camel_folder_change_info_changed(CamelFolderChangeInfo *info);
+gboolean	camel_folder_change_info_changed (CamelFolderChangeInfo *info);
 
 /* for building diff's automatically */
 void		camel_folder_change_info_add_source
@@ -455,7 +455,7 @@ void		camel_folder_change_info_build_diff
 /* for manipulating diff's directly */
 void		camel_folder_change_info_cat	(CamelFolderChangeInfo *info,
 						 CamelFolderChangeInfo *src);
-void		camel_folder_change_info_add_uid(CamelFolderChangeInfo *info,
+void		camel_folder_change_info_add_uid (CamelFolderChangeInfo *info,
 						 const gchar *uid);
 void		camel_folder_change_info_remove_uid
 						(CamelFolderChangeInfo *info,
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 538306e..51b3cfa 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -769,7 +769,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg,
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Unexpected GnuPG status message encountered:\n\n%s"),
 			message);
-		g_free(message);
+		g_free (message);
 
 		return -1;
 	}
@@ -1153,14 +1153,14 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
 	polls[3].events = G_IO_OUT;
 	polls[4].fd = gpg->passwd_fd;
 	polls[4].events = G_IO_OUT;
-	cancel_fd = camel_operation_cancel_fd(NULL);
+	cancel_fd = camel_operation_cancel_fd (NULL);
 	polls[5].fd = cancel_fd;
 	polls[5].events = G_IO_IN;
 
 	do {
 		for (i=0;i<6;i++)
 			polls[i].revents = 0;
-		status = g_poll(polls, 6, 30*1000);
+		status = g_poll (polls, 6, 30*1000);
 	} while (status == -1 && errno == EINTR);
 
 	if (status == 0)
@@ -1168,12 +1168,12 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
 	else if (status == -1)
 		goto exception;
 
-	if ((polls[5].revents & G_IO_IN) && camel_operation_cancel_check(NULL)) {
+	if ((polls[5].revents & G_IO_IN) && camel_operation_cancel_check (NULL)) {
 		g_set_error (
 			error, G_IO_ERROR,
 			G_IO_ERROR_CANCELLED,
 			_("Cancelled"));
-		gpg_ctx_op_cancel(gpg);
+		gpg_ctx_op_cancel (gpg);
 
 		return -1;
 	}
@@ -1328,7 +1328,7 @@ gpg_ctx_op_step (struct _GpgCtx *gpg,
 		error, G_IO_ERROR,
 		g_io_error_from_errno (errno),
 		_("Failed to execute gpg: %s"), g_strerror (errno));
-	gpg_ctx_op_cancel(gpg);
+	gpg_ctx_op_cancel (gpg);
 #endif
 	return -1;
 }
@@ -1412,7 +1412,7 @@ gpg_sign (CamelCipherContext *context,
 {
 	struct _GpgCtx *gpg = NULL;
 	CamelCipherContextClass *class;
-	CamelStream *ostream = camel_stream_mem_new(), *istream;
+	CamelStream *ostream = camel_stream_mem_new (), *istream;
 	CamelDataWrapper *dw;
 	CamelContentType *ct;
 	gint res = -1;
@@ -1424,7 +1424,7 @@ gpg_sign (CamelCipherContext *context,
 	class = CAMEL_CIPHER_CONTEXT_GET_CLASS (context);
 
 	/* FIXME: stream this, we stream output at least */
-	istream = camel_stream_mem_new();
+	istream = camel_stream_mem_new ();
 	if (camel_cipher_canonical_to_stream (
 		ipart, CAMEL_MIME_FILTER_CANON_STRIP |
 		CAMEL_MIME_FILTER_CANON_CRLF |
@@ -1441,15 +1441,15 @@ gpg_sign (CamelCipherContext *context,
 		CamelStream *out;
 
 		name = g_strdup_printf("camel-gpg.%d.sign-data", logid++);
-		out = camel_stream_fs_new_with_name(name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+		out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
 		if (out) {
 			printf("Writing gpg signing data to '%s'\n", name);
-			camel_stream_write_to_stream(istream, out);
-			camel_stream_reset(istream);
+			camel_stream_write_to_stream (istream, out);
+			camel_stream_reset (istream);
 			g_object_unref (out);
 		}
-		g_free(name);
-		camel_debug_end();
+		g_free (name);
+		camel_debug_end ();
 	}
 #endif
 
@@ -1485,32 +1485,32 @@ gpg_sign (CamelCipherContext *context,
 
 	res = 0;
 
-	dw = camel_data_wrapper_new();
-	camel_stream_reset(ostream, NULL);
-	camel_data_wrapper_construct_from_stream(dw, ostream, NULL);
+	dw = camel_data_wrapper_new ();
+	camel_stream_reset (ostream, NULL);
+	camel_data_wrapper_construct_from_stream (dw, ostream, NULL);
 
-	sigpart = camel_mime_part_new();
+	sigpart = camel_mime_part_new ();
 	ct = camel_content_type_new("application", "pgp-signature");
 	camel_content_type_set_param(ct, "name", "signature.asc");
-	camel_data_wrapper_set_mime_type_field(dw, ct);
-	camel_content_type_unref(ct);
+	camel_data_wrapper_set_mime_type_field (dw, ct);
+	camel_content_type_unref (ct);
 
 	camel_medium_set_content ((CamelMedium *)sigpart, dw);
 	g_object_unref (dw);
 
 	camel_mime_part_set_description(sigpart, "This is a digitally signed message part");
 
-	mps = camel_multipart_signed_new();
+	mps = camel_multipart_signed_new ();
 	ct = camel_content_type_new("multipart", "signed");
 	camel_content_type_set_param(ct, "micalg", camel_cipher_hash_to_id (context, hash == CAMEL_CIPHER_HASH_DEFAULT ? gpg->hash : hash));
 	camel_content_type_set_param(ct, "protocol", class->sign_protocol);
-	camel_data_wrapper_set_mime_type_field((CamelDataWrapper *)mps, ct);
-	camel_content_type_unref(ct);
-	camel_multipart_set_boundary((CamelMultipart *)mps, NULL);
+	camel_data_wrapper_set_mime_type_field ((CamelDataWrapper *)mps, ct);
+	camel_content_type_unref (ct);
+	camel_multipart_set_boundary ((CamelMultipart *)mps, NULL);
 
 	mps->signature = sigpart;
 	mps->contentraw = istream;
-	camel_stream_reset(istream, NULL);
+	camel_stream_reset (istream, NULL);
 	g_object_ref (istream);
 
 	camel_medium_set_content ((CamelMedium *)opart, (CamelDataWrapper *)mps);
@@ -1614,9 +1614,9 @@ gpg_verify (CamelCipherContext *context,
 		const gchar *tmp;
 
 		tmp = camel_content_type_param(ct, "protocol");
-		if (!CAMEL_IS_MULTIPART_SIGNED(mps)
+		if (!CAMEL_IS_MULTIPART_SIGNED (mps)
 		    || tmp == NULL
-		    || g_ascii_strcasecmp(tmp, class->sign_protocol) != 0) {
+		    || g_ascii_strcasecmp (tmp, class->sign_protocol) != 0) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Cannot verify message signature: "
@@ -1644,9 +1644,9 @@ gpg_verify (CamelCipherContext *context,
 		/* Inline Signed */
 		CamelDataWrapper *content;
 		content = camel_medium_get_content ((CamelMedium *) ipart);
-		istream = camel_stream_mem_new();
+		istream = camel_stream_mem_new ();
 		camel_data_wrapper_decode_to_stream (content, istream, NULL);
-		camel_stream_reset(istream, NULL);
+		camel_stream_reset (istream, NULL);
 		sigpart = NULL;
 	} else {
 		/* Invalid Mimetype */
@@ -1664,27 +1664,27 @@ gpg_verify (CamelCipherContext *context,
 		CamelStream *out;
 
 		name = g_strdup_printf("camel-gpg.%d.verify.data", logid);
-		out = camel_stream_fs_new_with_name(name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+		out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
 		if (out) {
 			printf("Writing gpg verify data to '%s'\n", name);
-			camel_stream_write_to_stream(istream, out);
-			camel_stream_reset(istream);
+			camel_stream_write_to_stream (istream, out);
+			camel_stream_reset (istream);
 			g_object_unref (out);
 		}
 
-		g_free(name);
+		g_free (name);
 
 		if (sigpart) {
 			name = g_strdup_printf("camel-gpg.%d.verify.signature", logid++);
-			out = camel_stream_fs_new_with_name(name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
+			out = camel_stream_fs_new_with_name (name, O_CREAT|O_TRUNC|O_WRONLY, 0666);
 			if (out) {
 				printf("Writing gpg verify signature to '%s'\n", name);
-				camel_data_wrapper_write_to_stream((CamelDataWrapper *)sigpart, out);
+				camel_data_wrapper_write_to_stream ((CamelDataWrapper *)sigpart, out);
 				g_object_unref (out);
 			}
-			g_free(name);
+			g_free (name);
 		}
-		camel_debug_end();
+		camel_debug_end ();
 	}
 #endif
 
@@ -1806,8 +1806,8 @@ gpg_encrypt (CamelCipherContext *context,
 
 	class = CAMEL_CIPHER_CONTEXT_GET_CLASS (context);
 
-	ostream = camel_stream_mem_new();
-	istream = camel_stream_mem_new();
+	ostream = camel_stream_mem_new ();
+	istream = camel_stream_mem_new ();
 	if (camel_cipher_canonical_to_stream (
 		ipart, CAMEL_MIME_FILTER_CANON_CRLF, istream, error) == -1) {
 		g_prefix_error (
@@ -1831,7 +1831,7 @@ gpg_encrypt (CamelCipherContext *context,
 		goto fail;
 
 	/* FIXME: move this to a common routine */
-	while (!gpg_ctx_op_complete(gpg)) {
+	while (!gpg_ctx_op_complete (gpg)) {
 		if (gpg_ctx_op_step (gpg, error) == -1) {
 			gpg_ctx_op_cancel (gpg);
 			goto fail;
@@ -1851,49 +1851,49 @@ gpg_encrypt (CamelCipherContext *context,
 
 	res = 0;
 
-	dw = camel_data_wrapper_new();
+	dw = camel_data_wrapper_new ();
 	camel_data_wrapper_construct_from_stream (dw, ostream, NULL);
 
-	encpart = camel_mime_part_new();
+	encpart = camel_mime_part_new ();
 	ct = camel_content_type_new("application", "octet-stream");
 	camel_content_type_set_param(ct, "name", "encrypted.asc");
-	camel_data_wrapper_set_mime_type_field(dw, ct);
-	camel_content_type_unref(ct);
+	camel_data_wrapper_set_mime_type_field (dw, ct);
+	camel_content_type_unref (ct);
 
 	camel_medium_set_content ((CamelMedium *)encpart, dw);
 	g_object_unref (dw);
 
 	camel_mime_part_set_description(encpart, _("This is a digitally encrypted message part"));
 
-	vstream = camel_stream_mem_new();
+	vstream = camel_stream_mem_new ();
 	camel_stream_write (vstream, "Version: 1\n", strlen("Version: 1\n"), NULL);
 	camel_stream_reset (vstream, NULL);
 
-	verpart = camel_mime_part_new();
-	dw = camel_data_wrapper_new();
-	camel_data_wrapper_set_mime_type(dw, class->encrypt_protocol);
+	verpart = camel_mime_part_new ();
+	dw = camel_data_wrapper_new ();
+	camel_data_wrapper_set_mime_type (dw, class->encrypt_protocol);
 	camel_data_wrapper_construct_from_stream (dw, vstream, NULL);
 	g_object_unref (vstream);
 	camel_medium_set_content ((CamelMedium *)verpart, dw);
 	g_object_unref (dw);
 
-	mpe = camel_multipart_encrypted_new();
+	mpe = camel_multipart_encrypted_new ();
 	ct = camel_content_type_new("multipart", "encrypted");
 	camel_content_type_set_param(ct, "protocol", class->encrypt_protocol);
-	camel_data_wrapper_set_mime_type_field((CamelDataWrapper *)mpe, ct);
-	camel_content_type_unref(ct);
-	camel_multipart_set_boundary((CamelMultipart *)mpe, NULL);
+	camel_data_wrapper_set_mime_type_field ((CamelDataWrapper *)mpe, ct);
+	camel_content_type_unref (ct);
+	camel_multipart_set_boundary ((CamelMultipart *)mpe, NULL);
 
 	mpe->decrypted = g_object_ref (ipart);
 
-	camel_multipart_add_part((CamelMultipart *)mpe, verpart);
+	camel_multipart_add_part ((CamelMultipart *)mpe, verpart);
 	g_object_unref (verpart);
-	camel_multipart_add_part((CamelMultipart *)mpe, encpart);
+	camel_multipart_add_part ((CamelMultipart *)mpe, encpart);
 	g_object_unref (encpart);
 
 	camel_medium_set_content ((CamelMedium *)opart, (CamelDataWrapper *)mpe);
 fail:
-	gpg_ctx_free(gpg);
+	gpg_ctx_free (gpg);
 fail1:
 	g_object_unref (istream);
 	g_object_unref (ostream);
@@ -1955,12 +1955,12 @@ gpg_decrypt (CamelCipherContext *context,
 		return NULL;
 	}
 
-	istream = camel_stream_mem_new();
+	istream = camel_stream_mem_new ();
 	camel_data_wrapper_decode_to_stream (content, istream, NULL);
 	camel_stream_reset (istream, NULL);
 
-	ostream = camel_stream_mem_new();
-	camel_stream_mem_set_secure((CamelStreamMem *)ostream);
+	ostream = camel_stream_mem_new ();
+	camel_stream_mem_set_secure ((CamelStreamMem *)ostream);
 
 	gpg = gpg_ctx_new (context);
 	gpg_ctx_set_mode (gpg, GPG_CTX_MODE_DECRYPT);
@@ -2019,7 +2019,7 @@ gpg_decrypt (CamelCipherContext *context,
 	}
 
 	if (rv != -1) {
-		valid = camel_cipher_validity_new();
+		valid = camel_cipher_validity_new ();
 		valid->encrypt.description = g_strdup(_("Encrypted content"));
 		valid->encrypt.status = CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED;
 
diff --git a/camel/camel-html-parser.c b/camel/camel-html-parser.c
index 2504549..ccf9bc5 100644
--- a/camel/camel-html-parser.c
+++ b/camel/camel-html-parser.c
@@ -53,10 +53,10 @@ struct _CamelHTMLParserPrivate {
 	gint quote;
 };
 
-static void tokenize_setup(void);
-static CamelHTMLParserPrivate *tokenize_init(void);
-static void tokenize_free(CamelHTMLParserPrivate *p);
-static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp);
+static void tokenize_setup (void);
+static CamelHTMLParserPrivate *tokenize_init (void);
+static void tokenize_free (CamelHTMLParserPrivate *p);
+static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp);
 
 G_DEFINE_TYPE (CamelHTMLParser, camel_html_parser, CAMEL_TYPE_OBJECT)
 
@@ -81,13 +81,13 @@ camel_html_parser_class_init (CamelHTMLParserClass *class)
 	object_class = G_OBJECT_CLASS (class);
 	object_class->finalize = html_parser_finalize;
 
-	tokenize_setup();
+	tokenize_setup ();
 }
 
 static void
 camel_html_parser_init (CamelHTMLParser *parser)
 {
-	parser->priv = tokenize_init();
+	parser->priv = tokenize_init ();
 }
 
 /**
@@ -103,7 +103,7 @@ camel_html_parser_new (void)
 	return g_object_new (CAMEL_TYPE_HTML_PARSER, NULL);
 }
 
-void camel_html_parser_set_data(CamelHTMLParser *hp, const gchar *start, gint len, gint last)
+void camel_html_parser_set_data (CamelHTMLParser *hp, const gchar *start, gint len, gint last)
 {
 	CamelHTMLParserPrivate *p = hp->priv;
 
@@ -112,12 +112,12 @@ void camel_html_parser_set_data(CamelHTMLParser *hp, const gchar *start, gint le
 	p->eof = last;
 }
 
-camel_html_parser_t camel_html_parser_step(CamelHTMLParser *hp, const gchar **datap, gint *lenp)
+camel_html_parser_t camel_html_parser_step (CamelHTMLParser *hp, const gchar **datap, gint *lenp)
 {
-	return tokenize_step(hp->priv, (gchar **)datap, lenp);
+	return tokenize_step (hp->priv, (gchar **)datap, lenp);
 }
 
-const gchar *camel_html_parser_left(CamelHTMLParser *hp, gint *lenp)
+const gchar *camel_html_parser_left (CamelHTMLParser *hp, gint *lenp)
 {
 	CamelHTMLParserPrivate *p = hp->priv;
 
@@ -127,18 +127,18 @@ const gchar *camel_html_parser_left(CamelHTMLParser *hp, gint *lenp)
 	return p->inptr;
 }
 
-const gchar *camel_html_parser_tag(CamelHTMLParser *hp)
+const gchar *camel_html_parser_tag (CamelHTMLParser *hp)
 {
 	return hp->priv->tag->str;
 }
 
-const gchar *camel_html_parser_attr(CamelHTMLParser *hp, const gchar *name)
+const gchar *camel_html_parser_attr (CamelHTMLParser *hp, const gchar *name)
 {
 	gint i;
 	CamelHTMLParserPrivate *p = hp->priv;
 
 	for (i=0;i<p->attrs->len;i++) {
-		if (!g_ascii_strcasecmp(((GString *)p->attrs->pdata[i])->str, name)) {
+		if (!g_ascii_strcasecmp (((GString *)p->attrs->pdata[i])->str, name)) {
 			return ((GString *)p->values->pdata[i])->str;
 		}
 	}
@@ -146,7 +146,7 @@ const gchar *camel_html_parser_attr(CamelHTMLParser *hp, const gchar *name)
 	return NULL;
 }
 
-const GPtrArray *camel_html_parser_attr_list(CamelHTMLParser *hp, const GPtrArray **values)
+const GPtrArray *camel_html_parser_attr_list (CamelHTMLParser *hp, const GPtrArray **values)
 {
 	if (values)
 		*values = hp->priv->values;
@@ -437,71 +437,71 @@ static struct {
 static GHashTable *entities;
 
 /* this cannot be called in a thread context */
-static void tokenize_setup(void)
+static void tokenize_setup (void)
 {
 	gint i;
 
 	if (entities == NULL) {
-		entities = g_hash_table_new(g_str_hash, g_str_equal);
+		entities = g_hash_table_new (g_str_hash, g_str_equal);
 		for (i = 0; i < G_N_ELEMENTS (entity_map); i++) {
-			g_hash_table_insert(entities, (gchar *)entity_map[i].name, GUINT_TO_POINTER(entity_map[i].val));
+			g_hash_table_insert (entities, (gchar *)entity_map[i].name, GUINT_TO_POINTER (entity_map[i].val));
 		}
 	}
 }
 
-static CamelHTMLParserPrivate *tokenize_init(void)
+static CamelHTMLParserPrivate *tokenize_init (void)
 {
 	CamelHTMLParserPrivate *p;
 
-	p = g_malloc(sizeof(*p));
+	p = g_malloc (sizeof (*p));
 	p->state = CAMEL_HTML_PARSER_DATA;
 
 	p->attr = 0;
-	p->attrs = g_ptr_array_new();
-	p->values = g_ptr_array_new();
+	p->attrs = g_ptr_array_new ();
+	p->values = g_ptr_array_new ();
 	p->tag = g_string_new("");
 	p->ent = g_string_new("");
 	p->charset = NULL;
 
 	if (entities == NULL)
-		tokenize_setup();
+		tokenize_setup ();
 
 	return p;
 }
 
-static void tokenize_free(CamelHTMLParserPrivate *p)
+static void tokenize_free (CamelHTMLParserPrivate *p)
 {
 	gint i;
 
-	g_string_free(p->tag, TRUE);
-	g_string_free(p->ent, TRUE);
-	g_free(p->charset);
+	g_string_free (p->tag, TRUE);
+	g_string_free (p->ent, TRUE);
+	g_free (p->charset);
 
 	for (i=0;i<p->attrs->len;i++)
-		g_string_free(p->attrs->pdata[i], TRUE);
+		g_string_free (p->attrs->pdata[i], TRUE);
 
 	for (i=0;i<p->values->len;i++)
-		g_string_free(p->values->pdata[i], TRUE);
+		g_string_free (p->values->pdata[i], TRUE);
 
-	g_free(p);
+	g_free (p);
 }
 
-static gint convert_entity(const gchar *e, gchar *ent)
+static gint convert_entity (const gchar *e, gchar *ent)
 {
 	guint val;
 
 	if (e[0] == '#')
-		return g_unichar_to_utf8(atoi(e+1), ent);
+		return g_unichar_to_utf8 (atoi (e+1), ent);
 
-	val = GPOINTER_TO_UINT(g_hash_table_lookup(entities, e));
+	val = GPOINTER_TO_UINT (g_hash_table_lookup (entities, e));
 	if (ent)
-		return g_unichar_to_utf8(val, ent);
+		return g_unichar_to_utf8 (val, ent);
 	else
 		return 0;
 }
 
 #if 0
-static void dump_tag(CamelHTMLParserPrivate *p)
+static void dump_tag (CamelHTMLParserPrivate *p)
 {
 	gint i;
 
@@ -513,7 +513,7 @@ static void dump_tag(CamelHTMLParserPrivate *p)
 }
 #endif
 
-static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
+static gint tokenize_step (CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 {
 	gchar *in = p->inptr;
 	gchar *inend = p->inend;
@@ -531,7 +531,7 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 				ret = state;
 				state = CAMEL_HTML_PARSER_TAG;
 				p->attr = 0;
-				g_string_truncate(p->tag, 0);
+				g_string_truncate (p->tag, 0);
 				d(printf("got data '%.*s'\n", in-start-1, start));
 				*datap = start;
 				*lenp = in-start-1;
@@ -539,8 +539,8 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 			} else if (c=='&') {
 				ret = state;
 				state = CAMEL_HTML_PARSER_ENT;
-				g_string_truncate(p->ent, 0);
-				g_string_append_c(p->ent, c);
+				g_string_truncate (p->ent, 0);
+				g_string_append_c (p->ent, c);
 				d(printf("got data '%.*s'\n", in-start-1, start));
 				*datap = start;
 				*lenp = in-start-1;
@@ -549,10 +549,10 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 			break;
 		case CAMEL_HTML_PARSER_ENT:
 			if (c==';') {
-				len = convert_entity(p->ent->str+1, p->ent_utf8);
+				len = convert_entity (p->ent->str+1, p->ent_utf8);
 				if (len == 0) {
 					/* handle broken entity */
-					g_string_append_c(p->ent, c);
+					g_string_append_c (p->ent, c);
 					ret = state = CAMEL_HTML_PARSER_DATA;
 					*datap = p->ent->str;
 					*lenp = p->ent->len;
@@ -565,11 +565,11 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 					*lenp = len;
 					goto done;
 				}
-			} else if (isalnum(c) || c=='#') { /* FIXME: right type */
-				g_string_append_c(p->ent, c);
+			} else if (isalnum (c) || c=='#') { /* FIXME: right type */
+				g_string_append_c (p->ent, c);
 			} else {
 				/* handle broken entity */
-				g_string_append_c(p->ent, c);
+				g_string_append_c (p->ent, c);
 				ret = state = CAMEL_HTML_PARSER_DATA;
 				*datap = p->ent->str;
 				*lenp = p->ent->len;
@@ -579,24 +579,24 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 		case CAMEL_HTML_PARSER_TAG:
 			if (c == '!') {
 				state = CAMEL_HTML_PARSER_COMMENT0;
-				g_string_append_c(p->tag, c);
+				g_string_append_c (p->tag, c);
 			} else if (c == '>') {
-				d(dump_tag(p));
+				d (dump_tag (p));
 				ret = CAMEL_HTML_PARSER_ELEMENT;
 				state = CAMEL_HTML_PARSER_DATA;
 				goto done;
 			} else if (c == ' ' || c=='\n' || c=='\t') {
 				state = CAMEL_HTML_PARSER_ATTR0;
 			} else {
-				g_string_append_c(p->tag, c);
+				g_string_append_c (p->tag, c);
 			}
 			break;
 			/* check for <!-- */
 		case CAMEL_HTML_PARSER_COMMENT0:
 			if (c == '-') {
-				g_string_append_c(p->tag, c);
+				g_string_append_c (p->tag, c);
 				if (p->tag->len == 3) {
-					g_string_truncate(p->tag, 0);
+					g_string_truncate (p->tag, 0);
 					state = CAMEL_HTML_PARSER_COMMENT;
 				}
 			} else {
@@ -623,14 +623,14 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 			} else if (c=='-') {
 				/* we dont care if we get 'n' --'s before the > */
 				if (p->tag->len < 2)
-					g_string_append_c(p->tag, c);
+					g_string_append_c (p->tag, c);
 			} else {
-				g_string_truncate(p->tag, 0);
+				g_string_truncate (p->tag, 0);
 			}
 			break;
 		case CAMEL_HTML_PARSER_ATTR0:	/* pre-attribute whitespace */
 			if (c == '>') {
-				d(dump_tag(p));
+				d (dump_tag (p));
 				ret = CAMEL_HTML_PARSER_ELEMENT;
 				state = CAMEL_HTML_PARSER_DATA;
 				goto done;
@@ -640,16 +640,16 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 					g_ptr_array_add(p->attrs, g_string_new(""));
 					g_ptr_array_add(p->values, g_string_new(""));
 				} else {
-					g_string_truncate(p->attrs->pdata[p->attr], 0);
-					g_string_truncate(p->values->pdata[p->attr], 0);
+					g_string_truncate (p->attrs->pdata[p->attr], 0);
+					g_string_truncate (p->values->pdata[p->attr], 0);
 				}
-				g_string_append_c(p->attrs->pdata[p->attr], c);
+				g_string_append_c (p->attrs->pdata[p->attr], c);
 				state = CAMEL_HTML_PARSER_ATTR;
 			}
 			break;
 		case CAMEL_HTML_PARSER_ATTR:
 			if (c == '>') {
-				d(dump_tag(p));
+				d (dump_tag (p));
 				ret = CAMEL_HTML_PARSER_ELEMENT;
 				state = CAMEL_HTML_PARSER_DATA;
 				goto done;
@@ -659,13 +659,13 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 				state = CAMEL_HTML_PARSER_ATTR0;
 				p->attr++;
 			} else {
-				g_string_append_c(p->attrs->pdata[p->attr], c);
+				g_string_append_c (p->attrs->pdata[p->attr], c);
 			}
 			break;
 		case CAMEL_HTML_PARSER_VAL0:
 			if (c == '>') {
 				d(printf("value truncated\n"));
-				d(dump_tag(p));
+				d (dump_tag (p));
 				ret = CAMEL_HTML_PARSER_ELEMENT;
 				state = CAMEL_HTML_PARSER_DATA;
 				goto done;
@@ -674,7 +674,7 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 				state = CAMEL_HTML_PARSER_VAL;
 			} else if (c == ' ' || c=='\n' || c=='\t') {
 			} else {
-				g_string_append_c(p->values->pdata[p->attr], c);
+				g_string_append_c (p->values->pdata[p->attr], c);
 				p->quote = 0;
 				state = CAMEL_HTML_PARSER_VAL;
 			}
@@ -684,7 +684,7 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 			if (p->quote) {
 				if (c == '>') {
 					d(printf("value truncated\n"));
-					d(dump_tag(p));
+					d (dump_tag (p));
 					ret = CAMEL_HTML_PARSER_ELEMENT;
 					state = CAMEL_HTML_PARSER_DATA;
 					p->attr++;
@@ -694,12 +694,12 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 					p->attr++;
 				} else if (c=='&') {
 					state = CAMEL_HTML_PARSER_VAL_ENT;
-					g_string_truncate(p->ent, 0);
+					g_string_truncate (p->ent, 0);
 				} else {
-					g_string_append_c(p->values->pdata[p->attr], c);
+					g_string_append_c (p->values->pdata[p->attr], c);
 				}
 			} else if (c == '>') {
-				d(dump_tag(p));
+				d (dump_tag (p));
 				ret = CAMEL_HTML_PARSER_ELEMENT;
 				state = CAMEL_HTML_PARSER_DATA;
 				p->attr++;
@@ -709,28 +709,28 @@ static gint tokenize_step(CamelHTMLParserPrivate *p, gchar **datap, gint *lenp)
 				p->attr++;
 			} else if (c=='&') {
 				state = CAMEL_HTML_PARSER_VAL_ENT;
-				g_string_truncate(p->ent, 0);
+				g_string_truncate (p->ent, 0);
 			} else {
-				g_string_append_c(p->values->pdata[p->attr], c);
+				g_string_append_c (p->values->pdata[p->attr], c);
 			}
 			break;
 		case CAMEL_HTML_PARSER_VAL_ENT:
 			if (c==';') {
 				state = CAMEL_HTML_PARSER_VAL;
-				len = convert_entity(p->ent->str+1, p->ent_utf8);
+				len = convert_entity (p->ent->str+1, p->ent_utf8);
 				if (len == 0) {
 					/* fallback; broken entity, just output it and see why we ended */
-					g_string_append(p->values->pdata[p->attr], p->ent->str);
-					g_string_append_c(p->values->pdata[p->attr], ';');
+					g_string_append (p->values->pdata[p->attr], p->ent->str);
+					g_string_append_c (p->values->pdata[p->attr], ';');
 				} else {
 					d(printf("got entity: %s = %s\n", p->ent->str, p->ent_utf8));
-					g_string_append_len(p->values->pdata[p->attr], p->ent_utf8, len);
+					g_string_append_len (p->values->pdata[p->attr], p->ent_utf8, len);
 				}
-			} else if (isalnum(c) || c=='#') { /* FIXME: right type */
-				g_string_append_c(p->ent, c);
+			} else if (isalnum (c) || c=='#') { /* FIXME: right type */
+				g_string_append_c (p->ent, c);
 			} else {
 				/* fallback; broken entity, just output it and see why we ended */
-				g_string_append(p->values->pdata[p->attr], p->ent->str);
+				g_string_append (p->values->pdata[p->attr], p->ent->str);
 				goto do_val;
 			}
 			break;
diff --git a/camel/camel-html-parser.h b/camel/camel-html-parser.h
index b440b32..74deea3 100644
--- a/camel/camel-html-parser.h
+++ b/camel/camel-html-parser.h
@@ -89,12 +89,12 @@ struct _CamelHTMLParserClass {
 GType		camel_html_parser_get_type	(void);
 CamelHTMLParser      *camel_html_parser_new	(void);
 
-void camel_html_parser_set_data(CamelHTMLParser *hp, const gchar *start, gint len, gint last);
-camel_html_parser_t camel_html_parser_step(CamelHTMLParser *hp, const gchar **datap, gint *lenp);
-const gchar *camel_html_parser_left(CamelHTMLParser *hp, gint *lenp);
-const gchar *camel_html_parser_tag(CamelHTMLParser *hp);
-const gchar *camel_html_parser_attr(CamelHTMLParser *hp, const gchar *name);
-const GPtrArray *camel_html_parser_attr_list(CamelHTMLParser *hp, const GPtrArray **values);
+void camel_html_parser_set_data (CamelHTMLParser *hp, const gchar *start, gint len, gint last);
+camel_html_parser_t camel_html_parser_step (CamelHTMLParser *hp, const gchar **datap, gint *lenp);
+const gchar *camel_html_parser_left (CamelHTMLParser *hp, gint *lenp);
+const gchar *camel_html_parser_tag (CamelHTMLParser *hp);
+const gchar *camel_html_parser_attr (CamelHTMLParser *hp, const gchar *name);
+const GPtrArray *camel_html_parser_attr_list (CamelHTMLParser *hp, const GPtrArray **values);
 
 G_END_DECLS
 
diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c
index 3c62d51..452898b 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -83,7 +83,7 @@ http_connect (CamelHttpStream *http,
 	}
 
 	if (url->port) {
-		serv = g_alloca(16);
+		serv = g_alloca (16);
 		sprintf(serv, "%d", url->port);
 	} else {
 		serv = url->protocol;
@@ -165,7 +165,7 @@ http_method_invoke (CamelHttpStream *http,
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			"%s", g_strerror (errno));
-		http_disconnect(http);
+		http_disconnect (http);
 		g_free (url);
 		return -1;
 	}
@@ -182,7 +182,7 @@ http_method_invoke (CamelHttpStream *http,
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			"%s", g_strerror (errno));
-		http_disconnect(http);
+		http_disconnect (http);
 		return -1;
 	}
 
@@ -197,14 +197,14 @@ http_method_invoke (CamelHttpStream *http,
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			"%s", g_strerror (errno));
-		http_disconnect(http);
+		http_disconnect (http);
 		return -1;
 	}
 
 	/* end the headers */
 	if (camel_stream_write (http->raw, "\r\n", 2, error) == -1 ||
 		camel_stream_flush (http->raw, error) == -1) {
-		http_disconnect(http);
+		http_disconnect (http);
 		return -1;
 	}
 
@@ -280,7 +280,7 @@ http_get_headers (CamelHttpStream *http,
 	return 0;
 
  exception:
-	http_disconnect(http);
+	http_disconnect (http);
 
 	return -1;
 }
@@ -320,7 +320,7 @@ http_get_statuscode (CamelHttpStream *http,
 		return http->statuscode;
 	}
 
-	http_disconnect(http);
+	http_disconnect (http);
 
 	return -1;
 }
@@ -408,17 +408,17 @@ http_stream_read (CamelStream *stream,
 			return -1;
 
 		if (http_method_invoke (http, error) == -1) {
-			http_disconnect(http);
+			http_disconnect (http);
 			return -1;
 		}
 
 		if (http_get_statuscode (http, error) == -1) {
-			http_disconnect(http);
+			http_disconnect (http);
 			return -1;
 		}
 
 		if (http_get_headers (http, error) == -1) {
-			http_disconnect(http);
+			http_disconnect (http);
 			return -1;
 		}
 
@@ -434,23 +434,23 @@ http_stream_read (CamelStream *stream,
 
 			camel_content_type_unref (http->content_type);
 			http->content_type = NULL;
-			http_disconnect(http);
+			http_disconnect (http);
 
 			loc = g_strdup(camel_header_raw_find(&http->headers, "Location", NULL));
 			if (loc == NULL) {
-				camel_header_raw_clear(&http->headers);
+				camel_header_raw_clear (&http->headers);
 				return -1;
 			}
 
 			/* redirect... */
-			g_strstrip(loc);
+			g_strstrip (loc);
 			d(printf("HTTP redirect, location = %s\n", loc));
-			url = camel_url_new_with_base(http->url, loc);
+			url = camel_url_new_with_base (http->url, loc);
 			camel_url_free (http->url);
 			http->url = url;
 			if (url == NULL)
-				http->url = camel_url_new(loc, NULL);
-			g_free(loc);
+				http->url = camel_url_new (loc, NULL);
+			g_free (loc);
 			if (http->url == NULL) {
 				camel_header_raw_clear (&http->headers);
 				return -1;
@@ -464,7 +464,7 @@ http_stream_read (CamelStream *stream,
 			/* failed proxy authentication? */
 		default:
 			/* unknown error */
-			http_disconnect(http);
+			http_disconnect (http);
 			return -1;
 		}
 	}
@@ -513,7 +513,7 @@ http_stream_close (CamelStream *stream,
 		if (camel_stream_close (http->raw, error) == -1)
 			return -1;
 
-		http_disconnect(http);
+		http_disconnect (http);
 	}
 
 	return 0;
@@ -526,7 +526,7 @@ http_stream_reset (CamelStream *stream,
 	CamelHttpStream *http = CAMEL_HTTP_STREAM (stream);
 
 	if (http->raw)
-		http_disconnect(http);
+		http_disconnect (http);
 
 	return 0;
 }
@@ -568,8 +568,8 @@ camel_http_stream_new (CamelHttpMethod method, struct _CamelSession *session, Ca
 	CamelHttpStream *stream;
 	gchar *str;
 
-	g_return_val_if_fail(CAMEL_IS_SESSION(session), NULL);
-	g_return_val_if_fail(url != NULL, NULL);
+	g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
+	g_return_val_if_fail (url != NULL, NULL);
 
 	stream = g_object_new (CAMEL_TYPE_HTTP_STREAM, NULL);
 
@@ -628,14 +628,14 @@ camel_http_stream_set_proxy (CamelHttpStream *http_stream, const gchar *proxy_ur
 
 		basic = g_strdup_printf("%s:%s", http_stream->proxy->user?http_stream->proxy->user:"",
 					http_stream->proxy->passwd?http_stream->proxy->passwd:"");
-		basic64 = g_base64_encode((const guchar *) basic, strlen(basic));
-		memset(basic, 0, strlen(basic));
-		g_free(basic);
-		camel_http_stream_set_proxy_authpass(http_stream, basic64);
-		memset(basic64, 0, strlen(basic64));
-		g_free(basic64);
+		basic64 = g_base64_encode ((const guchar *) basic, strlen (basic));
+		memset (basic, 0, strlen (basic));
+		g_free (basic);
+		camel_http_stream_set_proxy_authpass (http_stream, basic64);
+		memset (basic64, 0, strlen (basic64));
+		g_free (basic64);
 	} else {
-		camel_http_stream_set_proxy_authpass(http_stream, NULL);
+		camel_http_stream_set_proxy_authpass (http_stream, NULL);
 	}
 }
 
diff --git a/camel/camel-http-stream.h b/camel/camel-http-stream.h
index 2702693..ea92caf 100644
--- a/camel/camel-http-stream.h
+++ b/camel/camel-http-stream.h
@@ -101,7 +101,7 @@ GType		camel_http_stream_get_type	(void);
 CamelStream *	camel_http_stream_new		(CamelHttpMethod method,
 						 struct _CamelSession *session,
 						 CamelURL *url);
-void		camel_http_stream_set_user_agent(CamelHttpStream *http_stream,
+void		camel_http_stream_set_user_agent (CamelHttpStream *http_stream,
 						 const gchar *user_agent);
 void		camel_http_stream_set_proxy	(CamelHttpStream *http_stream,
 						 const gchar *proxy_url);
diff --git a/camel/camel-iconv.c b/camel/camel-iconv.c
index 1eccd8e..a49dd43 100644
--- a/camel/camel-iconv.c
+++ b/camel/camel-iconv.c
@@ -106,7 +106,7 @@ struct {
 	{ "iso8859-1",      "iso-8859-1" },
 	/* the above mostly serves as an example for iso-style charsets,
 	   but we have code that will populate the iso-*'s if/when they
-	   show up in camel_iconv_charset_name() so I'm
+	   show up in camel_iconv_charset_name () so I'm
 	   not going to bother putting them all in here... */
 	{ "windows-cp1251", "cp1251"     },
 	{ "windows-1251",   "cp1251"     },
@@ -114,7 +114,7 @@ struct {
 	/* the above mostly serves as an example for windows-style
 	   charsets, but we have code that will parse and convert them
 	   to their cp#### equivalents if/when they show up in
-	   camel_iconv_charset_name() so I'm not going to bother
+	   camel_iconv_charset_name () so I'm not going to bother
 	   putting them all in here either... */
 #endif
 	/* charset name (lowercase!), iconv-friendly name (sometimes case sensitive) */
@@ -158,14 +158,14 @@ struct {
 /* Another copy of this trivial list implementation
    Why?  This stuff gets called a lot (potentially), should run fast,
    and g_list's are f@@#$ed up to make this a hassle */
-static void camel_dlist_init(CamelDList *v)
+static void camel_dlist_init (CamelDList *v)
 {
         v->head = (CamelDListNode *)&v->tail;
         v->tail = NULL;
         v->tailpred = (CamelDListNode *)&v->head;
 }
 
-static CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
+static CamelDListNode *camel_dlist_addhead (CamelDList *l, CamelDListNode *n)
 {
         n->next = l->head;
         n->prev = (CamelDListNode *)&l->head;
@@ -174,7 +174,7 @@ static CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n)
         return n;
 }
 
-static CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
+static CamelDListNode *camel_dlist_addtail (CamelDList *l, CamelDListNode *n)
 {
         n->next = (CamelDListNode *)&l->tail;
         n->prev = l->tailpred;
@@ -183,7 +183,7 @@ static CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n)
         return n;
 }
 
-static CamelDListNode *camel_dlist_remove(CamelDListNode *n)
+static CamelDListNode *camel_dlist_remove (CamelDListNode *n)
 {
         n->next->prev = n->prev;
         n->prev->next = n->next;
@@ -258,31 +258,31 @@ locale_parse_lang (const gchar *locale)
 
 /* NOTE: Owns the lock on return if keep is TRUE !*/
 static void
-iconv_init(gint keep)
+iconv_init (gint keep)
 {
 	gchar *from, *to, *locale;
 	gint i;
 
-	LOCK();
+	LOCK ();
 
 	if (iconv_charsets != NULL) {
 		if (!keep)
-			UNLOCK();
+			UNLOCK ();
 		return;
 	}
 
-	iconv_charsets = g_hash_table_new(g_str_hash, g_str_equal);
+	iconv_charsets = g_hash_table_new (g_str_hash, g_str_equal);
 
 	for (i = 0; known_iconv_charsets[i].charset != NULL; i++) {
-		from = g_strdup(known_iconv_charsets[i].charset);
-		to = g_strdup(known_iconv_charsets[i].iconv_name);
+		from = g_strdup (known_iconv_charsets[i].charset);
+		to = g_strdup (known_iconv_charsets[i].iconv_name);
 		e_strdown (from);
-		g_hash_table_insert(iconv_charsets, from, to);
+		g_hash_table_insert (iconv_charsets, from, to);
 	}
 
-	camel_dlist_init(&iconv_cache_list);
-	iconv_cache = g_hash_table_new(g_str_hash, g_str_equal);
-	iconv_cache_open = g_hash_table_new(NULL, NULL);
+	camel_dlist_init (&iconv_cache_list);
+	iconv_cache = g_hash_table_new (g_str_hash, g_str_equal);
+	iconv_cache_open = g_hash_table_new (NULL, NULL);
 
 #ifndef G_OS_WIN32
 	locale = setlocale (LC_ALL, NULL);
@@ -340,7 +340,7 @@ iconv_init(gint keep)
 	g_free (locale);
 #endif
 	if (!keep)
-		UNLOCK();
+		UNLOCK ();
 }
 
 const gchar *
@@ -355,10 +355,10 @@ camel_iconv_charset_name (const gchar *charset)
 	strcpy (name, charset);
 	e_strdown (name);
 
-	iconv_init(TRUE);
-	ret = g_hash_table_lookup(iconv_charsets, name);
+	iconv_init (TRUE);
+	ret = g_hash_table_lookup (iconv_charsets, name);
 	if (ret != NULL) {
-		UNLOCK();
+		UNLOCK ();
 		return ret;
 	}
 
@@ -411,17 +411,17 @@ camel_iconv_charset_name (const gchar *charset)
 		ret = g_strdup_printf("CP%s", tmp);
 	} else {
 		/* Just assume its ok enough as is, case and all */
-		ret = g_strdup(charset);
+		ret = g_strdup (charset);
 	}
 
-	g_hash_table_insert(iconv_charsets, g_strdup(name), ret);
-	UNLOCK();
+	g_hash_table_insert (iconv_charsets, g_strdup (name), ret);
+	UNLOCK ();
 
 	return ret;
 }
 
 static void
-flush_entry(struct _iconv_cache *ic)
+flush_entry (struct _iconv_cache *ic)
 {
 	struct _iconv_cache_node *in, *nn;
 
@@ -429,15 +429,15 @@ flush_entry(struct _iconv_cache *ic)
 	nn = in->next;
 	while (nn) {
 		if (in->ip != (iconv_t)-1) {
-			g_hash_table_remove(iconv_cache_open, in->ip);
-			iconv_close(in->ip);
+			g_hash_table_remove (iconv_cache_open, in->ip);
+			iconv_close (in->ip);
 		}
-		g_free(in);
+		g_free (in);
 		in = nn;
 		nn = in->next;
 	}
-	g_free(ic->conv);
-	g_free(ic);
+	g_free (ic->conv);
+	g_free (ic);
 }
 
 /* This should run pretty quick, its called a lot */
@@ -461,11 +461,11 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
 	tofrom = g_alloca (strlen (to) + strlen (from) + 2);
 	sprintf(tofrom, "%s%%%s", to, from);
 
-	LOCK();
+	LOCK ();
 
-	ic = g_hash_table_lookup(iconv_cache, tofrom);
+	ic = g_hash_table_lookup (iconv_cache, tofrom);
 	if (ic) {
-		camel_dlist_remove((CamelDListNode *)ic);
+		camel_dlist_remove ((CamelDListNode *)ic);
 	} else {
 		struct _iconv_cache *last = (struct _iconv_cache *)iconv_cache_list.tailpred;
 		struct _iconv_cache *prev;
@@ -475,9 +475,9 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
 			in = (struct _iconv_cache_node *)last->open.head;
 			if (in->next && !in->busy) {
 				cd(printf("Flushing iconv converter '%s'\n", last->conv));
-				camel_dlist_remove((CamelDListNode *)last);
-				g_hash_table_remove(iconv_cache, last->conv);
-				flush_entry(last);
+				camel_dlist_remove ((CamelDListNode *)last);
+				g_hash_table_remove (iconv_cache, last->conv);
+				flush_entry (last);
 				iconv_cache_size--;
 			}
 			last = prev;
@@ -486,14 +486,14 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
 
 		iconv_cache_size++;
 
-		ic = g_malloc(sizeof(*ic));
-		camel_dlist_init(&ic->open);
-		ic->conv = g_strdup(tofrom);
-		g_hash_table_insert(iconv_cache, ic->conv, ic);
+		ic = g_malloc (sizeof (*ic));
+		camel_dlist_init (&ic->open);
+		ic->conv = g_strdup (tofrom);
+		g_hash_table_insert (iconv_cache, ic->conv, ic);
 
 		cd(printf("Creating iconv converter '%s'\n", ic->conv));
 	}
-	camel_dlist_addhead(&iconv_cache_list, (CamelDListNode *)ic);
+	camel_dlist_addhead (&iconv_cache_list, (CamelDListNode *)ic);
 
 	/* If we have a free iconv, use it */
 	in = (struct _iconv_cache_node *)ic->open.tailpred;
@@ -508,20 +508,20 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
 			gchar *buggy_iconv_buf = NULL;
 
 			/* resets the converter */
-			iconv(ip, &buggy_iconv_buf, &buggy_iconv_len, &buggy_iconv_buf, &buggy_iconv_len);
+			iconv (ip, &buggy_iconv_buf, &buggy_iconv_len, &buggy_iconv_buf, &buggy_iconv_len);
 			in->busy = TRUE;
-			camel_dlist_remove((CamelDListNode *)in);
-			camel_dlist_addhead(&ic->open, (CamelDListNode *)in);
+			camel_dlist_remove ((CamelDListNode *)in);
+			camel_dlist_addhead (&ic->open, (CamelDListNode *)in);
 		}
 	} else {
 		cd(printf("creating new iconv converter '%s'\n", ic->conv));
-		ip = iconv_open(to, from);
-		in = g_malloc(sizeof(*in));
+		ip = iconv_open (to, from);
+		in = g_malloc (sizeof (*in));
 		in->ip = ip;
 		in->parent = ic;
-		camel_dlist_addhead(&ic->open, (CamelDListNode *)in);
+		camel_dlist_addhead (&ic->open, (CamelDListNode *)in);
 		if (ip != (iconv_t)-1) {
-			g_hash_table_insert(iconv_cache_open, ip, in);
+			g_hash_table_insert (iconv_cache_open, ip, in);
 			in->busy = TRUE;
 		} else {
 			errnosav = errno;
@@ -531,7 +531,7 @@ camel_iconv_open (const gchar *oto, const gchar *ofrom)
 		}
 	}
 
-	UNLOCK();
+	UNLOCK ();
 
 	return ip;
 }
@@ -540,7 +540,7 @@ gsize
 camel_iconv (iconv_t cd, const gchar **inbuf, gsize *inbytesleft,
              gchar ** outbuf, gsize *outbytesleft)
 {
-	return iconv(cd, (gchar **) inbuf, inbytesleft, outbuf, outbytesleft);
+	return iconv (cd, (gchar **) inbuf, inbytesleft, outbuf, outbytesleft);
 }
 
 void
@@ -551,25 +551,25 @@ camel_iconv_close (iconv_t ip)
 	if (ip == (iconv_t)-1)
 		return;
 
-	LOCK();
-	in = g_hash_table_lookup(iconv_cache_open, ip);
+	LOCK ();
+	in = g_hash_table_lookup (iconv_cache_open, ip);
 	if (in) {
 		cd(printf("closing iconv converter '%s'\n", in->parent->conv));
-		camel_dlist_remove((CamelDListNode *)in);
+		camel_dlist_remove ((CamelDListNode *)in);
 		in->busy = FALSE;
-		camel_dlist_addtail(&in->parent->open, (CamelDListNode *)in);
+		camel_dlist_addtail (&in->parent->open, (CamelDListNode *)in);
 	} else {
 		g_warning("trying to close iconv i dont know about: %p", ip);
-		iconv_close(ip);
+		iconv_close (ip);
 	}
-	UNLOCK();
+	UNLOCK ();
 
 }
 
 const gchar *
 camel_iconv_locale_charset (void)
 {
-	iconv_init(FALSE);
+	iconv_init (FALSE);
 
 	return locale_charset;
 }
diff --git a/camel/camel-index-control.c b/camel/camel-index-control.c
index 771cba2..cf9dd32 100644
--- a/camel/camel-index-control.c
+++ b/camel/camel-index-control.c
@@ -20,27 +20,27 @@
 #include "camel-object.h"
 #include "camel-text-index.h"
 
-extern gint camel_init(const gchar *certdb_dir, gboolean nss_init);
+extern gint camel_init (const gchar *certdb_dir, gboolean nss_init);
 
 G_GNUC_NORETURN static void
-do_usage(gchar *argv0)
+do_usage (gchar *argv0)
 {
 	fprintf(stderr, "Usage: %s [ compress | dump | info ] file(s) ...\n", argv0);
 	fprintf(stderr, " compress - compress (an) index file(s)\n");
 	fprintf(stderr, " dump - dump (an) index file's content to stdout\n");
 	fprintf(stderr, " info - dump summary info to stdout\n");
-	exit(1);
+	exit (1);
 }
 
 static gint
-do_compress(gint argc, gchar **argv)
+do_compress (gint argc, gchar **argv)
 {
 	gint i;
 	CamelIndex *idx;
 
 	for (i=2;i<argc;i++) {
 		printf("Opening index file: %s\n", argv[i]);
-		idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDWR);
+		idx = (CamelIndex *)camel_text_index_new (argv[i], O_RDWR);
 		if (idx) {
 			printf(" Compressing ...\n");
 			if (camel_index_compress (idx) == -1) {
@@ -57,17 +57,17 @@ do_compress(gint argc, gchar **argv)
 }
 
 static gint
-do_dump(gint argc, gchar **argv)
+do_dump (gint argc, gchar **argv)
 {
 	gint i;
 	CamelIndex *idx;
 
 	for (i=2;i<argc;i++) {
 		printf("Opening index file: %s\n", argv[i]);
-		idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
+		idx = (CamelIndex *)camel_text_index_new (argv[i], O_RDONLY);
 		if (idx) {
 			printf(" Dumping ...\n");
-			camel_text_index_dump((CamelTextIndex *)idx);
+			camel_text_index_dump ((CamelTextIndex *)idx);
 			g_object_unref (idx);
 		} else {
 			printf(" Failed: %s\n", g_strerror (errno));
@@ -78,16 +78,16 @@ do_dump(gint argc, gchar **argv)
 }
 
 static gint
-do_info(gint argc, gchar **argv)
+do_info (gint argc, gchar **argv)
 {
 	gint i;
 	CamelIndex *idx;
 
 	for (i=2;i<argc;i++) {
 		printf("Opening index file: %s\n", argv[i]);
-		idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
+		idx = (CamelIndex *)camel_text_index_new (argv[i], O_RDONLY);
 		if (idx) {
-			camel_text_index_info((CamelTextIndex *)idx);
+			camel_text_index_info ((CamelTextIndex *)idx);
 			g_object_unref (idx);
 		} else {
 			printf(" Failed: %s\n", g_strerror (errno));
@@ -98,16 +98,16 @@ do_info(gint argc, gchar **argv)
 }
 
 static gint
-do_check(gint argc, gchar **argv)
+do_check (gint argc, gchar **argv)
 {
 	gint i;
 	CamelIndex *idx;
 
 	for (i=2;i<argc;i++) {
 		printf("Opening index file: %s\n", argv[i]);
-		idx = (CamelIndex *)camel_text_index_new(argv[i], O_RDONLY);
+		idx = (CamelIndex *)camel_text_index_new (argv[i], O_RDONLY);
 		if (idx) {
-			camel_text_index_validate((CamelTextIndex *)idx);
+			camel_text_index_validate ((CamelTextIndex *)idx);
 			g_object_unref (idx);
 		} else {
 			printf(" Failed: %s\n", g_strerror (errno));
@@ -117,28 +117,28 @@ do_check(gint argc, gchar **argv)
 	return 1;
 }
 
-static gint do_perf(gint argc, gchar **argv);
+static gint do_perf (gint argc, gchar **argv);
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	if (argc<2)
-		do_usage(argv[0]);
+		do_usage (argv[0]);
 
-	g_thread_init(NULL);
-	camel_init(NULL, 0);
+	g_thread_init (NULL);
+	camel_init (NULL, 0);
 
 	if (!strcmp(argv[1], "compress"))
-		return do_compress(argc, argv);
+		return do_compress (argc, argv);
 	else if (!strcmp(argv[1], "dump"))
-		return do_dump(argc, argv);
+		return do_dump (argc, argv);
 	else if (!strcmp(argv[1], "info"))
-		return do_info(argc, argv);
+		return do_info (argc, argv);
 	else if (!strcmp(argv[1], "check"))
-		return do_check(argc, argv);
+		return do_check (argc, argv);
 	else if (!strcmp(argv[1], "perf"))
-		return do_perf(argc, argv);
+		return do_perf (argc, argv);
 
-	do_usage(argv[0]);
+	do_usage (argv[0]);
 	return 1;
 }
 
@@ -150,7 +150,7 @@ gint main(gint argc, gchar **argv)
 #include "camel-stream-fs.h"
 
 static gint
-do_perf(gint argc, gchar **argv)
+do_perf (gint argc, gchar **argv)
 {
 	CamelIndex *idx;
 	DIR *dir;
@@ -161,7 +161,7 @@ do_perf(gint argc, gchar **argv)
 	gchar *name;
 	CamelIndexName *idn;
 
-	dir = opendir(path);
+	dir = opendir (path);
 	if (dir == NULL) {
 		perror("open dir");
 		return 1;
@@ -171,37 +171,37 @@ do_perf(gint argc, gchar **argv)
 		"/tmp/index", O_TRUNC|O_CREAT|O_RDWR);
 	if (idx == NULL) {
 		perror("open index");
-		closedir(dir);
+		closedir (dir);
 		return 1;
 	}
 
-	null = camel_stream_null_new();
+	null = camel_stream_null_new ();
 	filter = camel_stream_filter_new (null);
 	g_object_unref (null);
 	filter_index = camel_mime_filter_index_new (idx);
-	camel_stream_filter_add((CamelStreamFilter *)filter, filter_index);
+	camel_stream_filter_add ((CamelStreamFilter *)filter, filter_index);
 
-	while ((d = readdir(dir))) {
+	while ((d = readdir (dir))) {
 		printf("indexing '%s'\n", d->d_name);
 
-		idn = camel_index_add_name(idx, d->d_name);
+		idn = camel_index_add_name (idx, d->d_name);
 		camel_mime_filter_index_set_name (
 			CAMEL_MIME_FILTER_INDEX (filter_index), idn);
 		name = g_strdup_printf("%s/%s", path, d->d_name);
-		stream = camel_stream_fs_new_with_name(name, O_RDONLY, 0, NULL);
-		camel_stream_write_to_stream(stream, filter, NULL);
+		stream = camel_stream_fs_new_with_name (name, O_RDONLY, 0, NULL);
+		camel_stream_write_to_stream (stream, filter, NULL);
 		g_object_unref (stream);
-		g_free(name);
+		g_free (name);
 
-		camel_index_write_name(idx, idn);
+		camel_index_write_name (idx, idn);
 		g_object_unref (idn);
 		camel_mime_filter_index_set_name (
 			CAMEL_MIME_FILTER_INDEX (filter_index), NULL);
 	}
 
-	closedir(dir);
+	closedir (dir);
 
-	camel_index_sync(idx);
+	camel_index_sync (idx);
 	g_object_unref (idx);
 
 	g_object_unref (filter);
diff --git a/camel/camel-index.h b/camel/camel-index.h
index 3ca7249..2bd0439 100644
--- a/camel/camel-index.h
+++ b/camel/camel-index.h
@@ -114,12 +114,12 @@ struct _CamelIndexCursorClass {
 	void         (*reset) (CamelIndexCursor *idc);
 };
 
-GType           camel_index_cursor_get_type(void);
+GType           camel_index_cursor_get_type (void);
 
-CamelIndexCursor  *camel_index_cursor_new(CamelIndex *index, const gchar *name);
+CamelIndexCursor  *camel_index_cursor_new (CamelIndex *index, const gchar *name);
 
-const gchar        *camel_index_cursor_next(CamelIndexCursor *idc);
-void               camel_index_cursor_reset(CamelIndexCursor *idc);
+const gchar        *camel_index_cursor_next (CamelIndexCursor *idc);
+void               camel_index_cursor_reset (CamelIndexCursor *idc);
 
 /* ********************************************************************** */
 
@@ -145,10 +145,10 @@ struct _CamelIndexNameClass {
 
 GType           camel_index_name_get_type	(void);
 
-CamelIndexName    *camel_index_name_new(CamelIndex *index, const gchar *name);
+CamelIndexName    *camel_index_name_new (CamelIndex *index, const gchar *name);
 
-void               camel_index_name_add_word(CamelIndexName *name, const gchar *word);
-gsize             camel_index_name_add_buffer(CamelIndexName *name, const gchar *buffer, gsize len);
+void               camel_index_name_add_word (CamelIndexName *name, const gchar *word);
+gsize             camel_index_name_add_buffer (CamelIndexName *name, const gchar *buffer, gsize len);
 
 /* ********************************************************************** */
 
diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c
index 5518231..9db2361 100644
--- a/camel/camel-internet-address.c
+++ b/camel/camel-internet-address.c
@@ -40,24 +40,24 @@ internet_address_decode (CamelAddress *a, const gchar *raw)
 	gint count = a->addresses->len;
 
 	/* Should probably use its own decoder or something */
-	ha = camel_header_address_decode(raw, NULL);
+	ha = camel_header_address_decode (raw, NULL);
 	if (ha) {
 		n = ha;
 		while (n) {
 			if (n->type == CAMEL_HEADER_ADDRESS_NAME) {
-				camel_internet_address_add((CamelInternetAddress *)a, n->name, n->v.addr);
+				camel_internet_address_add ((CamelInternetAddress *)a, n->name, n->v.addr);
 			} else if (n->type == CAMEL_HEADER_ADDRESS_GROUP) {
 				struct _camel_header_address *g = n->v.members;
 				while (g) {
 					if (g->type == CAMEL_HEADER_ADDRESS_NAME)
-						camel_internet_address_add((CamelInternetAddress *)a, g->name, g->v.addr);
+						camel_internet_address_add ((CamelInternetAddress *)a, g->name, g->v.addr);
 					/* otherwise, it's an error, infact */
 					g = g->next;
 				}
 			}
 			n = n->next;
 		}
-		camel_header_address_list_clear(&ha);
+		camel_header_address_list_clear (&ha);
 	}
 
 	return a->addresses->len - count;
@@ -77,25 +77,25 @@ internet_address_encode (CamelAddress *a)
 	out = g_string_new("");
 
 	for (i = 0;i < a->addresses->len; i++) {
-		struct _address *addr = g_ptr_array_index(a->addresses, i);
+		struct _address *addr = g_ptr_array_index (a->addresses, i);
 		gchar *enc;
 
 		if (i != 0)
 			g_string_append(out, ", ");
 
-		enc = camel_internet_address_encode_address(&len, addr->name, addr->address);
-		g_string_append(out, enc);
-		g_free(enc);
+		enc = camel_internet_address_encode_address (&len, addr->name, addr->address);
+		g_string_append (out, enc);
+		g_free (enc);
 	}
 
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return ret;
 }
 
 static gint
-internet_address_unformat(CamelAddress *a, const gchar *raw)
+internet_address_unformat (CamelAddress *a, const gchar *raw)
 {
 	gchar *buffer, *p, *name, *addr;
 	gint c;
@@ -107,7 +107,7 @@ internet_address_unformat(CamelAddress *a, const gchar *raw)
 	d(printf("unformatting address: %s\n", raw));
 
 	/* we copy, so we can modify as we go */
-	buffer = g_strdup(raw);
+	buffer = g_strdup (raw);
 
 	/* this can be simpler than decode, since there are much fewer rules */
 	p = buffer;
@@ -143,11 +143,11 @@ internet_address_unformat(CamelAddress *a, const gchar *raw)
 			/* falls through */
 		case 0:
 			if (name)
-				name = g_strstrip(name);
-			addr = g_strstrip(addr);
+				name = g_strstrip (name);
+			addr = g_strstrip (addr);
 			if (addr[0]) {
 				d(printf("found address: '%s' <%s>\n", name, addr));
-				camel_internet_address_add((CamelInternetAddress *)a, name, addr);
+				camel_internet_address_add ((CamelInternetAddress *)a, name, addr);
 			}
 			name = NULL;
 			addr = p;
@@ -155,7 +155,7 @@ internet_address_unformat(CamelAddress *a, const gchar *raw)
 		}
 	} while (c);
 
-	g_free(buffer);
+	g_free (buffer);
 
 	return a->addresses->len - count;
 }
@@ -173,19 +173,19 @@ internet_address_format (CamelAddress *a)
 	out = g_string_new("");
 
 	for (i = 0;i < a->addresses->len; i++) {
-		struct _address *addr = g_ptr_array_index(a->addresses, i);
+		struct _address *addr = g_ptr_array_index (a->addresses, i);
 		gchar *enc;
 
 		if (i != 0)
 			g_string_append(out, ", ");
 
-		enc = camel_internet_address_format_address(addr->name, addr->address);
-		g_string_append(out, enc);
-		g_free(enc);
+		enc = camel_internet_address_format_address (addr->name, addr->address);
+		g_string_append (out, enc);
+		g_free (enc);
 	}
 
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return ret;
 }
@@ -198,11 +198,11 @@ internet_address_remove (CamelAddress *a, gint index)
 	if (index < 0 || index >= a->addresses->len)
 		return;
 
-	addr = g_ptr_array_index(a->addresses, index);
-	g_free(addr->name);
-	g_free(addr->address);
-	g_free(addr);
-	g_ptr_array_remove_index(a->addresses, index);
+	addr = g_ptr_array_index (a->addresses, index);
+	g_free (addr->name);
+	g_free (addr->address);
+	g_free (addr);
+	g_ptr_array_remove_index (a->addresses, index);
 }
 
 static gint
@@ -210,11 +210,11 @@ internet_address_cat (CamelAddress *dest, CamelAddress *source)
 {
 	gint i;
 
-	g_assert(CAMEL_IS_INTERNET_ADDRESS(source));
+	g_assert (CAMEL_IS_INTERNET_ADDRESS (source));
 
 	for (i=0;i<source->addresses->len;i++) {
-		struct _address *addr = g_ptr_array_index(source->addresses, i);
-		camel_internet_address_add((CamelInternetAddress *)dest, addr->name, addr->address);
+		struct _address *addr = g_ptr_array_index (source->addresses, i);
+		camel_internet_address_add ((CamelInternetAddress *)dest, addr->name, addr->address);
 	}
 
 	return i;
@@ -268,13 +268,13 @@ camel_internet_address_add (CamelInternetAddress *addr, const gchar *name, const
 	struct _address *new;
 	gint index;
 
-	g_assert(CAMEL_IS_INTERNET_ADDRESS(addr));
+	g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
 
-	new = g_malloc(sizeof(*new));
-	new->name = g_strdup(name);
-	new->address = g_strdup(address);
+	new = g_malloc (sizeof (*new));
+	new->name = g_strdup (name);
+	new->address = g_strdup (address);
 	index = ((CamelAddress *)addr)->addresses->len;
-	g_ptr_array_add(((CamelAddress *)addr)->addresses, new);
+	g_ptr_array_add (((CamelAddress *)addr)->addresses, new);
 
 	return index;
 }
@@ -295,7 +295,7 @@ camel_internet_address_get (CamelInternetAddress *addr, gint index, const gchar
 {
 	struct _address *a;
 
-	g_assert(CAMEL_IS_INTERNET_ADDRESS(addr));
+	g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
 
 	if (index < 0 || index >= ((CamelAddress *)addr)->addresses->len)
 		return FALSE;
@@ -320,17 +320,17 @@ camel_internet_address_get (CamelInternetAddress *addr, gint index, const gchar
  * match was found
  **/
 gint
-camel_internet_address_find_name(CamelInternetAddress *addr, const gchar *name, const gchar **addressp)
+camel_internet_address_find_name (CamelInternetAddress *addr, const gchar *name, const gchar **addressp)
 {
 	struct _address *a;
 	gint i, len;
 
-	g_assert(CAMEL_IS_INTERNET_ADDRESS(addr));
+	g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
 
 	len = ((CamelAddress *)addr)->addresses->len;
 	for (i=0;i<len;i++) {
 		a = g_ptr_array_index (((CamelAddress *)addr)->addresses, i);
-		if (a->name && !strcmp(a->name, name)) {
+		if (a->name && !strcmp (a->name, name)) {
 			if (addressp)
 				*addressp = a->address;
 			return i;
@@ -350,17 +350,17 @@ camel_internet_address_find_name(CamelInternetAddress *addr, const gchar *name,
  * Returns: the index of the address, or %-1 if not found
  **/
 gint
-camel_internet_address_find_address(CamelInternetAddress *addr, const gchar *address, const gchar **namep)
+camel_internet_address_find_address (CamelInternetAddress *addr, const gchar *address, const gchar **namep)
 {
 	struct _address *a;
 	gint i, len;
 
-	g_assert(CAMEL_IS_INTERNET_ADDRESS(addr));
+	g_assert (CAMEL_IS_INTERNET_ADDRESS (addr));
 
 	len = ((CamelAddress *)addr)->addresses->len;
 	for (i=0;i<len;i++) {
 		a = g_ptr_array_index (((CamelAddress *)addr)->addresses, i);
-		if (!strcmp(a->address, address)) {
+		if (!strcmp (a->address, address)) {
 			if (namep)
 				*namep = a->name;
 			return i;
@@ -370,11 +370,11 @@ camel_internet_address_find_address(CamelInternetAddress *addr, const gchar *add
 }
 
 static void
-cia_encode_addrspec(GString *out, const gchar *addr)
+cia_encode_addrspec (GString *out, const gchar *addr)
 {
 	const gchar *at, *p;
 
-	at = strchr(addr, '@');
+	at = strchr (addr, '@');
 	if (at == NULL)
 		goto append;
 
@@ -385,25 +385,25 @@ cia_encode_addrspec(GString *out, const gchar *addr)
 		/* strictly by rfc, we should split local parts on dots.
 		   however i think 2822 changes this, and not many clients grok it, so
 		   just quote the whole local part if need be */
-		if (!(camel_mime_is_atom(c) || c=='.')) {
-			g_string_append_c(out, '"');
+		if (!(camel_mime_is_atom (c) || c=='.')) {
+			g_string_append_c (out, '"');
 
 			p = addr;
 			while (p < at) {
 				c = *p++;
 				if (c == '"' || c == '\\')
-					g_string_append_c(out, '\\');
-				g_string_append_c(out, c);
+					g_string_append_c (out, '\\');
+				g_string_append_c (out, c);
 			}
-			g_string_append_c(out, '"');
-			g_string_append(out, p);
+			g_string_append_c (out, '"');
+			g_string_append (out, p);
 
 			return;
 		}
 	}
 
 append:
-	g_string_append(out, addr);
+	g_string_append (out, addr);
 }
 
 /**
@@ -421,32 +421,32 @@ append:
  * Returns: the encoded address
  **/
 gchar *
-camel_internet_address_encode_address(gint *inlen, const gchar *real, const gchar *addr)
+camel_internet_address_encode_address (gint *inlen, const gchar *real, const gchar *addr)
 {
 	gchar *name = camel_header_encode_phrase ((const guchar *) real);
 	gchar *ret = NULL;
 	gint len = 0;
 	GString *out = g_string_new("");
 
-	g_assert(addr);
+	g_assert (addr);
 
 	if (inlen != NULL)
 		len = *inlen;
 
 	if (name && name[0]) {
-		if (inlen != NULL && (strlen(name) + len) > CAMEL_FOLD_SIZE) {
-			gchar *folded = camel_header_address_fold(name, len);
+		if (inlen != NULL && (strlen (name) + len) > CAMEL_FOLD_SIZE) {
+			gchar *folded = camel_header_address_fold (name, len);
 			gchar *last;
-			g_string_append(out, folded);
-			g_free(folded);
-			last = strrchr(out->str, '\n');
+			g_string_append (out, folded);
+			g_free (folded);
+			last = strrchr (out->str, '\n');
 			if (last)
 				len = last-(out->str+out->len);
 			else
 				len = out->len;
 		} else {
-			g_string_append(out, name);
-			len += strlen(name);
+			g_string_append (out, name);
+			len += strlen (name);
 		}
 	}
 
@@ -455,7 +455,7 @@ camel_internet_address_encode_address(gint *inlen, const gchar *real, const gcha
 	 * boundaries - however, to aid interoperability with mailers
 	 * that will probably not handle this case, we will just move
 	 * the whole address to its own line. */
-	if (inlen != NULL && (strlen(addr) + len) > CAMEL_FOLD_SIZE) {
+	if (inlen != NULL && (strlen (addr) + len) > CAMEL_FOLD_SIZE) {
 		g_string_append(out, "\n\t");
 		len = 1;
 	}
@@ -464,7 +464,7 @@ camel_internet_address_encode_address(gint *inlen, const gchar *real, const gcha
 
 	if (name && name[0])
 		g_string_append_printf(out, " <");
-	cia_encode_addrspec(out, addr);
+	cia_encode_addrspec (out, addr);
 	if (name && name[0])
 		g_string_append_printf(out, ">");
 
@@ -473,10 +473,10 @@ camel_internet_address_encode_address(gint *inlen, const gchar *real, const gcha
 	if (inlen != NULL)
 		*inlen = len;
 
-	g_free(name);
+	g_free (name);
 
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return ret;
 }
@@ -491,11 +491,11 @@ camel_internet_address_encode_address(gint *inlen, const gchar *real, const gcha
  * Returns: a nicely formatted string containing the rfc822 address
  **/
 gchar *
-camel_internet_address_format_address(const gchar *name, const gchar *addr)
+camel_internet_address_format_address (const gchar *name, const gchar *addr)
 {
 	gchar *ret = NULL;
 
-	g_assert(addr);
+	g_assert (addr);
 
 	if (name && name[0]) {
 		const gchar *p = name;
@@ -503,7 +503,7 @@ camel_internet_address_format_address(const gchar *name, const gchar *addr)
 
 		while ((c = *p++)) {
 			if (c == '\"' || c == ',') {
-				o = ret = g_malloc(strlen(name)+3+strlen(addr)+3 + 1);
+				o = ret = g_malloc (strlen (name)+3+strlen (addr)+3 + 1);
 				p = name;
 				*o++ = '\"';
 				while ((c = *p++))
@@ -517,7 +517,7 @@ camel_internet_address_format_address(const gchar *name, const gchar *addr)
 		}
 		ret = g_strdup_printf("%s <%s>", name, addr);
 	} else
-		ret = g_strdup(addr);
+		ret = g_strdup (addr);
 
 	return ret;
 }
diff --git a/camel/camel-internet-address.h b/camel/camel-internet-address.h
index 60d3e2c..286e3cb 100644
--- a/camel/camel-internet-address.h
+++ b/camel/camel-internet-address.h
@@ -72,7 +72,7 @@ gboolean	camel_internet_address_get	(CamelInternetAddress *addr,
 						 gint index,
 						 const gchar **namep,
 						 const gchar **addressp);
-gint		camel_internet_address_find_name(CamelInternetAddress *addr,
+gint		camel_internet_address_find_name (CamelInternetAddress *addr,
 						 const gchar *name,
 						 const gchar **addressp);
 gint		camel_internet_address_find_address
diff --git a/camel/camel-list-utils.h b/camel/camel-list-utils.h
index d04ac25..5ecdde7 100644
--- a/camel/camel-list-utils.h
+++ b/camel/camel-list-utils.h
@@ -78,14 +78,14 @@ struct _CamelDList {
 
 #define CAMEL_DLIST_INITIALISER(l) { (CamelDListNode *)&l.tail, NULL, (CamelDListNode *)&l.head }
 
-void camel_dlist_init(CamelDList *v);
-CamelDListNode *camel_dlist_addhead(CamelDList *l, CamelDListNode *n);
-CamelDListNode *camel_dlist_addtail(CamelDList *l, CamelDListNode *n);
-CamelDListNode *camel_dlist_remove(CamelDListNode *n);
-CamelDListNode *camel_dlist_remhead(CamelDList *l);
-CamelDListNode *camel_dlist_remtail(CamelDList *l);
-gint camel_dlist_empty(CamelDList *l);
-gint camel_dlist_length(CamelDList *l);
+void camel_dlist_init (CamelDList *v);
+CamelDListNode *camel_dlist_addhead (CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_addtail (CamelDList *l, CamelDListNode *n);
+CamelDListNode *camel_dlist_remove (CamelDListNode *n);
+CamelDListNode *camel_dlist_remhead (CamelDList *l);
+CamelDListNode *camel_dlist_remtail (CamelDList *l);
+gint camel_dlist_empty (CamelDList *l);
+gint camel_dlist_length (CamelDList *l);
 
 /* This is provided mostly for orthogonality with the dlist structure.
  * By making the nodes contain all of the data themselves it
@@ -122,14 +122,14 @@ struct _CamelSList {
 
 #define CAMEL_SLIST_INITIALISER(l) { 0 }
 
-void camel_slist_init(CamelSList *l);
-CamelSListNode *camel_slist_addhead(CamelSList *l, CamelSListNode *n);
-CamelSListNode *camel_slist_addtail(CamelSList *l, CamelSListNode *n);
-CamelSListNode *camel_slist_remove(CamelSList *l, CamelSListNode *n);
-CamelSListNode *camel_slist_remhead(CamelSList *l);
-CamelSListNode *camel_slist_remtail(CamelSList *l);
-gint camel_slist_empty(CamelSList *l);
-gint camel_slist_length(CamelSList *l);
+void camel_slist_init (CamelSList *l);
+CamelSListNode *camel_slist_addhead (CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_addtail (CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remove (CamelSList *l, CamelSListNode *n);
+CamelSListNode *camel_slist_remhead (CamelSList *l);
+CamelSListNode *camel_slist_remtail (CamelSList *l);
+gint camel_slist_empty (CamelSList *l);
+gint camel_slist_length (CamelSList *l);
 
 G_END_DECLS
 
diff --git a/camel/camel-lock-client.c b/camel/camel-lock-client.c
index b669b82..8b4359e 100644
--- a/camel/camel-lock-client.c
+++ b/camel/camel-lock-client.c
@@ -51,13 +51,13 @@ static gint lock_sequence;
 static gint lock_helper_pid = -1;
 static gint lock_stdin_pipe[2], lock_stdout_pipe[2];
 
-static gint read_n(gint fd, gpointer buffer, gint inlen)
+static gint read_n (gint fd, gpointer buffer, gint inlen)
 {
 	gchar *p = buffer;
 	gint len, left = inlen;
 
 	do {
-		len = read(fd, p, left);
+		len = read (fd, p, left);
 		if (len == -1) {
 			if (errno != EINTR)
 				return -1;
@@ -70,13 +70,13 @@ static gint read_n(gint fd, gpointer buffer, gint inlen)
 	return inlen - left;
 }
 
-static gint write_n(gint fd, gpointer buffer, gint inlen)
+static gint write_n (gint fd, gpointer buffer, gint inlen)
 {
 	gchar *p = buffer;
 	gint len, left = inlen;
 
 	do {
-		len = write(fd, p, left);
+		len = write (fd, p, left);
 		if (len == -1) {
 			if (errno != EINTR)
 				return -1;
@@ -98,32 +98,32 @@ lock_helper_init (GError **error)
 	lock_stdin_pipe[1] = -1;
 	lock_stdout_pipe[0] = -1;
 	lock_stdout_pipe[1] = -1;
-	if (pipe(lock_stdin_pipe) == -1
-	    || pipe(lock_stdout_pipe) == -1) {
+	if (pipe (lock_stdin_pipe) == -1
+	    || pipe (lock_stdout_pipe) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Cannot build locking helper pipe: %s"),
 			g_strerror (errno));
 		if (lock_stdin_pipe[0] != -1)
-			close(lock_stdin_pipe[0]);
+			close (lock_stdin_pipe[0]);
 		if (lock_stdin_pipe[1] != -1)
-			close(lock_stdin_pipe[1]);
+			close (lock_stdin_pipe[1]);
 		if (lock_stdout_pipe[0] != -1)
-			close(lock_stdout_pipe[0]);
+			close (lock_stdout_pipe[0]);
 		if (lock_stdout_pipe[1] != -1)
-			close(lock_stdout_pipe[1]);
+			close (lock_stdout_pipe[1]);
 
 		return -1;
 	}
 
-	lock_helper_pid = fork();
+	lock_helper_pid = fork ();
 	switch (lock_helper_pid) {
 	case -1:
-		close(lock_stdin_pipe[0]);
-		close(lock_stdin_pipe[1]);
-		close(lock_stdout_pipe[0]);
-		close(lock_stdout_pipe[1]);
+		close (lock_stdin_pipe[0]);
+		close (lock_stdin_pipe[1]);
+		close (lock_stdout_pipe[0]);
+		close (lock_stdout_pipe[1]);
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -131,26 +131,26 @@ lock_helper_init (GError **error)
 			g_strerror (errno));
 		return -1;
 	case 0:
-		close(STDIN_FILENO);
-		dup(lock_stdin_pipe[0]);
-		close(STDOUT_FILENO);
-		dup(lock_stdout_pipe[1]);
-		close(lock_stdin_pipe[0]);
-		close(lock_stdin_pipe[1]);
-		close(lock_stdout_pipe[0]);
-		close(lock_stdout_pipe[1]);
+		close (STDIN_FILENO);
+		dup (lock_stdin_pipe[0]);
+		close (STDOUT_FILENO);
+		dup (lock_stdout_pipe[1]);
+		close (lock_stdin_pipe[0]);
+		close (lock_stdin_pipe[1]);
+		close (lock_stdout_pipe[0]);
+		close (lock_stdout_pipe[1]);
 		for (i=3;i<255;i++)
-			     close(i);
+			     close (i);
 		execl(CAMEL_LIBEXECDIR "/camel-lock-helper-" API_VERSION, "camel-lock-helper", NULL);
 		/* it'll pick this up when it tries to use us */
-		exit(255);
+		exit (255);
 	default:
-		close(lock_stdin_pipe[0]);
-		close(lock_stdout_pipe[1]);
+		close (lock_stdin_pipe[0]);
+		close (lock_stdout_pipe[1]);
 
 		/* so the child knows when we vanish */
-		fcntl(lock_stdin_pipe[1], F_SETFD, FD_CLOEXEC);
-		fcntl(lock_stdout_pipe[0], F_SETFD, FD_CLOEXEC);
+		fcntl (lock_stdin_pipe[1], F_SETFD, FD_CLOEXEC);
+		fcntl (lock_stdout_pipe[0], F_SETFD, FD_CLOEXEC);
 	}
 
 	return 0;
@@ -161,40 +161,40 @@ camel_lock_helper_lock (const gchar *path,
                         GError **error)
 {
 	struct _CamelLockHelperMsg *msg;
-	gint len = strlen(path);
+	gint len = strlen (path);
 	gint res = -1;
 	gint retry = 3;
 
-	LOCK();
+	LOCK ();
 
 	if (lock_helper_pid == -1) {
-		if (lock_helper_init(error) == -1) {
-			UNLOCK();
+		if (lock_helper_init (error) == -1) {
+			UNLOCK ();
 			return -1;
 		}
 	}
 
-	msg = alloca(len + sizeof(*msg));
+	msg = alloca (len + sizeof (*msg));
 again:
 	msg->magic = CAMEL_LOCK_HELPER_MAGIC;
 	msg->seq = lock_sequence;
 	msg->id = CAMEL_LOCK_HELPER_LOCK;
 	msg->data = len;
-	memcpy(msg+1, path, len);
+	memcpy (msg+1, path, len);
 
-	write_n(lock_stdin_pipe[1], msg, len+sizeof(*msg));
+	write_n (lock_stdin_pipe[1], msg, len+sizeof (*msg));
 
 	do {
 		/* should also have a timeout here?  cancellation? */
-		len = read_n(lock_stdout_pipe[0], msg, sizeof(*msg));
+		len = read_n (lock_stdout_pipe[0], msg, sizeof (*msg));
 		if (len == 0) {
 			/* child quit, do we try ressurect it? */
 			res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
 			/* if the child exited, this should get it, waidpid returns 0 if the child hasn't */
-			if (waitpid(lock_helper_pid, NULL, WNOHANG) > 0) {
+			if (waitpid (lock_helper_pid, NULL, WNOHANG) > 0) {
 				lock_helper_pid = -1;
-				close(lock_stdout_pipe[0]);
-				close(lock_stdin_pipe[1]);
+				close (lock_stdout_pipe[0]);
+				close (lock_stdin_pipe[1]);
 				lock_stdout_pipe[0] = -1;
 				lock_stdin_pipe[1] = -1;
 			}
@@ -243,12 +243,12 @@ again:
 fail:
 	lock_sequence++;
 
-	UNLOCK();
+	UNLOCK ();
 
 	return res;
 }
 
-gint camel_lock_helper_unlock(gint lockid)
+gint camel_lock_helper_unlock (gint lockid)
 {
 	struct _CamelLockHelperMsg *msg;
 	gint res = -1;
@@ -257,33 +257,33 @@ gint camel_lock_helper_unlock(gint lockid)
 
 	d(printf("unlocking lock id %d\n", lockid));
 
-	LOCK();
+	LOCK ();
 
 	/* impossible to unlock if we haven't locked yet */
 	if (lock_helper_pid == -1) {
-		UNLOCK();
+		UNLOCK ();
 		return -1;
 	}
 
-	msg = alloca(sizeof(*msg));
+	msg = alloca (sizeof (*msg));
 again:
 	msg->magic = CAMEL_LOCK_HELPER_MAGIC;
 	msg->seq = lock_sequence;
 	msg->id = CAMEL_LOCK_HELPER_UNLOCK;
 	msg->data = lockid;
 
-	write_n(lock_stdin_pipe[1], msg, sizeof(*msg));
+	write_n (lock_stdin_pipe[1], msg, sizeof (*msg));
 
 	do {
 		/* should also have a timeout here?  cancellation? */
-		len = read_n(lock_stdout_pipe[0], msg, sizeof(*msg));
+		len = read_n (lock_stdout_pipe[0], msg, sizeof (*msg));
 		if (len == 0) {
 			/* child quit, do we try ressurect it? */
 			res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
-			if (waitpid(lock_helper_pid, NULL, WNOHANG) > 0) {
+			if (waitpid (lock_helper_pid, NULL, WNOHANG) > 0) {
 				lock_helper_pid = -1;
-				close(lock_stdout_pipe[0]);
-				close(lock_stdin_pipe[1]);
+				close (lock_stdout_pipe[0]);
+				close (lock_stdin_pipe[1]);
 				lock_stdout_pipe[0] = -1;
 				lock_stdin_pipe[1] = -1;
 			}
@@ -316,32 +316,32 @@ again:
 fail:
 	lock_sequence++;
 
-	UNLOCK();
+	UNLOCK ();
 
 	return res;
 }
 
 #if 0
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	gint id1, id2;
 
 	d(printf("locking started\n"));
-	lock_helper_init();
+	lock_helper_init ();
 
 	id1 = camel_lock_helper_lock("1 path 1");
 	if (id1 != -1) {
 		d(printf("lock ok, unlock\n"));
-		camel_lock_helper_unlock(id1);
+		camel_lock_helper_unlock (id1);
 	}
 
 	id1 = camel_lock_helper_lock("2 path 1");
 	id2 = camel_lock_helper_lock("2 path 2");
-	camel_lock_helper_unlock(id2);
-	camel_lock_helper_unlock(id1);
+	camel_lock_helper_unlock (id2);
+	camel_lock_helper_unlock (id1);
 
 	id1 = camel_lock_helper_lock("3 path 1");
 	id2 = camel_lock_helper_lock("3 path 2");
-	camel_lock_helper_unlock(id1);
+	camel_lock_helper_unlock (id1);
 }
 #endif
diff --git a/camel/camel-lock-client.h b/camel/camel-lock-client.h
index bd3da9b..09af9de 100644
--- a/camel/camel-lock-client.h
+++ b/camel/camel-lock-client.h
@@ -32,8 +32,8 @@
 
 G_BEGIN_DECLS
 
-gint camel_lock_helper_lock(const gchar *path , GError **error);
-gint camel_lock_helper_unlock(gint lockid);
+gint camel_lock_helper_lock (const gchar *path , GError **error);
+gint camel_lock_helper_unlock (gint lockid);
 
 G_END_DECLS
 
diff --git a/camel/camel-lock-helper.c b/camel/camel-lock-helper.c
index 48f8b4f..5744dc6 100644
--- a/camel/camel-lock-helper.c
+++ b/camel/camel-lock-helper.c
@@ -62,13 +62,13 @@ static uid_t lock_real_uid = -1;
 
 /* utility functions */
 
-static gint read_n(gint fd, gpointer buffer, gint inlen)
+static gint read_n (gint fd, gpointer buffer, gint inlen)
 {
 	gchar *p = buffer;
 	gint len, left = inlen;
 
 	do {
-		len = read(fd, p, left);
+		len = read (fd, p, left);
 		if (len == -1) {
 			if (errno != EINTR)
 				return -1;
@@ -81,13 +81,13 @@ static gint read_n(gint fd, gpointer buffer, gint inlen)
 	return inlen - left;
 }
 
-static gint write_n(gint fd, gpointer buffer, gint inlen)
+static gint write_n (gint fd, gpointer buffer, gint inlen)
 {
 	gchar *p = buffer;
 	gint len, left = inlen;
 
 	do {
-		len = write(fd, p, left);
+		len = write (fd, p, left);
 		if (len == -1) {
 			if (errno != EINTR)
 				return -1;
@@ -108,7 +108,7 @@ gettext (const gchar *msgid)
 	return NULL;
 }
 
-static gint lock_path(const gchar *path, guint32 *lockid)
+static gint lock_path (const gchar *path, guint32 *lockid)
 {
 	struct _lock_info *info = NULL;
 	gint res = CAMEL_LOCK_HELPER_STATUS_OK;
@@ -120,7 +120,7 @@ static gint lock_path(const gchar *path, guint32 *lockid)
 	/* we could also error i suppose, but why bother */
 	info = lock_info_list;
 	while (info) {
-		if (!strcmp(info->path, path)) {
+		if (!strcmp (info->path, path)) {
 			info->depth++;
 			return CAMEL_LOCK_HELPER_STATUS_OK;
 		}
@@ -128,30 +128,30 @@ static gint lock_path(const gchar *path, guint32 *lockid)
 	}
 
 	/* check we are allowed to lock it, we must own it, be able to write to it, and it has to exist */
-	if (g_stat(path, &st) == -1
-	    || st.st_uid != getuid()
-	    || !S_ISREG(st.st_mode)
+	if (g_stat (path, &st) == -1
+	    || st.st_uid != getuid ()
+	    || !S_ISREG (st.st_mode)
 	    || (st.st_mode & 0400) == 0) {
 		return CAMEL_LOCK_HELPER_STATUS_INVALID;
 	}
 
-	info = malloc(sizeof(*info) + strlen(path));
+	info = malloc (sizeof (*info) + strlen (path));
 	if (info == NULL) {
 		res = CAMEL_LOCK_HELPER_STATUS_NOMEM;
 		goto fail;
 	}
 
 	/* we try the real uid first, and if that fails, try the 'root id' */
-	if (camel_lock_dot(path, NULL) == -1) {
+	if (camel_lock_dot (path, NULL) == -1) {
 #ifdef SETEUID_SAVES
 		if (lock_real_uid != lock_root_uid) {
-			if (seteuid(lock_root_uid) != -1) {
-				if (camel_lock_dot(path, NULL) == -1) {
-					seteuid(lock_real_uid);
+			if (seteuid (lock_root_uid) != -1) {
+				if (camel_lock_dot (path, NULL) == -1) {
+					seteuid (lock_real_uid);
 					res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
 					goto fail;
 				}
-				seteuid(lock_real_uid);
+				seteuid (lock_real_uid);
 			} else {
 				res = CAMEL_LOCK_HELPER_STATUS_SYSTEM;
 				goto fail;
@@ -168,7 +168,7 @@ static gint lock_path(const gchar *path, guint32 *lockid)
 		info->uid = lock_real_uid;
 	}
 
-	strcpy(info->path, path);
+	strcpy (info->path, path);
 	info->id = lock_id;
 	info->depth = 1;
 	info->next = lock_info_list;
@@ -187,12 +187,12 @@ fail:
 	d(fprintf(stderr, "lock failed\n"));
 
 	if (info)
-		free(info);
+		free (info);
 
 	return res;
 }
 
-static gint unlock_id(guint32 lockid)
+static gint unlock_id (guint32 lockid)
 {
 	struct _lock_info *info, *p;
 
@@ -207,15 +207,15 @@ static gint unlock_id(guint32 lockid)
 			if (info->depth <= 0) {
 #ifdef SETEUID_SAVES
 				if (info->uid != lock_real_uid) {
-					seteuid(lock_root_uid);
-					camel_unlock_dot(info->path);
-					seteuid(lock_real_uid);
+					seteuid (lock_root_uid);
+					camel_unlock_dot (info->path);
+					seteuid (lock_real_uid);
 				} else
 #endif
-					camel_unlock_dot(info->path);
+					camel_unlock_dot (info->path);
 
 				p->next = info->next;
-				free(info);
+				free (info);
 			}
 
 			return CAMEL_LOCK_HELPER_STATUS_OK;
@@ -228,20 +228,20 @@ static gint unlock_id(guint32 lockid)
 	return CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
 }
 
-static void lock_touch(const gchar *path)
+static void lock_touch (const gchar *path)
 {
 	gchar *name;
 
 	/* we could also check that we haven't had our lock stolen from us here */
 
-	name = alloca(strlen(path) + 10);
+	name = alloca (strlen (path) + 10);
 	sprintf(name, "%s.lock", path);
 
 	d(fprintf(stderr, "Updating lock %s\n", name));
-	utime(name, NULL);
+	utime (name, NULL);
 }
 
-static void setup_process(void)
+static void setup_process (void)
 {
 	struct sigaction sa;
 	sigset_t sigset;
@@ -251,10 +251,10 @@ static void setup_process(void)
 	sigemptyset (&sa.sa_mask);
 	sa.sa_flags = 0;
 
-	sigemptyset(&sigset);
-	sigaddset(&sigset, SIGIO);
-	sigaddset(&sigset, SIGINT);
-	sigprocmask(SIG_UNBLOCK, &sigset, NULL);
+	sigemptyset (&sigset);
+	sigaddset (&sigset, SIGIO);
+	sigaddset (&sigset, SIGINT);
+	sigprocmask (SIG_UNBLOCK, &sigset, NULL);
 
 	sigaction (SIGIO, &sa, NULL);
 	sigaction (SIGINT, &sa, NULL);
@@ -264,14 +264,14 @@ static void setup_process(void)
 #ifdef SETEUID_SAVES
 	/* here we change to the real user id, this is probably not particularly
 	   portable so may need configure checks */
-	lock_real_uid = getuid();
-	lock_root_uid = geteuid();
+	lock_real_uid = getuid ();
+	lock_root_uid = geteuid ();
 	if (lock_real_uid != lock_root_uid)
-		seteuid(lock_real_uid);
+		seteuid (lock_real_uid);
 #endif
 }
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	struct _CamelLockHelperMsg msg;
 	gint len;
@@ -281,12 +281,12 @@ gint main(gint argc, gchar **argv)
 	struct timeval tv;
 	struct _lock_info *info;
 
-	setup_process();
+	setup_process ();
 
 	do {
 		/* do a poll/etc, so we can refresh the .locks as required ... */
-		FD_ZERO(&rset);
-		FD_SET(STDIN_FILENO, &rset);
+		FD_ZERO (&rset);
+		FD_SET (STDIN_FILENO, &rset);
 
 		/* check the minimum timeout we need to refresh the next oldest lock */
 		if (lock_info_list) {
@@ -297,8 +297,8 @@ gint main(gint argc, gchar **argv)
 			info = lock_info_list;
 			while (info) {
 				left = CAMEL_DOT_LOCK_REFRESH - (now - info->stamp);
-				left = MAX(left, 0);
-				delay = MIN(left, delay);
+				left = MAX (left, 0);
+				delay = MIN (left, delay);
 				info = info->next;
 			}
 
@@ -307,7 +307,7 @@ gint main(gint argc, gchar **argv)
 		}
 
 		d(fprintf(stderr, "lock helper waiting for input\n"));
-		if (select(STDIN_FILENO+1, &rset, NULL, NULL, lock_info_list?&tv:NULL) == -1) {
+		if (select (STDIN_FILENO+1, &rset, NULL, NULL, lock_info_list?&tv:NULL) == -1) {
 			if (errno == EINTR)
 				break;
 
@@ -315,7 +315,7 @@ gint main(gint argc, gchar **argv)
 		}
 
 		/* did we get a timeout?  scan for any locks that need updating */
-		if (!FD_ISSET(STDIN_FILENO, &rset)) {
+		if (!FD_ISSET (STDIN_FILENO, &rset)) {
 			time_t now = time (NULL);
 			time_t left;
 
@@ -325,7 +325,7 @@ gint main(gint argc, gchar **argv)
 			while (info) {
 				left = (now - info->stamp);
 				if (left >= CAMEL_DOT_LOCK_REFRESH) {
-					lock_touch(info->path);
+					lock_touch (info->path);
 					info->stamp = now;
 				}
 				info = info->next;
@@ -334,41 +334,41 @@ gint main(gint argc, gchar **argv)
 			continue;
 		}
 
-		len = read_n(STDIN_FILENO, &msg, sizeof(msg));
+		len = read_n (STDIN_FILENO, &msg, sizeof (msg));
 		if (len == 0)
 			break;
 
 		res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
-		if (len == sizeof(msg) && msg.magic == CAMEL_LOCK_HELPER_MAGIC) {
+		if (len == sizeof (msg) && msg.magic == CAMEL_LOCK_HELPER_MAGIC) {
 			switch (msg.id) {
 			case CAMEL_LOCK_HELPER_LOCK:
 				res = CAMEL_LOCK_HELPER_STATUS_NOMEM;
 				if (msg.data > 0xffff) {
 					res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
-				} else if ((path = malloc(msg.data+1)) != NULL) {
+				} else if ((path = malloc (msg.data+1)) != NULL) {
 					res = CAMEL_LOCK_HELPER_STATUS_PROTOCOL;
-					len = read_n(STDIN_FILENO, path, msg.data);
+					len = read_n (STDIN_FILENO, path, msg.data);
 					if (len == msg.data) {
 						path[len] = 0;
-						res = lock_path(path, &msg.data);
+						res = lock_path (path, &msg.data);
 					}
-					free(path);
+					free (path);
 				}
 				break;
 			case CAMEL_LOCK_HELPER_UNLOCK:
-				res = unlock_id(msg.data);
+				res = unlock_id (msg.data);
 				break;
 			}
 		}
 		d(fprintf(stderr, "returning result %d\n", res));
 		msg.id = res;
 		msg.magic = CAMEL_LOCK_HELPER_RETURN_MAGIC;
-		write_n(STDOUT_FILENO, &msg, sizeof(msg));
+		write_n (STDOUT_FILENO, &msg, sizeof (msg));
 	} while (1);
 
 	d(fprintf(stderr, "parent exited, clsoing down remaining id's\n"));
 	while (lock_info_list)
-		unlock_id(lock_info_list->id);
+		unlock_id (lock_info_list->id);
 
 	return 0;
 }
diff --git a/camel/camel-lock.c b/camel/camel-lock.c
index a5b1059..203de9b 100644
--- a/camel/camel-lock.c
+++ b/camel/camel-lock.c
@@ -91,10 +91,10 @@ camel_lock_dot (const gchar *path,
 		d(printf("trying to lock '%s', attempt %d\n", lock, retry));
 
 		if (retry > 0)
-			sleep(CAMEL_LOCK_DOT_DELAY);
+			sleep (CAMEL_LOCK_DOT_DELAY);
 
 		sprintf(locktmp, "%sXXXXXX", path);
-		fdtmp = g_mkstemp(locktmp);
+		fdtmp = g_mkstemp (locktmp);
 		if (fdtmp == -1) {
 			g_set_error (
 				error, G_IO_ERROR,
@@ -103,22 +103,22 @@ camel_lock_dot (const gchar *path,
 				path, g_strerror (errno));
 			return -1;
 		}
-		close(fdtmp);
+		close (fdtmp);
 
 		/* apparently return code from link can be unreliable for nfs (see link(2)), so we ignore it */
-		link(locktmp, lock);
+		link (locktmp, lock);
 
 		/* but we check stat instead (again, see link(2)) */
-		if (g_stat(locktmp, &st) == -1) {
+		if (g_stat (locktmp, &st) == -1) {
 			d(printf("Our lock file %s vanished!?\n", locktmp));
 
 			/* well that was unexpected, try cleanup/retry */
-			unlink(locktmp);
-			unlink(lock);
+			unlink (locktmp);
+			unlink (lock);
 		} else {
 			d(printf("tmp lock created, link count is %d\n", st.st_nlink));
 
-			unlink(locktmp);
+			unlink (locktmp);
 
 			/* if we had 2 links, we have created the .lock, return ok, otherwise we need to keep trying */
 			if (st.st_nlink == 2)
@@ -126,12 +126,12 @@ camel_lock_dot (const gchar *path,
 		}
 
 		/* check for stale lock, kill it */
-		if (g_stat(lock, &st) == 0) {
+		if (g_stat (lock, &st) == 0) {
 			time_t now = time (NULL);
 			(printf("There is an existing lock %ld seconds old\n", now-st.st_ctime));
 			if (st.st_ctime < now - CAMEL_LOCK_DOT_STALE) {
 				d(printf("Removing it now\n"));
-				unlink(lock);
+				unlink (lock);
 			}
 		}
 
@@ -157,7 +157,7 @@ camel_lock_dot (const gchar *path,
  * Attempt to unlock a .lock lock.
  **/
 void
-camel_unlock_dot(const gchar *path)
+camel_unlock_dot (const gchar *path)
 {
 #ifdef USE_DOT
 	gchar *lock;
@@ -165,7 +165,7 @@ camel_unlock_dot(const gchar *path)
 	lock = alloca(strlen(path) + strlen(".lock") + 1);
 	sprintf(lock, "%s.lock", path);
 	d(printf("unlocking %s\n", lock));
-	(void)unlink(lock);
+	(void)unlink (lock);
 #endif
 }
 
@@ -192,11 +192,11 @@ camel_lock_fcntl (gint fd,
 
 	d(printf("fcntl locking %d\n", fd));
 
-	memset(&lock, 0, sizeof(lock));
+	memset (&lock, 0, sizeof (lock));
 	lock.l_type = type==CAMEL_LOCK_READ?F_RDLCK:F_WRLCK;
-	if (fcntl(fd, F_SETLK, &lock) == -1) {
+	if (fcntl (fd, F_SETLK, &lock) == -1) {
 		/* If we get a 'locking not vailable' type error,
-		   we assume the filesystem doesn't support fcntl() locking */
+		   we assume the filesystem doesn't support fcntl () locking */
 		/* this is somewhat system-dependent */
 		if (errno != EINVAL && errno != ENOLCK) {
 			g_set_error (
@@ -224,16 +224,16 @@ camel_lock_fcntl (gint fd,
  * Unlock an fcntl lock.
  **/
 void
-camel_unlock_fcntl(gint fd)
+camel_unlock_fcntl (gint fd)
 {
 #ifdef USE_FCNTL
 	struct flock lock;
 
 	d(printf("fcntl unlocking %d\n", fd));
 
-	memset(&lock, 0, sizeof(lock));
+	memset (&lock, 0, sizeof (lock));
 	lock.l_type = F_UNLCK;
-	fcntl(fd, F_SETLK, &lock);
+	fcntl (fd, F_SETLK, &lock);
 #endif
 }
 
@@ -265,7 +265,7 @@ camel_lock_flock (gint fd,
 	else
 		op = LOCK_EX|LOCK_NB;
 
-	if (flock(fd, op) == -1) {
+	if (flock (fd, op) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -284,12 +284,12 @@ camel_lock_flock (gint fd,
  * Unlock an flock lock.
  **/
 void
-camel_unlock_flock(gint fd)
+camel_unlock_flock (gint fd)
 {
 #ifdef USE_FLOCK
 	d(printf("flock unlocking %d\n", fd));
 
-	(void)flock(fd, LOCK_UN);
+	(void)flock (fd, LOCK_UN);
 #endif
 }
 
@@ -315,15 +315,15 @@ camel_lock_folder (const gchar *path,
 
 	while (retry < CAMEL_LOCK_RETRY) {
 		if (retry > 0)
-			g_usleep(CAMEL_LOCK_DELAY*1000000);
+			g_usleep (CAMEL_LOCK_DELAY*1000000);
 
-		if (camel_lock_fcntl(fd, type, error) == 0) {
-			if (camel_lock_flock(fd, type, error) == 0) {
-				if (camel_lock_dot(path, error) == 0)
+		if (camel_lock_fcntl (fd, type, error) == 0) {
+			if (camel_lock_flock (fd, type, error) == 0) {
+				if (camel_lock_dot (path, error) == 0)
 					return 0;
-				camel_unlock_flock(fd);
+				camel_unlock_flock (fd);
 			}
-			camel_unlock_fcntl(fd);
+			camel_unlock_fcntl (fd);
 		}
 		retry++;
 	}
@@ -339,15 +339,15 @@ camel_lock_folder (const gchar *path,
  * Free a lock on a folder.
  **/
 void
-camel_unlock_folder(const gchar *path, gint fd)
+camel_unlock_folder (const gchar *path, gint fd)
 {
-	camel_unlock_dot(path);
-	camel_unlock_flock(fd);
-	camel_unlock_fcntl(fd);
+	camel_unlock_dot (path);
+	camel_unlock_flock (fd);
+	camel_unlock_fcntl (fd);
 }
 
 #if 0
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	GError *error = NULL;
 	gint fd1, fd2;
@@ -380,10 +380,10 @@ gint main(gint argc, gchar **argv)
 		return 1;
 	}
 
-	if (camel_lock_fcntl(fd1, CAMEL_LOCK_WRITE, &error) == 0) {
+	if (camel_lock_fcntl (fd1, CAMEL_LOCK_WRITE, &error) == 0) {
 		printf("got fcntl write lock once\n");
-		g_usleep(5000000);
-		if (camel_lock_fcntl(fd2, CAMEL_LOCK_WRITE, &error) == 0) {
+		g_usleep (5000000);
+		if (camel_lock_fcntl (fd2, CAMEL_LOCK_WRITE, &error) == 0) {
 			printf("got fcntl write lock twice!\n");
 		} else {
 			printf("failed to get write lock: %s\n", error->message);
@@ -392,24 +392,24 @@ gint main(gint argc, gchar **argv)
 		if (error != NULL)
 			g_clear_error (&error);
 
-		if (camel_lock_fcntl(fd2, CAMEL_LOCK_READ, &error) == 0) {
+		if (camel_lock_fcntl (fd2, CAMEL_LOCK_READ, &error) == 0) {
 			printf("got fcntl read lock as well?\n");
-			camel_unlock_fcntl(fd2);
+			camel_unlock_fcntl (fd2);
 		} else {
 			printf("failed to get read lock: %s\n", error->message);
 		}
 
 		if (error != NULL)
 			g_clear_error (&error);
-		camel_unlock_fcntl(fd1);
+		camel_unlock_fcntl (fd1);
 	} else {
 		printf("failed to get write lock at all: %s\n", error->message);
 	}
 
-	if (camel_lock_fcntl(fd1, CAMEL_LOCK_READ, &error) == 0) {
+	if (camel_lock_fcntl (fd1, CAMEL_LOCK_READ, &error) == 0) {
 		printf("got fcntl read lock once\n");
-		g_usleep(5000000);
-		if (camel_lock_fcntl(fd2, CAMEL_LOCK_WRITE, &error) == 0) {
+		g_usleep (5000000);
+		if (camel_lock_fcntl (fd2, CAMEL_LOCK_WRITE, &error) == 0) {
 			printf("got fcntl write lock too?!\n");
 		} else {
 			printf("failed to get write lock: %s\n", error->message);
@@ -418,20 +418,20 @@ gint main(gint argc, gchar **argv)
 		if (error != NULL)
 			g_clear_error (&error);
 
-		if (camel_lock_fcntl(fd2, CAMEL_LOCK_READ, &error) == 0) {
+		if (camel_lock_fcntl (fd2, CAMEL_LOCK_READ, &error) == 0) {
 			printf("got fcntl read lock twice\n");
-			camel_unlock_fcntl(fd2);
+			camel_unlock_fcntl (fd2);
 		} else {
 			printf("failed to get read lock: %s\n", error->message);
 		}
 
 		if (error != NULL)
 			g_clear_error (&error);
-		camel_unlock_fcntl(fd1);
+		camel_unlock_fcntl (fd1);
 	}
 
-	close(fd1);
-	close(fd2);
+	close (fd1);
+	close (fd2);
 
 	return 0;
 }
diff --git a/camel/camel-lock.h b/camel/camel-lock.h
index 6b9e225..4c5a3b5 100644
--- a/camel/camel-lock.h
+++ b/camel/camel-lock.h
@@ -45,17 +45,17 @@ typedef enum {
 } CamelLockType;
 
 /* specific locking strategies */
-gint camel_lock_dot(const gchar *path, GError **error);
-gint camel_lock_fcntl(gint fd, CamelLockType type, GError **error);
-gint camel_lock_flock(gint fd, CamelLockType type, GError **error);
+gint camel_lock_dot (const gchar *path, GError **error);
+gint camel_lock_fcntl (gint fd, CamelLockType type, GError **error);
+gint camel_lock_flock (gint fd, CamelLockType type, GError **error);
 
-void camel_unlock_dot(const gchar *path);
-void camel_unlock_fcntl(gint fd);
-void camel_unlock_flock(gint fd);
+void camel_unlock_dot (const gchar *path);
+void camel_unlock_fcntl (gint fd);
+void camel_unlock_flock (gint fd);
 
 /* lock a folder in a standard way */
-gint camel_lock_folder(const gchar *path, gint fd, CamelLockType type, GError **error);
-void camel_unlock_folder(const gchar *path, gint fd);
+gint camel_lock_folder (const gchar *path, gint fd, CamelLockType type, GError **error);
+void camel_unlock_folder (const gchar *path, gint fd);
 
 G_END_DECLS
 
diff --git a/camel/camel-mime-filter-basic.c b/camel/camel-mime-filter-basic.c
index 9f3e086..b820173 100644
--- a/camel/camel-mime-filter-basic.c
+++ b/camel/camel-mime-filter-basic.c
@@ -55,15 +55,15 @@ mime_filter_basic_filter (CamelMimeFilter *mime_filter,
 	switch (priv->type) {
 	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
 		/* wont go to more than 2x size (overly conservative) */
-		camel_mime_filter_set_size(mime_filter, len*2+6, FALSE);
-		newlen = g_base64_encode_step((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
-		g_assert(newlen <= len*2+6);
+		camel_mime_filter_set_size (mime_filter, len*2+6, FALSE);
+		newlen = g_base64_encode_step ((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
+		g_assert (newlen <= len*2+6);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
 		/* *4 is overly conservative, but will do */
-		camel_mime_filter_set_size(mime_filter, len*4+4, FALSE);
-		newlen = camel_quoted_encode_step((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
-		g_assert(newlen <= len*4+4);
+		camel_mime_filter_set_size (mime_filter, len*4+4, FALSE);
+		newlen = camel_quoted_encode_step ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
+		g_assert (newlen <= len*4+4);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_ENC:
 		/* won't go to more than 2 * (x + 2) + 62 */
@@ -73,15 +73,15 @@ mime_filter_basic_filter (CamelMimeFilter *mime_filter,
 		break;
 	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
 		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mime_filter, len+3, FALSE);
-		newlen = g_base64_decode_step(in, len, (guchar *) mime_filter->outbuf, &priv->state, (guint *) &priv->save);
-		g_assert(newlen <= len+3);
+		camel_mime_filter_set_size (mime_filter, len+3, FALSE);
+		newlen = g_base64_decode_step (in, len, (guchar *) mime_filter->outbuf, &priv->state, (guint *) &priv->save);
+		g_assert (newlen <= len+3);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
 		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mime_filter, len + 2, FALSE);
-		newlen = camel_quoted_decode_step((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
-		g_assert(newlen <= len + 2);
+		camel_mime_filter_set_size (mime_filter, len + 2, FALSE);
+		newlen = camel_quoted_decode_step ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
+		g_assert (newlen <= len + 2);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_DEC:
 		if (!(priv->state & CAMEL_UUDECODE_STATE_BEGIN)) {
@@ -160,17 +160,17 @@ mime_filter_basic_complete (CamelMimeFilter *mime_filter,
 	switch (priv->type) {
 	case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
 		/* wont go to more than 2x size (overly conservative) */
-		camel_mime_filter_set_size(mime_filter, len*2+6, FALSE);
+		camel_mime_filter_set_size (mime_filter, len*2+6, FALSE);
 		if (len > 0)
-			newlen += g_base64_encode_step((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
-		newlen += g_base64_encode_close(TRUE, mime_filter->outbuf, &priv->state, &priv->save);
-		g_assert(newlen <= len*2+6);
+			newlen += g_base64_encode_step ((const guchar *) in, len, TRUE, mime_filter->outbuf, &priv->state, &priv->save);
+		newlen += g_base64_encode_close (TRUE, mime_filter->outbuf, &priv->state, &priv->save);
+		g_assert (newlen <= len*2+6);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_ENC:
 		/* *4 is definetly more than needed ... */
-		camel_mime_filter_set_size(mime_filter, len*4+4, FALSE);
-		newlen = camel_quoted_encode_close((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, &priv->save);
-		g_assert(newlen <= len*4+4);
+		camel_mime_filter_set_size (mime_filter, len*4+4, FALSE);
+		newlen = camel_quoted_encode_close ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, &priv->save);
+		g_assert (newlen <= len*4+4);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_ENC:
 		/* won't go to more than 2 * (x + 2) + 62 */
@@ -180,15 +180,15 @@ mime_filter_basic_complete (CamelMimeFilter *mime_filter,
 		break;
 	case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
 		/* output can't possibly exceed the input size */
-		camel_mime_filter_set_size(mime_filter, len, FALSE);
-		newlen = g_base64_decode_step(in, len, (guchar *) mime_filter->outbuf, &priv->state, (guint *) &priv->save);
-		g_assert(newlen <= len);
+		camel_mime_filter_set_size (mime_filter, len, FALSE);
+		newlen = g_base64_decode_step (in, len, (guchar *) mime_filter->outbuf, &priv->state, (guint *) &priv->save);
+		g_assert (newlen <= len);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_QP_DEC:
 		/* output can't possibly exceed the input size, well unless its not really qp, then +2 max */
-		camel_mime_filter_set_size(mime_filter, len+2, FALSE);
-		newlen = camel_quoted_decode_step((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
-		g_assert(newlen <= len+2);
+		camel_mime_filter_set_size (mime_filter, len+2, FALSE);
+		newlen = camel_quoted_decode_step ((guchar *) in, len, (guchar *) mime_filter->outbuf, &priv->state, (gint *) &priv->save);
+		g_assert (newlen <= len+2);
 		break;
 	case CAMEL_MIME_FILTER_BASIC_UU_DEC:
 		if ((priv->state & CAMEL_UUDECODE_STATE_BEGIN) && !(priv->state & CAMEL_UUDECODE_STATE_END)) {
diff --git a/camel/camel-mime-filter-basic.h b/camel/camel-mime-filter-basic.h
index 53d1e76..1f9de84 100644
--- a/camel/camel-mime-filter-basic.h
+++ b/camel/camel-mime-filter-basic.h
@@ -71,7 +71,7 @@ struct _CamelMimeFilterBasicClass {
 	CamelMimeFilterClass parent_class;
 };
 
-GType		camel_mime_filter_basic_get_type(void);
+GType		camel_mime_filter_basic_get_type (void);
 CamelMimeFilter *
 		camel_mime_filter_basic_new	(CamelMimeFilterBasicType type);
 
diff --git a/camel/camel-mime-filter-bestenc.c b/camel/camel-mime-filter-bestenc.c
index bbc505c..d868ae8 100644
--- a/camel/camel-mime-filter-bestenc.c
+++ b/camel/camel-mime-filter-bestenc.c
@@ -85,11 +85,11 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
 		if ((priv->flags & CAMEL_BESTENC_NO_FROM) && !priv->hadfrom
 		    && (priv->fromcount > 0 || priv->startofline)) {
 			if (priv->fromcount + len >=5) {
-				memcpy(&priv->fromsave[priv->fromcount], in, 5-priv->fromcount);
+				memcpy (&priv->fromsave[priv->fromcount], in, 5-priv->fromcount);
 				priv->hadfrom = strncmp(priv->fromsave, "From ", 5) == 0;
 				priv->fromcount = 0;
 			} else {
-				memcpy(&priv->fromsave[priv->fromcount], in, len);
+				memcpy (&priv->fromsave[priv->fromcount], in, len);
 				priv->fromcount += len;
 			}
 		}
@@ -130,7 +130,7 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
 							priv->startofline = TRUE;
 						} else {
 							priv->fromcount = pend-p;
-							memcpy(priv->fromsave, p, pend-p);
+							memcpy (priv->fromsave, p, pend-p);
 						}
 					}
 				} else {
@@ -150,7 +150,7 @@ mime_filter_bestenc_filter (CamelMimeFilter *mime_filter,
 	priv->total += len;
 
 	if (priv->flags & CAMEL_BESTENC_GET_CHARSET)
-		camel_charset_step(&priv->charset, in, len);
+		camel_charset_step (&priv->charset, in, len);
 
 donothing:
 	*out = (gchar *) in;
@@ -196,7 +196,7 @@ mime_filter_bestenc_reset (CamelMimeFilter *mime_filter)
 	priv->hadfrom = FALSE;
 	priv->startofline = TRUE;
 
-	camel_charset_init(&priv->charset);
+	camel_charset_init (&priv->charset);
 }
 
 static void
diff --git a/camel/camel-mime-filter-canon.c b/camel/camel-mime-filter-canon.c
index b272a6c..6143f47 100644
--- a/camel/camel-mime-filter-canon.c
+++ b/camel/camel-mime-filter-canon.c
@@ -71,7 +71,7 @@ mime_filter_canon_run (CamelMimeFilter *mime_filter,
 	   "From \n" -> "=46rom \r\n"
 	   We add 1 extra incase we're called from complete, when we didn't end in \n */
 
-	camel_mime_filter_set_size(mime_filter, len+lf*3+4, FALSE);
+	camel_mime_filter_set_size (mime_filter, len+lf*3+4, FALSE);
 
 	o = mime_filter->outbuf;
 	inptr = (guchar *)in;
@@ -205,7 +205,7 @@ camel_mime_filter_canon_init (CamelMimeFilterCanon *filter)
  * Returns: a new #CamelMimeFilterCanon
  **/
 CamelMimeFilter *
-camel_mime_filter_canon_new(guint32 flags)
+camel_mime_filter_canon_new (guint32 flags)
 {
 	CamelMimeFilter *filter;
 
diff --git a/camel/camel-mime-filter-canon.h b/camel/camel-mime-filter-canon.h
index 8587c7e..a886ede 100644
--- a/camel/camel-mime-filter-canon.h
+++ b/camel/camel-mime-filter-canon.h
@@ -69,7 +69,7 @@ struct _CamelMimeFilterCanonClass {
 	CamelMimeFilterClass parent_class;
 };
 
-GType		camel_mime_filter_canon_get_type(void);
+GType		camel_mime_filter_canon_get_type (void);
 CamelMimeFilter *
 		camel_mime_filter_canon_new	(guint32 flags);
 
diff --git a/camel/camel-mime-filter-enriched.c b/camel/camel-mime-filter-enriched.c
index 115a348..7186b9c 100644
--- a/camel/camel-mime-filter-enriched.c
+++ b/camel/camel-mime-filter-enriched.c
@@ -587,7 +587,7 @@ camel_mime_filter_enriched_new (guint32 flags)
  * richtext version of @in.
  **/
 gchar *
-camel_enriched_to_html(const gchar *in, guint32 flags)
+camel_enriched_to_html (const gchar *in, guint32 flags)
 {
 	CamelMimeFilter *filter;
 	gsize outlen, outpre;
@@ -596,9 +596,9 @@ camel_enriched_to_html(const gchar *in, guint32 flags)
 	if (in == NULL)
 		return NULL;
 
-	filter = camel_mime_filter_enriched_new(flags);
+	filter = camel_mime_filter_enriched_new (flags);
 
-	camel_mime_filter_complete(filter, (gchar *)in, strlen(in), 0, &outbuf, &outlen, &outpre);
+	camel_mime_filter_complete (filter, (gchar *)in, strlen (in), 0, &outbuf, &outlen, &outpre);
 	outbuf = g_strndup (outbuf, outlen);
 	g_object_unref (filter);
 
diff --git a/camel/camel-mime-filter-from.c b/camel/camel-mime-filter-from.c
index ff078a2..d774b21 100644
--- a/camel/camel-mime-filter-from.c
+++ b/camel/camel-mime-filter-from.c
@@ -82,7 +82,7 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
 				priv->midline = TRUE;
 				if (left < 5) {
 					if (inptr[0] == 'F') {
-						camel_mime_filter_backup(mime_filter, inptr, left);
+						camel_mime_filter_backup (mime_filter, inptr, left);
 						priv->midline = FALSE;
 						inend = inptr;
 						break;
@@ -92,7 +92,7 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
 						fromcount++;
 						/* yes, we do alloc them on the stack ... at most we're going to get
 						   len / 7 of them anyway */
-						node = alloca(sizeof(*node));
+						node = alloca (sizeof (*node));
 						node->pointer = inptr;
 						node->next = NULL;
 						tail->next = node;
@@ -108,18 +108,18 @@ mime_filter_from_filter (CamelMimeFilter *mime_filter,
 	}
 
 	if (fromcount > 0) {
-		camel_mime_filter_set_size(mime_filter, len + fromcount, FALSE);
+		camel_mime_filter_set_size (mime_filter, len + fromcount, FALSE);
 		node = head;
 		inptr = in;
 		outptr = mime_filter->outbuf;
 		while (node) {
-			memcpy(outptr, inptr, node->pointer - inptr);
+			memcpy (outptr, inptr, node->pointer - inptr);
 			outptr += node->pointer - inptr;
 			*outptr++ = '>';
 			inptr = node->pointer;
 			node = node->next;
 		}
-		memcpy(outptr, inptr, inend - inptr);
+		memcpy (outptr, inptr, inend - inptr);
 		outptr += inend - inptr;
 		*out = mime_filter->outbuf;
 		*outlen = outptr - mime_filter->outbuf;
@@ -184,27 +184,27 @@ camel_mime_filter_from_new (void)
 
 #include <stdio.h>
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelMimeFilterFrom *f;
 	gchar *buffer;
 	gint len, prespace;
 
-	g_tk_init(&argc, &argv);
+	g_tk_init (&argc, &argv);
 
-	f = camel_mime_filter_from_new();
+	f = camel_mime_filter_from_new ();
 
 	buffer = "This is a test\nFrom Someone\nTo someone. From Someone else, From\n From blah\nFromblah\nBye! \nFrom ";
-	len = strlen(buffer);
+	len = strlen (buffer);
 	prespace = 0;
 
 	printf("input = '%.*s'\n", len, buffer);
-	camel_mime_filter_filter(f, buffer, len, prespace, &buffer, &len, &prespace);
+	camel_mime_filter_filter (f, buffer, len, prespace, &buffer, &len, &prespace);
 	printf("output = '%.*s'\n", len, buffer);
 	buffer = "";
 	len = 0;
 	prespace = 0;
-	camel_mime_filter_complete(f, buffer, len, prespace, &buffer, &len, &prespace);
+	camel_mime_filter_complete (f, buffer, len, prespace, &buffer, &len, &prespace);
 	printf("complete = '%.*s'\n", len, buffer);
 
 	return 0;
diff --git a/camel/camel-mime-filter-html.c b/camel/camel-mime-filter-html.c
index 2aca726..4c6c48f 100644
--- a/camel/camel-mime-filter-html.c
+++ b/camel/camel-mime-filter-html.c
@@ -95,12 +95,12 @@ mime_filter_html_run (CamelMimeFilter *mime_filter,
 		const gchar *data;
 		gint len;
 
-		state = camel_html_parser_step(priv->ctxt, &data, &len);
+		state = camel_html_parser_step (priv->ctxt, &data, &len);
 
 		switch (state) {
 		case CAMEL_HTML_PARSER_DATA:
 		case CAMEL_HTML_PARSER_ENT:
-			memcpy(outp, data, len);
+			memcpy (outp, data, len);
 			outp += len;
 			break;
 		case CAMEL_HTML_PARSER_ELEMENT:
diff --git a/camel/camel-mime-filter-index.h b/camel/camel-mime-filter-index.h
index 6cf994c..c35e547 100644
--- a/camel/camel-mime-filter-index.h
+++ b/camel/camel-mime-filter-index.h
@@ -68,7 +68,7 @@ CamelMimeFilter *
 		camel_mime_filter_index_new	(CamelIndex *index);
 
 /* Set the match name for any indexed words */
-void		camel_mime_filter_index_set_name(CamelMimeFilterIndex *filter,
+void		camel_mime_filter_index_set_name (CamelMimeFilterIndex *filter,
 						 CamelIndexName *name);
 void		camel_mime_filter_index_set_index
 						(CamelMimeFilterIndex *filter,
diff --git a/camel/camel-mime-filter-yenc.h b/camel/camel-mime-filter-yenc.h
index 8e36ebc..495d45b 100644
--- a/camel/camel-mime-filter-yenc.h
+++ b/camel/camel-mime-filter-yenc.h
@@ -90,7 +90,7 @@ struct _CamelMimeFilterYencClass {
 GType		camel_mime_filter_yenc_get_type	(void);
 CamelMimeFilter *
 		camel_mime_filter_yenc_new	(CamelMimeFilterYencDirection direction);
-void		camel_mime_filter_yenc_set_state(CamelMimeFilterYenc *yenc,
+void		camel_mime_filter_yenc_set_state (CamelMimeFilterYenc *yenc,
 						 gint state);
 void		camel_mime_filter_yenc_set_crc	(CamelMimeFilterYenc *yenc,
 						 guint32 crc);
diff --git a/camel/camel-mime-filter.c b/camel/camel-mime-filter.c
index f762549..a5e02e7 100644
--- a/camel/camel-mime-filter.c
+++ b/camel/camel-mime-filter.c
@@ -112,27 +112,27 @@ camel_mime_filter_new (void)
 
 #ifdef MALLOC_CHECK
 static void
-checkmem(gpointer p)
+checkmem (gpointer p)
 {
 	if (p) {
-		gint status = mprobe(p);
+		gint status = mprobe (p);
 
 		switch (status) {
 		case MCHECK_HEAD:
 			printf("Memory underrun at %p\n", p);
-			abort();
+			abort ();
 		case MCHECK_TAIL:
 			printf("Memory overrun at %p\n", p);
-			abort();
+			abort ();
 		case MCHECK_FREE:
 			printf("Double free %p\n", p);
-			abort();
+			abort ();
 		}
 	}
 }
 #endif
 
-static void filter_run(CamelMimeFilter *f,
+static void filter_run (CamelMimeFilter *f,
 		       const gchar *in, gsize len, gsize prespace,
 		       gchar **out, gsize *outlen, gsize *outprespace,
 		       void (*filterfunc)(CamelMimeFilter *f,
@@ -142,8 +142,8 @@ static void filter_run(CamelMimeFilter *f,
 	struct _CamelMimeFilterPrivate *p;
 
 #ifdef MALLOC_CHECK
-	checkmem(f->outreal);
-	checkmem(f->backbuf);
+	checkmem (f->outreal);
+	checkmem (f->backbuf);
 #endif
 	/*
 	  here we take a performance hit, if the input buffer doesn't
@@ -151,38 +151,38 @@ static void filter_run(CamelMimeFilter *f,
 	*/
 	if (prespace < f->backlen) {
 		gint newlen = len+prespace+f->backlen;
-		p = CAMEL_MIME_FILTER_GET_PRIVATE(f);
+		p = CAMEL_MIME_FILTER_GET_PRIVATE (f);
 		if (p->inlen < newlen) {
 			/* NOTE: g_realloc copies data, we dont need that (slower) */
-			g_free(p->inbuf);
-			p->inbuf = g_malloc(newlen+PRE_HEAD);
+			g_free (p->inbuf);
+			p->inbuf = g_malloc (newlen+PRE_HEAD);
 			p->inlen = newlen+PRE_HEAD;
 		}
 		/* copy to end of structure */
-		memcpy(p->inbuf+p->inlen - len, in, len);
+		memcpy (p->inbuf+p->inlen - len, in, len);
 		in = p->inbuf+p->inlen - len;
 		prespace = p->inlen - len;
 	}
 
 #ifdef MALLOC_CHECK
-	checkmem(f->outreal);
-	checkmem(f->backbuf);
+	checkmem (f->outreal);
+	checkmem (f->backbuf);
 #endif
 
 	/* preload any backed up data */
 	if (f->backlen > 0) {
-		memcpy((gchar *) in-f->backlen, f->backbuf, f->backlen);
+		memcpy ((gchar *) in-f->backlen, f->backbuf, f->backlen);
 		in -= f->backlen;
 		len += f->backlen;
 		prespace -= f->backlen;
 		f->backlen = 0;
 	}
 
-	filterfunc(f, in, len, prespace, out, outlen, outprespace);
+	filterfunc (f, in, len, prespace, out, outlen, outprespace);
 
 #ifdef MALLOC_CHECK
-	checkmem(f->outreal);
-	checkmem(f->backbuf);
+	checkmem (f->outreal);
+	checkmem (f->backbuf);
 #endif
 
 }
@@ -294,16 +294,16 @@ camel_mime_filter_reset (CamelMimeFilter *filter)
  * Note: New calls replace old data.
  **/
 void
-camel_mime_filter_backup(CamelMimeFilter *filter, const gchar *data, gsize length)
+camel_mime_filter_backup (CamelMimeFilter *filter, const gchar *data, gsize length)
 {
 	if (filter->backsize < length) {
 		/* g_realloc copies data, unnecessary overhead */
-		g_free(filter->backbuf);
-		filter->backbuf = g_malloc(length+BACK_HEAD);
+		g_free (filter->backbuf);
+		filter->backbuf = g_malloc (length+BACK_HEAD);
 		filter->backsize = length+BACK_HEAD;
 	}
 	filter->backlen = length;
-	memcpy(filter->backbuf, data, length);
+	memcpy (filter->backbuf, data, length);
 }
 
 /**
@@ -316,15 +316,15 @@ camel_mime_filter_backup(CamelMimeFilter *filter, const gchar *data, gsize lengt
  * for filter output.
  **/
 void
-camel_mime_filter_set_size(CamelMimeFilter *filter, gsize size, gint keep)
+camel_mime_filter_set_size (CamelMimeFilter *filter, gsize size, gint keep)
 {
 	if (filter->outsize < size) {
 		gint offset = filter->outptr - filter->outreal;
 		if (keep) {
-			filter->outreal = g_realloc(filter->outreal, size + PRE_HEAD*4);
+			filter->outreal = g_realloc (filter->outreal, size + PRE_HEAD*4);
 		} else {
-			g_free(filter->outreal);
-			filter->outreal = g_malloc(size + PRE_HEAD*4);
+			g_free (filter->outreal);
+			filter->outreal = g_malloc (size + PRE_HEAD*4);
 		}
 		filter->outptr = filter->outreal + offset;
 		filter->outbuf = filter->outreal + PRE_HEAD*4;
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index c754f0a..a79774b 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -102,7 +102,7 @@ process_header (CamelMedium *medium,
 	header_type = (CamelHeaderType) g_hash_table_lookup (header_name_table, name);
 	switch (header_type) {
 	case HEADER_FROM:
-		addr = camel_internet_address_new();
+		addr = camel_internet_address_new ();
 		unfolded = camel_header_unfold (value);
 		if (camel_address_decode ((CamelAddress *) addr, unfolded) <= 0) {
 			g_object_unref (addr);
@@ -114,7 +114,7 @@ process_header (CamelMedium *medium,
 		g_free (unfolded);
 		break;
 	case HEADER_REPLY_TO:
-		addr = camel_internet_address_new();
+		addr = camel_internet_address_new ();
 		unfolded = camel_header_unfold (value);
 		if (camel_address_decode ((CamelAddress *) addr, unfolded) <= 0) {
 			g_object_unref (addr);
@@ -324,7 +324,7 @@ mime_message_construct_from_parser (CamelMimePart *dw,
 	}
 
 	d(printf("mime_message::construct_from_parser() leaving\n"));
-	err = camel_mime_parser_errno(mp);
+	err = camel_mime_parser_errno (mp);
 	if (err != 0) {
 		errno = err;
 		g_set_error (
@@ -423,14 +423,14 @@ camel_mime_message_set_date (CamelMimeMessage *message,  time_t date, gint offse
 {
 	gchar *datestr;
 
-	g_assert(message);
+	g_assert (message);
 
 	if (date == CAMEL_MESSAGE_DATE_CURRENT) {
 		struct tm local;
 		gint tz;
 
-		date = time(NULL);
-		e_localtime_with_offset(date, &local, &tz);
+		date = time (NULL);
+		e_localtime_with_offset (date, &local, &tz);
 		offset = (((tz/60/60) * 100) + (tz/60 % 60));
 	}
 	message->date = date;
@@ -547,7 +547,7 @@ camel_mime_message_set_reply_to (CamelMimeMessage *msg, CamelInternetAddress *re
 {
 	gchar *addr;
 
-	g_assert(msg);
+	g_assert (msg);
 
 	if (msg->reply_to) {
 		g_object_unref (msg->reply_to);
@@ -597,7 +597,7 @@ camel_mime_message_set_subject (CamelMimeMessage *message, const gchar *subject)
 {
 	gchar *text;
 
-	g_assert(message);
+	g_assert (message);
 
 	g_free (message->subject);
 
@@ -624,7 +624,7 @@ camel_mime_message_set_subject (CamelMimeMessage *message, const gchar *subject)
 const gchar *
 camel_mime_message_get_subject (CamelMimeMessage *mime_message)
 {
-	g_assert(mime_message);
+	g_assert (mime_message);
 
 	return mime_message->subject;
 }
@@ -647,22 +647,22 @@ camel_mime_message_set_from (CamelMimeMessage *msg, CamelInternetAddress *from)
 {
 	gchar *addr;
 
-	g_assert(msg);
+	g_assert (msg);
 
 	if (msg->from) {
 		g_object_unref (msg->from);
 		msg->from = NULL;
 	}
 
-	if (from == NULL || camel_address_length((CamelAddress *)from) == 0) {
+	if (from == NULL || camel_address_length ((CamelAddress *)from) == 0) {
 		CAMEL_MEDIUM_CLASS(camel_mime_message_parent_class)->remove_header(CAMEL_MEDIUM(msg), "From");
 		return;
 	}
 
-	msg->from = (CamelInternetAddress *)camel_address_new_clone((CamelAddress *)from);
-	addr = camel_address_encode((CamelAddress *)msg->from);
+	msg->from = (CamelInternetAddress *)camel_address_new_clone ((CamelAddress *)from);
+	addr = camel_address_encode ((CamelAddress *)msg->from);
 	CAMEL_MEDIUM_CLASS (camel_mime_message_parent_class)->set_header(CAMEL_MEDIUM(msg), "From", addr);
-	g_free(addr);
+	g_free (addr);
 }
 
 /**
@@ -694,12 +694,12 @@ camel_mime_message_get_from (CamelMimeMessage *mime_message)
  * Set the recipients of a message.
  **/
 void
-camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const gchar *type, CamelInternetAddress *r)
+camel_mime_message_set_recipients (CamelMimeMessage *mime_message, const gchar *type, CamelInternetAddress *r)
 {
 	gchar *text;
 	CamelInternetAddress *addr;
 
-	g_assert(mime_message);
+	g_assert (mime_message);
 
 	addr = g_hash_table_lookup (mime_message->recipients, type);
 	if (addr == NULL) {
@@ -719,7 +719,7 @@ camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const gchar *t
 	/* and sync our headers */
 	text = camel_address_encode (CAMEL_ADDRESS (addr));
 	CAMEL_MEDIUM_CLASS (camel_mime_message_parent_class)->set_header (CAMEL_MEDIUM (mime_message), type, text);
-	g_free(text);
+	g_free (text);
 }
 
 /**
@@ -734,7 +734,7 @@ camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const gchar *t
 CamelInternetAddress *
 camel_mime_message_get_recipients (CamelMimeMessage *mime_message, const gchar *type)
 {
-	g_assert(mime_message);
+	g_assert (mime_message);
 
 	return g_hash_table_lookup (mime_message->recipients, type);
 }
@@ -761,7 +761,7 @@ camel_mime_message_get_source (CamelMimeMessage *mime_message)
 {
 	const gchar *src;
 
-	g_assert(mime_message);
+	g_assert (mime_message);
 
 	src = camel_medium_get_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source");
 	if (src) {
@@ -1160,7 +1160,7 @@ camel_mime_message_build_mbox_from (CamelMimeMessage *message)
 	/* try use the received header to get the date */
 	tmp = camel_header_raw_find (&header, "Received", NULL);
 	if (tmp) {
-		tmp = strrchr(tmp, ';');
+		tmp = strrchr (tmp, ';');
 		if (tmp)
 			tmp++;
 	}
@@ -1228,15 +1228,15 @@ camel_mime_message_has_attachment (CamelMimeMessage *message)
 }
 
 static void
-cmm_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
+cmm_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
 {
 	CamelDataWrapper *containee;
 	gint parts, i;
 	gint go = TRUE;
 	gchar *s;
 
-	s = alloca(depth+1);
-	memset(s, ' ', depth);
+	s = alloca (depth+1);
+	memset (s, ' ', depth);
 	s[depth] = 0;
 	/* yes this leaks, so what its only debug stuff */
 	printf("%sclass: %s\n", s, G_OBJECT_TYPE_NAME (part));
@@ -1251,15 +1251,15 @@ cmm_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
 	printf("%scontent mime-type: %s\n", s, camel_content_type_format(((CamelDataWrapper *)containee)->mime_type));
 
 	/* using the object types is more accurate than using the mime/types */
-	if (CAMEL_IS_MULTIPART(containee)) {
-		parts = camel_multipart_get_number((CamelMultipart *)containee);
+	if (CAMEL_IS_MULTIPART (containee)) {
+		parts = camel_multipart_get_number ((CamelMultipart *)containee);
 		for (i = 0; go && i < parts; i++) {
-			CamelMimePart *mpart = camel_multipart_get_part((CamelMultipart *)containee, i);
+			CamelMimePart *mpart = camel_multipart_get_part ((CamelMultipart *)containee, i);
 
-			cmm_dump_rec(msg, mpart, body, depth+2);
+			cmm_dump_rec (msg, mpart, body, depth+2);
 		}
-	} else if (CAMEL_IS_MIME_MESSAGE(containee)) {
-		cmm_dump_rec(msg, (CamelMimePart *)containee, body, depth+2);
+	} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
+		cmm_dump_rec (msg, (CamelMimePart *)containee, body, depth+2);
 	}
 }
 
@@ -1273,7 +1273,7 @@ cmm_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint body, gint depth)
  * If body is TRUE, then dump body content of the message as well (currently unimplemented).
  **/
 void
-camel_mime_message_dump(CamelMimeMessage *msg, gint body)
+camel_mime_message_dump (CamelMimeMessage *msg, gint body)
 {
-	cmm_dump_rec(msg, (CamelMimePart *)msg, body, 0);
+	cmm_dump_rec (msg, (CamelMimePart *)msg, body, 0);
 }
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
index 7c5c76b..f4cac90 100644
--- a/camel/camel-mime-message.h
+++ b/camel/camel-mime-message.h
@@ -141,7 +141,7 @@ gchar                       *camel_mime_message_build_mbox_from    (CamelMimeMes
 
 gboolean		    camel_mime_message_has_attachment     (CamelMimeMessage           *message);
 
-void camel_mime_message_dump(CamelMimeMessage *msg, gint body);
+void camel_mime_message_dump (CamelMimeMessage *msg, gint body);
 
 G_END_DECLS
 
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index 8aa1a84..81c8bfd 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -141,22 +141,22 @@ struct _header_scan_filter {
 	CamelMimeFilter *filter;
 };
 
-static void folder_scan_step(struct _header_scan_state *s, gchar **databuffer, gsize *datalength);
-static void folder_scan_drop_step(struct _header_scan_state *s);
-static gint folder_scan_init_with_fd(struct _header_scan_state *s, gint fd);
-static gint folder_scan_init_with_stream(struct _header_scan_state *s, CamelStream *stream, GError **error);
-static struct _header_scan_state *folder_scan_init(void);
-static void folder_scan_close(struct _header_scan_state *s);
-static struct _header_scan_stack *folder_scan_content(struct _header_scan_state *s, gint *lastone, gchar **data, gsize *length);
-static struct _header_scan_stack *folder_scan_header(struct _header_scan_state *s, gint *lastone);
-static gint folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save);
-static goffset folder_seek(struct _header_scan_state *s, goffset offset, gint whence);
-static goffset folder_tell(struct _header_scan_state *s);
-static gint folder_read(struct _header_scan_state *s);
-static void folder_push_part(struct _header_scan_state *s, struct _header_scan_stack *h);
+static void folder_scan_step (struct _header_scan_state *s, gchar **databuffer, gsize *datalength);
+static void folder_scan_drop_step (struct _header_scan_state *s);
+static gint folder_scan_init_with_fd (struct _header_scan_state *s, gint fd);
+static gint folder_scan_init_with_stream (struct _header_scan_state *s, CamelStream *stream, GError **error);
+static struct _header_scan_state *folder_scan_init (void);
+static void folder_scan_close (struct _header_scan_state *s);
+static struct _header_scan_stack *folder_scan_content (struct _header_scan_state *s, gint *lastone, gchar **data, gsize *length);
+static struct _header_scan_stack *folder_scan_header (struct _header_scan_state *s, gint *lastone);
+static gint folder_scan_skip_line (struct _header_scan_state *s, GByteArray *save);
+static goffset folder_seek (struct _header_scan_state *s, goffset offset, gint whence);
+static goffset folder_tell (struct _header_scan_state *s);
+static gint folder_read (struct _header_scan_state *s);
+static void folder_push_part (struct _header_scan_state *s, struct _header_scan_stack *h);
 
 #ifdef MEMPOOL
-static void header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h, gchar *header, gint offset);
+static void header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *h, gchar *header, gint offset);
 #endif
 
 #if d(!)0
@@ -189,10 +189,10 @@ mime_parser_finalize (GObject *object)
 	struct _header_scan_state *s = _PRIVATE (object);
 
 #ifdef PURIFY
-	purify_watch_remove_all();
+	purify_watch_remove_all ();
 #endif
 
-	folder_scan_close(s);
+	folder_scan_close (s);
 
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (camel_mime_parser_parent_class)->finalize (object);
@@ -210,7 +210,7 @@ camel_mime_parser_class_init (CamelMimeParserClass *class)
 static void
 camel_mime_parser_init (CamelMimeParser *parser)
 {
-	parser->priv = folder_scan_init();
+	parser->priv = folder_scan_init ();
 }
 
 /**
@@ -245,12 +245,12 @@ camel_mime_parser_new (void)
  * Since: 2.22
  **/
 gint
-camel_mime_parser_filter_add(CamelMimeParser *m, CamelMimeFilter *mf)
+camel_mime_parser_filter_add (CamelMimeParser *m, CamelMimeFilter *mf)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 	struct _header_scan_filter *f, *new;
 
-	new = g_malloc(sizeof(*new));
+	new = g_malloc (sizeof (*new));
 	new->filter = mf;
 	new->id = s->filterid++;
 	if (s->filterid == -1)
@@ -277,9 +277,9 @@ camel_mime_parser_filter_add(CamelMimeParser *m, CamelMimeFilter *mf)
  * Since: 2.22
  **/
 void
-camel_mime_parser_filter_remove(CamelMimeParser *m, gint id)
+camel_mime_parser_filter_remove (CamelMimeParser *m, gint id)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 	struct _header_scan_filter *f, *old;
 
 	f = (struct _header_scan_filter *)&s->filters;
@@ -288,7 +288,7 @@ camel_mime_parser_filter_remove(CamelMimeParser *m, gint id)
 		if (old->id == id) {
 			g_object_unref (old->filter);
 			f->next = old->next;
-			g_free(old);
+			g_free (old);
 			/* there should only be a single matching id, but
 			   scan the whole lot anyway */
 		}
@@ -309,9 +309,9 @@ camel_mime_parser_filter_remove(CamelMimeParser *m, gint id)
  * defined.
  **/
 const gchar *
-camel_mime_parser_header(CamelMimeParser *m, const gchar *name, gint *offset)
+camel_mime_parser_header (CamelMimeParser *m, const gchar *name, gint *offset)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
 	if (s->parts && s->parts->headers)
 		return camel_header_raw_find (&s->parts->headers, name, offset);
@@ -333,9 +333,9 @@ camel_mime_parser_header(CamelMimeParser *m, const gchar *name, gint *offset)
  * Since: 2.22
  **/
 struct _camel_header_raw *
-camel_mime_parser_headers_raw(CamelMimeParser *m)
+camel_mime_parser_headers_raw (CamelMimeParser *m)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
 	if (s->parts)
 		return s->parts->headers;
@@ -343,7 +343,7 @@ camel_mime_parser_headers_raw(CamelMimeParser *m)
 }
 
 static const gchar *
-byte_array_to_string(GByteArray *array)
+byte_array_to_string (GByteArray *array)
 {
 	if (array == NULL)
 		return NULL;
@@ -366,12 +366,12 @@ byte_array_to_string(GByteArray *array)
  * Since: 2.22
  **/
 const gchar *
-camel_mime_parser_preface(CamelMimeParser *m)
+camel_mime_parser_preface (CamelMimeParser *m)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
 	if (s->parts)
-		return byte_array_to_string(s->parts->pretext);
+		return byte_array_to_string (s->parts->pretext);
 
 	return NULL;
 }
@@ -389,12 +389,12 @@ camel_mime_parser_preface(CamelMimeParser *m)
  * Since: 2.22
  **/
 const gchar *
-camel_mime_parser_postface(CamelMimeParser *m)
+camel_mime_parser_postface (CamelMimeParser *m)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
 	if (s->parts)
-		return byte_array_to_string(s->parts->posttext);
+		return byte_array_to_string (s->parts->posttext);
 
 	return NULL;
 }
@@ -415,12 +415,12 @@ camel_mime_parser_postface(CamelMimeParser *m)
  * Since: 2.22
  **/
 const gchar *
-camel_mime_parser_from_line(CamelMimeParser *m)
+camel_mime_parser_from_line (CamelMimeParser *m)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
 	if (s->parts)
-		return byte_array_to_string(s->parts->from_line);
+		return byte_array_to_string (s->parts->from_line);
 
 	return NULL;
 }
@@ -438,11 +438,11 @@ camel_mime_parser_from_line(CamelMimeParser *m)
  * Returns: Returns -1 on error.
  **/
 gint
-camel_mime_parser_init_with_fd(CamelMimeParser *m, gint fd)
+camel_mime_parser_init_with_fd (CamelMimeParser *m, gint fd)
 {
-	struct _header_scan_state *s = _PRIVATE(m);
+	struct _header_scan_state *s = _PRIVATE (m);
 
-	return folder_scan_init_with_fd(s, fd);
+	return folder_scan_init_with_fd (s, fd);
 }
 
 /**
@@ -568,7 +568,7 @@ camel_mime_parser_drop_step (CamelMimeParser *parser)
 	struct _header_scan_state *s = _PRIVATE (parser);
 
 	s->unstep = 0;
-	folder_scan_drop_step(s);
+	folder_scan_drop_step (s);
 }
 
 /**
@@ -612,7 +612,7 @@ camel_mime_parser_step (CamelMimeParser *parser, gchar **databuffer, gsize *data
 			datalength = &dummylength;
 		}
 
-		folder_scan_step(s, databuffer, datalength);
+		folder_scan_step (s, databuffer, datalength);
 	} else
 		s->unstep--;
 
@@ -656,7 +656,7 @@ camel_mime_parser_read (CamelMimeParser *parser,
 
 	d(printf("parser::read() reading %d bytes\n", len));
 
-	there = MIN(s->inend - s->inptr, len);
+	there = MIN (s->inend - s->inptr, len);
 	d(printf("parser::read() there = %d bytes\n", there));
 	if (there > 0) {
 		*databuffer = s->inptr;
@@ -664,7 +664,7 @@ camel_mime_parser_read (CamelMimeParser *parser,
 		return there;
 	}
 
-	if (folder_read(s) == -1) {
+	if (folder_read (s) == -1) {
 		gint err = camel_mime_parser_errno (parser);
 
 		g_set_error (
@@ -674,7 +674,7 @@ camel_mime_parser_read (CamelMimeParser *parser,
 		return -1;
 	}
 
-	there = MIN(s->inend - s->inptr, len);
+	there = MIN (s->inend - s->inptr, len);
 	d(printf("parser::read() had to re-read, now there = %d bytes\n", there));
 
 	*databuffer = s->inptr;
@@ -710,7 +710,7 @@ camel_mime_parser_tell (CamelMimeParser *parser)
 {
 	struct _header_scan_state *s = _PRIVATE (parser);
 
-	return folder_tell(s);
+	return folder_tell (s);
 }
 
 /**
@@ -767,7 +767,7 @@ camel_mime_parser_tell_start_from (CamelMimeParser *parser)
  * Since: 2.22
  **/
 goffset
-camel_mime_parser_tell_start_boundary(CamelMimeParser *parser)
+camel_mime_parser_tell_start_boundary (CamelMimeParser *parser)
 {
 	struct _header_scan_state *s = _PRIVATE (parser);
 
@@ -794,11 +794,11 @@ camel_mime_parser_tell_start_boundary(CamelMimeParser *parser)
  * Since: 2.22
  **/
 goffset
-camel_mime_parser_seek(CamelMimeParser *parser, goffset offset, gint whence)
+camel_mime_parser_seek (CamelMimeParser *parser, goffset offset, gint whence)
 {
 	struct _header_scan_state *s = _PRIVATE (parser);
 
-	return folder_seek(s, offset, whence);
+	return folder_seek (s, offset, whence);
 }
 
 /**
@@ -827,17 +827,17 @@ camel_mime_parser_state (CamelMimeParser *parser)
  * without headers.
  **/
 void
-camel_mime_parser_push_state(CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar *boundary)
+camel_mime_parser_push_state (CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar *boundary)
 {
 	struct _header_scan_stack *h;
-	struct _header_scan_state *s = _PRIVATE(mp);
+	struct _header_scan_state *s = _PRIVATE (mp);
 
-	h = g_malloc0(sizeof(*h));
-	h->boundarylen = strlen(boundary)+2;
+	h = g_malloc0 (sizeof (*h));
+	h->boundarylen = strlen (boundary)+2;
 	h->boundarylenfinal = h->boundarylen+2;
-	h->boundary = g_malloc(h->boundarylen+3);
+	h->boundary = g_malloc (h->boundarylen+3);
 	sprintf(h->boundary, "--%s--", boundary);
-	folder_push_part(s, h);
+	folder_push_part (s, h);
 	s->state = newstate;
 }
 
@@ -899,7 +899,7 @@ camel_mime_parser_errno (CamelMimeParser *parser)
 
 /* read the next bit of data, ensure there is enough room 'atleast' bytes */
 static gint
-folder_read(struct _header_scan_state *s)
+folder_read (struct _header_scan_state *s)
 {
 	gint len;
 	gint inoffset;
@@ -907,19 +907,19 @@ folder_read(struct _header_scan_state *s)
 	if (s->inptr<s->inend-s->atleast || s->eof)
 		return s->inend-s->inptr;
 #ifdef PURIFY
-	purify_watch_remove(inend_id);
-	purify_watch_remove(inbuffer_id);
+	purify_watch_remove (inend_id);
+	purify_watch_remove (inbuffer_id);
 #endif
 	/* check for any remaning bytes (under the atleast limit( */
 	inoffset = s->inend - s->inptr;
 	if (inoffset>0) {
-		memmove(s->inbuf, s->inptr, inoffset);
+		memmove (s->inbuf, s->inptr, inoffset);
 	}
 	if (s->stream) {
 		len = camel_stream_read (
 			s->stream, s->inbuf+inoffset, SCAN_BUF-inoffset, NULL);
 	} else {
-		len = read(s->fd, s->inbuf+inoffset, SCAN_BUF-inoffset);
+		len = read (s->fd, s->inbuf+inoffset, SCAN_BUF-inoffset);
 	}
 	r(printf("read %d bytes, offset = %d\n", len, inoffset));
 	if (len>=0) {
@@ -933,9 +933,9 @@ folder_read(struct _header_scan_state *s)
 		s->ioerrno = errno?errno:EIO;
 	}
 
-	g_assert(s->inptr<=s->inend);
+	g_assert (s->inptr<=s->inend);
 #ifdef PURIFY
-	inend_id = purify_watch(&s->inend);
+	inend_id = purify_watch (&s->inend);
 	inbuffer_id = purify_watch_n(s->inend+1, SCAN_HEAD-1, "rw");
 #endif
 	r(printf("content = %d '%.*s'\n", s->inend - s->inptr,  s->inend - s->inptr, s->inptr));
@@ -946,7 +946,7 @@ folder_read(struct _header_scan_state *s)
 
 /* return the current absolute position of the data pointer */
 static goffset
-folder_tell(struct _header_scan_state *s)
+folder_tell (struct _header_scan_state *s)
 {
 	return s->seek + (s->inptr - s->inbuf);
 }
@@ -956,12 +956,12 @@ folder_tell(struct _header_scan_state *s)
   other than top-level messages
 */
 static goffset
-folder_seek(struct _header_scan_state *s, goffset offset, gint whence)
+folder_seek (struct _header_scan_state *s, goffset offset, gint whence)
 {
 	goffset newoffset;
 
 	if (s->stream) {
-		if (CAMEL_IS_SEEKABLE_STREAM(s->stream)) {
+		if (CAMEL_IS_SEEKABLE_STREAM (s->stream)) {
 			/* NOTE: assumes whence seekable stream == whence libc, which is probably
 			   the case (or bloody well should've been) */
 			newoffset = camel_seekable_stream_seek (
@@ -972,11 +972,11 @@ folder_seek(struct _header_scan_state *s, goffset offset, gint whence)
 			errno = EINVAL;
 		}
 	} else {
-		newoffset = lseek(s->fd, offset, whence);
+		newoffset = lseek (s->fd, offset, whence);
 	}
 #ifdef PURIFY
-	purify_watch_remove(inend_id);
-	purify_watch_remove(inbuffer_id);
+	purify_watch_remove (inend_id);
+	purify_watch_remove (inbuffer_id);
 #endif
 	if (newoffset != -1) {
 		s->seek = newoffset;
@@ -987,53 +987,53 @@ folder_seek(struct _header_scan_state *s, goffset offset, gint whence)
 		s->ioerrno = errno?errno:EIO;
 	}
 #ifdef PURIFY
-	inend_id = purify_watch(&s->inend);
+	inend_id = purify_watch (&s->inend);
 	inbuffer_id = purify_watch_n(s->inend+1, SCAN_HEAD-1, "rw");
 #endif
 	return newoffset;
 }
 
 static void
-folder_push_part(struct _header_scan_state *s, struct _header_scan_stack *h)
+folder_push_part (struct _header_scan_state *s, struct _header_scan_stack *h)
 {
 	if (s->parts && s->parts->atleast > h->boundarylenfinal)
 		h->atleast = s->parts->atleast;
 	else
-		h->atleast = MAX(h->boundarylenfinal, 1);
+		h->atleast = MAX (h->boundarylenfinal, 1);
 
 	h->parent = s->parts;
 	s->parts = h;
 }
 
 static void
-folder_pull_part(struct _header_scan_state *s)
+folder_pull_part (struct _header_scan_state *s)
 {
 	struct _header_scan_stack *h;
 
 	h = s->parts;
 	if (h) {
 		s->parts = h->parent;
-		g_free(h->boundary);
+		g_free (h->boundary);
 #ifdef MEMPOOL
-		camel_mempool_destroy(h->pool);
+		camel_mempool_destroy (h->pool);
 #else
-		camel_header_raw_clear(&h->headers);
+		camel_header_raw_clear (&h->headers);
 #endif
-		camel_content_type_unref(h->content_type);
+		camel_content_type_unref (h->content_type);
 		if (h->pretext)
-			g_byte_array_free(h->pretext, TRUE);
+			g_byte_array_free (h->pretext, TRUE);
 		if (h->posttext)
-			g_byte_array_free(h->posttext, TRUE);
+			g_byte_array_free (h->posttext, TRUE);
 		if (h->from_line)
-			g_byte_array_free(h->from_line, TRUE);
-		g_free(h);
+			g_byte_array_free (h->from_line, TRUE);
+		g_free (h);
 	} else {
 		g_warning("Header stack underflow!\n");
 	}
 }
 
 static gint
-folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
+folder_scan_skip_line (struct _header_scan_state *s, GByteArray *save)
 {
 	gint atleast = s->atleast;
 	register gchar *inptr, *inend, c;
@@ -1043,7 +1043,7 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
 
 	d(printf("skipping line\n"));
 
-	while ( (len = folder_read(s)) > 0 && len > s->atleast) { /* ensure we have at least enough room here */
+	while ( (len = folder_read (s)) > 0 && len > s->atleast) { /* ensure we have at least enough room here */
 		inptr = s->inptr;
 		inend = s->inend;
 
@@ -1055,7 +1055,7 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
 		}
 
 		if (save)
-			g_byte_array_append(save, (guint8 *) s->inptr, inptr-s->inptr);
+			g_byte_array_append (save, (guint8 *) s->inptr, inptr-s->inptr);
 
 		s->inptr = inptr;
 
@@ -1074,7 +1074,7 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
 
 /* TODO: Is there any way to make this run faster?  It gets called a lot ... */
 static struct _header_scan_stack *
-folder_boundary_check(struct _header_scan_state *s, const gchar *boundary, gint *lastone)
+folder_boundary_check (struct _header_scan_state *s, const gchar *boundary, gint *lastone)
 {
 	struct _header_scan_stack *part;
 	gint len = s->inend - boundary; /* make sure we dont access past the buffer */
@@ -1086,7 +1086,7 @@ folder_boundary_check(struct _header_scan_state *s, const gchar *boundary, gint
 		h(printf("   against: '%.*s'\n", part->boundarylen, boundary));
 		if (part->boundary
 		    && part->boundarylen <= len
-		    && memcmp(boundary, part->boundary, part->boundarylen)==0) {
+		    && memcmp (boundary, part->boundary, part->boundarylen)==0) {
 			h(printf("matched boundary: %s\n", part->boundary));
 			/* again, make sure we're in range */
 			if (part->boundarylenfinal <= len) {
@@ -1115,27 +1115,27 @@ folder_boundary_check(struct _header_scan_state *s, const gchar *boundary, gint
 
 #ifdef MEMPOOL
 static void
-header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h, gchar *header, gint offset)
+header_append_mempool (struct _header_scan_state *s, struct _header_scan_stack *h, gchar *header, gint offset)
 {
 	struct _camel_header_raw *l, *n;
 	gchar *content;
 
-	content = strchr(header, ':');
+	content = strchr (header, ':');
 	if (content) {
 		register gint len;
-		n = camel_mempool_alloc(h->pool, sizeof(*n));
+		n = camel_mempool_alloc (h->pool, sizeof (*n));
 		n->next = NULL;
 
 		len = content-header;
-		n->name = camel_mempool_alloc(h->pool, len+1);
-		memcpy(n->name, header, len);
+		n->name = camel_mempool_alloc (h->pool, len+1);
+		memcpy (n->name, header, len);
 		n->name[len] = 0;
 
 		content++;
 
 		len = s->outptr - content;
-		n->value = camel_mempool_alloc(h->pool, len+1);
-		memcpy(n->value, content, len);
+		n->value = camel_mempool_alloc (h->pool, len+1);
+		memcpy (n->value, content, len);
 		n->value[len] = 0;
 
 		n->offset = offset;
@@ -1166,14 +1166,14 @@ header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h
 		if (headerlen >= (s->outend - s->outptr)) {					\
 			register gchar *outnew;							\
 			register gint olen = ((s->outend - s->outbuf) + headerlen) * 2 + 1;	\
-			outnew = g_realloc(s->outbuf, olen);					\
+			outnew = g_realloc (s->outbuf, olen);					\
 			s->outptr = s->outptr - s->outbuf + outnew;				\
 			s->outbuf = outnew;							\
 			s->outend = outnew + olen;						\
 		}										\
 		if (start[headerlen-1] == '\r')							\
 			headerlen--;								\
-		memcpy(s->outptr, start, headerlen);						\
+		memcpy (s->outptr, start, headerlen);						\
 		s->outptr += headerlen;								\
 	}											\
 	if (s->header_start == -1)								\
@@ -1181,7 +1181,7 @@ header_append_mempool(struct _header_scan_state *s, struct _header_scan_stack *h
 }
 
 static struct _header_scan_stack *
-folder_scan_header(struct _header_scan_state *s, gint *lastone)
+folder_scan_header (struct _header_scan_state *s, gint *lastone)
 {
 	gint atleast = s->atleast, newatleast;
 	gchar *start = NULL;
@@ -1192,9 +1192,9 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 
 	h(printf("scanning first bit\n"));
 
-	h = g_malloc0(sizeof(*h));
+	h = g_malloc0 (sizeof (*h));
 #ifdef MEMPOOL
-	h->pool = camel_mempool_new(8192, 4096, CAMEL_MEMPOOL_ALIGN_STRUCT);
+	h->pool = camel_mempool_new (8192, 4096, CAMEL_MEMPOOL_ALIGN_STRUCT);
 #endif
 
 	if (s->parts)
@@ -1208,14 +1208,14 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 
 		h(printf("atleast = %d\n", s->atleast));
 
-		while ((len = folder_read(s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
+		while ((len = folder_read (s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
 			inptr = s->inptr;
 			inend = s->inend-s->atleast+1;
 
 			while (inptr<inend) {
 				start = inptr;
 				if (!s->midline) {
-					if (folder_boundary_check(s, inptr, lastone)) {
+					if (folder_boundary_check (s, inptr, lastone)) {
 						if ((s->outptr>s->outbuf))
 							goto header_truncated; /* may not actually be truncated */
 
@@ -1227,7 +1227,7 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 				while ((*inptr++)!='\n')
 					;
 
-				g_assert(inptr<=s->inend+1);
+				g_assert (inptr<=s->inend+1);
 
 				/* check for sentinal or real end of line */
 				if (inptr > inend) {
@@ -1235,12 +1235,12 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 					/* didn't find end of line within our allowed area */
 					inptr = inend;
 					s->midline = TRUE;
-					header_append(s, start, inptr);
+					header_append (s, start, inptr);
 				} else {
 					h(printf("got line part: '%.*s'\n", inptr-1-start, start));
 					/* got a line, strip and add it, process it */
 					s->midline = FALSE;
-					header_append(s, start, inptr-1);
+					header_append (s, start, inptr-1);
 
 					/* check for end of headers */
 					if (s->outbuf == s->outptr)
@@ -1253,7 +1253,7 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 #ifdef PRESERVE_HEADERS
 						if (inptr-1 >= start) {
 							start=inptr-1;
-							header_append(s, start, inptr);
+							header_append (s, start, inptr);
 						}
 #endif
 #ifndef PRESERVE_HEADERS
@@ -1271,7 +1271,7 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 
 						h(printf("header '%s' at %d\n", s->outbuf, (gint)s->header_start));
 
-						header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
+						header_raw_append_parse (&h->headers, s->outbuf, s->header_start);
 						s->outptr = s->outbuf;
 						s->header_start = -1;
 					}
@@ -1298,13 +1298,13 @@ folder_scan_header(struct _header_scan_state *s, gint *lastone)
 	return h;
 
 header_truncated:
-	header_append(s, start, inptr);
+	header_append (s, start, inptr);
 
 	s->outptr[0] = 0;
 	if (s->outbuf == s->outptr)
 		goto header_done;
 
-	header_raw_append_parse(&h->headers, s->outbuf, s->header_start);
+	header_raw_append_parse (&h->headers, s->outbuf, s->header_start);
 
 	s->outptr = s->outbuf;
 header_done:
@@ -1315,7 +1315,7 @@ header_done:
 }
 
 static struct _header_scan_stack *
-folder_scan_content(struct _header_scan_state *s, gint *lastone, gchar **data, gsize *length)
+folder_scan_content (struct _header_scan_state *s, gint *lastone, gchar **data, gsize *length)
 {
 	gint atleast = s->atleast, newatleast;
 	register gchar *inptr;
@@ -1339,7 +1339,7 @@ folder_scan_content(struct _header_scan_state *s, gint *lastone, gchar **data, g
 	do {
 		s->atleast = newatleast;
 
-		while ((len = folder_read(s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
+		while ((len = folder_read (s))>0 && len >= s->atleast) { /* ensure we have at least enough room here */
 			inptr = s->inptr;
 			if (s->eof)
 				inend = s->inend;
@@ -1351,7 +1351,7 @@ folder_scan_content(struct _header_scan_state *s, gint *lastone, gchar **data, g
 
 			while (inptr<inend) {
 				if (!s->midline
-				    && (part = folder_boundary_check(s, inptr, lastone))) {
+				    && (part = folder_boundary_check (s, inptr, lastone))) {
 					onboundary = TRUE;
 
 					/* since we truncate the boundary data, we need at least 1 gchar here spare,
@@ -1421,32 +1421,32 @@ normal_exit:
 }
 
 static void
-folder_scan_close(struct _header_scan_state *s)
+folder_scan_close (struct _header_scan_state *s)
 {
-	g_free(s->realbuf);
-	g_free(s->outbuf);
+	g_free (s->realbuf);
+	g_free (s->outbuf);
 	while (s->parts)
-		folder_pull_part(s);
+		folder_pull_part (s);
 	if (s->fd != -1)
-		close(s->fd);
+		close (s->fd);
 	if (s->stream) {
 		g_object_unref (s->stream);
 	}
-	g_free(s);
+	g_free (s);
 }
 
 static struct _header_scan_state *
-folder_scan_init(void)
+folder_scan_init (void)
 {
 	struct _header_scan_state *s;
 
-	s = g_malloc(sizeof(*s));
+	s = g_malloc (sizeof (*s));
 
 	s->fd = -1;
 	s->stream = NULL;
 	s->ioerrno = 0;
 
-	s->outbuf = g_malloc(1024);
+	s->outbuf = g_malloc (1024);
 	s->outptr = s->outbuf;
 	s->outend = s->outbuf+1024;
 
@@ -1480,24 +1480,24 @@ folder_scan_init(void)
 }
 
 static void
-drop_states(struct _header_scan_state *s)
+drop_states (struct _header_scan_state *s)
 {
 	while (s->parts) {
-		folder_scan_drop_step(s);
+		folder_scan_drop_step (s);
 	}
 	s->unstep = 0;
 	s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
 }
 
 static void
-folder_scan_reset(struct _header_scan_state *s)
+folder_scan_reset (struct _header_scan_state *s)
 {
-	drop_states(s);
+	drop_states (s);
 	s->inend = s->inbuf;
 	s->inptr = s->inbuf;
 	s->inend[0] = '\n';
 	if (s->fd != -1) {
-		close(s->fd);
+		close (s->fd);
 		s->fd = -1;
 	}
 	if (s->stream) {
@@ -1509,9 +1509,9 @@ folder_scan_reset(struct _header_scan_state *s)
 }
 
 static gint
-folder_scan_init_with_fd(struct _header_scan_state *s, gint fd)
+folder_scan_init_with_fd (struct _header_scan_state *s, gint fd)
 {
-	folder_scan_reset(s);
+	folder_scan_reset (s);
 	s->fd = fd;
 
 	return 0;
@@ -1522,7 +1522,7 @@ folder_scan_init_with_stream (struct _header_scan_state *s,
                               CamelStream *stream,
                               GError **error)
 {
-	folder_scan_reset(s);
+	folder_scan_reset (s);
 	s->stream = g_object_ref (stream);
 
 	return 0;
@@ -1531,7 +1531,7 @@ folder_scan_init_with_stream (struct _header_scan_state *s,
 #define USE_FROM
 
 static void
-folder_scan_step(struct _header_scan_state *s, gchar **databuffer, gsize *datalength)
+folder_scan_step (struct _header_scan_state *s, gchar **databuffer, gsize *datalength)
 {
 	struct _header_scan_stack *h, *hb;
 	const gchar *content;
@@ -1544,7 +1544,7 @@ folder_scan_step(struct _header_scan_state *s, gchar **databuffer, gsize *datale
 /*	printf("\nSCAN PASS: state = %d '%s'\n", s->state, states[s->state]);*/
 
 tail_recurse:
-	d({
+	d ({
 		printf("\nSCAN STACK:\n");
 		printf(" '%s' :\n", states[s->state]);
 		hb = s->parts;
@@ -1566,12 +1566,12 @@ tail_recurse:
 #ifdef USE_FROM
 	case CAMEL_MIME_PARSER_STATE_INITIAL:
 		if (s->scan_from) {
-			h = g_malloc0(sizeof(*h));
+			h = g_malloc0 (sizeof (*h));
 			h->boundary = g_strdup("From ");
-			h->boundarylen = strlen(h->boundary);
+			h->boundarylen = strlen (h->boundary);
 			h->boundarylenfinal = h->boundarylen;
-			h->from_line = g_byte_array_new();
-			folder_push_part(s, h);
+			h->from_line = g_byte_array_new ();
+			folder_push_part (s, h);
 			s->state = CAMEL_MIME_PARSER_STATE_PRE_FROM;
 		} else {
 			s->start_of_from = -1;
@@ -1582,7 +1582,7 @@ tail_recurse:
 
 		h = s->parts;
 		do {
-			hb = folder_scan_content(s, &state, databuffer, datalength);
+			hb = folder_scan_content (s, &state, databuffer, datalength);
 			if (s->scan_pre_from && *datalength > 0) {
 				d(printf("got pre-from content %d bytes\n", *datalength));
 				return;
@@ -1591,12 +1591,12 @@ tail_recurse:
 
 		if (*datalength==0 && hb==h) {
 			d(printf("found 'From '\n"));
-			s->start_of_from = folder_tell(s);
-			folder_scan_skip_line(s, h->from_line);
+			s->start_of_from = folder_tell (s);
+			folder_scan_skip_line (s, h->from_line);
 			h->savestate = CAMEL_MIME_PARSER_STATE_INITIAL;
 			s->state = CAMEL_MIME_PARSER_STATE_FROM;
 		} else {
-			folder_pull_part(s);
+			folder_pull_part (s);
 			s->state = CAMEL_MIME_PARSER_STATE_EOF;
 		}
 		return;
@@ -1607,8 +1607,8 @@ tail_recurse:
 
 	scan_header:
 	case CAMEL_MIME_PARSER_STATE_FROM:
-		s->start_of_headers = folder_tell(s);
-		h = folder_scan_header(s, &state);
+		s->start_of_headers = folder_tell (s);
+		h = folder_scan_header (s, &state);
 #ifdef USE_FROM
 		if (s->scan_from)
 			h->savestate = CAMEL_MIME_PARSER_STATE_FROM_END;
@@ -1620,14 +1620,14 @@ tail_recurse:
 
 		type = CAMEL_MIME_PARSER_STATE_HEADER;
 		if ((content = camel_header_raw_find(&h->headers, "Content-Type", NULL))
-		     && (ct = camel_content_type_decode(content))) {
+		     && (ct = camel_content_type_decode (content))) {
 			if (!g_ascii_strcasecmp(ct->type, "multipart")) {
 				if (!camel_content_type_is(ct, "multipart", "signed")
 				    && (bound = camel_content_type_param(ct, "boundary"))) {
 					d(printf("multipart, boundary = %s\n", bound));
-					h->boundarylen = strlen(bound)+2;
+					h->boundarylen = strlen (bound)+2;
 					h->boundarylenfinal = h->boundarylen+2;
-					h->boundary = g_malloc(h->boundarylen+3);
+					h->boundary = g_malloc (h->boundarylen+3);
 					sprintf(h->boundary, "--%s--", bound);
 					type = CAMEL_MIME_PARSER_STATE_MULTIPART;
 				} else {
@@ -1658,7 +1658,7 @@ tail_recurse:
 			}
 		}
 		h->content_type = ct;
-		folder_push_part(s, h);
+		folder_push_part (s, h);
 		s->state = type;
 		return;
 
@@ -1675,15 +1675,15 @@ tail_recurse:
 			hb = folder_scan_content (s, &state, databuffer, datalength);
 
 			d(printf ("\n\nOriginal content: '"));
-			d(fwrite(*databuffer, sizeof(gchar), *datalength, stdout));
+			d (fwrite (*databuffer, sizeof (gchar), *datalength, stdout));
 			d(printf("'\n"));
 
 			if (*datalength > 0) {
 				while (f) {
-					camel_mime_filter_filter(f->filter, *databuffer, *datalength, presize,
+					camel_mime_filter_filter (f->filter, *databuffer, *datalength, presize,
 								 databuffer, datalength, &presize);
 					d(printf("Filtered content (%s): '", ((CamelObject *)f->filter)->klass->name));
-					d(fwrite(*databuffer, sizeof(gchar), *datalength, stdout));
+					d (fwrite (*databuffer, sizeof (gchar), *datalength, stdout));
 					d(printf("'\n"));
 					f = f->next;
 				}
@@ -1693,7 +1693,7 @@ tail_recurse:
 
 		/* check for any filter completion data */
 		while (f) {
-			camel_mime_filter_complete(f->filter, *databuffer, *datalength, presize,
+			camel_mime_filter_complete (f->filter, *databuffer, *datalength, presize,
 						   databuffer, datalength, &presize);
 			f = f->next;
 		}
@@ -1716,7 +1716,7 @@ tail_recurse:
 		seenlast = FALSE;
 		do {
 			do {
-				hb = folder_scan_content(s, &state, databuffer, datalength);
+				hb = folder_scan_content (s, &state, databuffer, datalength);
 				if (*datalength>0) {
 					/* instead of a new state, we'll just store it locally and provide
 					   an accessor function */
@@ -1724,23 +1724,23 @@ tail_recurse:
 						 h->prestage>0?"post":"pre", h, *datalength, *databuffer));
 					if (h->prestage > 0) {
 						if (h->posttext == NULL)
-							h->posttext = g_byte_array_new();
-						g_byte_array_append(h->posttext, (guint8 *) *databuffer, *datalength);
+							h->posttext = g_byte_array_new ();
+						g_byte_array_append (h->posttext, (guint8 *) *databuffer, *datalength);
 					} else {
 						if (h->pretext == NULL)
-							h->pretext = g_byte_array_new();
-						g_byte_array_append(h->pretext, (guint8 *) *databuffer, *datalength);
+							h->pretext = g_byte_array_new ();
+						g_byte_array_append (h->pretext, (guint8 *) *databuffer, *datalength);
 					}
 				}
 			} while (hb==h && *datalength>0);
 			h->prestage++;
 			if (*datalength==0 && hb==h && !seenlast) {
 				d(printf("got boundary: %s last=%d\n", hb->boundary, state));
-				s->start_of_boundary = folder_tell(s);
-				folder_scan_skip_line(s, NULL);
+				s->start_of_boundary = folder_tell (s);
+				folder_scan_skip_line (s, NULL);
 				if (!state) {
 					s->state = CAMEL_MIME_PARSER_STATE_FROM;
-					folder_scan_step(s, databuffer, datalength);
+					folder_scan_step (s, databuffer, datalength);
 					s->parts->savestate = CAMEL_MIME_PARSER_STATE_MULTIPART; /* set return state for the new head part */
 					return;
 				} else
@@ -1755,7 +1755,7 @@ tail_recurse:
 
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 		s->state = CAMEL_MIME_PARSER_STATE_FROM;
-		folder_scan_step(s, databuffer, datalength);
+		folder_scan_step (s, databuffer, datalength);
 		s->parts->savestate = CAMEL_MIME_PARSER_STATE_MESSAGE_END;
 		break;
 
@@ -1764,7 +1764,7 @@ tail_recurse:
 	case CAMEL_MIME_PARSER_STATE_MULTIPART_END:
 	case CAMEL_MIME_PARSER_STATE_MESSAGE_END:
 		s->state = s->parts->savestate;
-		folder_pull_part(s);
+		folder_pull_part (s);
 		if (s->state & CAMEL_MIME_PARSER_STATE_END)
 			return;
 		goto tail_recurse;
@@ -1782,7 +1782,7 @@ tail_recurse:
 
 /* drops the current state back one */
 static void
-folder_scan_drop_step(struct _header_scan_state *s)
+folder_scan_drop_step (struct _header_scan_state *s)
 {
 	switch (s->state) {
 	case CAMEL_MIME_PARSER_STATE_EOF:
@@ -1793,7 +1793,7 @@ folder_scan_drop_step(struct _header_scan_state *s)
 	case CAMEL_MIME_PARSER_STATE_FROM:
 	case CAMEL_MIME_PARSER_STATE_PRE_FROM:
 		s->state = CAMEL_MIME_PARSER_STATE_INITIAL;
-		folder_pull_part(s);
+		folder_pull_part (s);
 		return;
 
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
@@ -1806,7 +1806,7 @@ folder_scan_drop_step(struct _header_scan_state *s)
 	case CAMEL_MIME_PARSER_STATE_MESSAGE_END:
 
 		s->state = s->parts->savestate;
-		folder_pull_part(s);
+		folder_pull_part (s);
 		if (s->state & CAMEL_MIME_PARSER_STATE_END) {
 			s->state &= ~CAMEL_MIME_PARSER_STATE_END;
 		}
@@ -1818,7 +1818,7 @@ folder_scan_drop_step(struct _header_scan_state *s)
 }
 
 #ifdef STANDALONE
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	gint fd;
 	struct _header_scan_state *s;
@@ -1842,21 +1842,21 @@ gint main(gint argc, gchar **argv)
 		name = argv[i];
 		printf("opening: %s", name);
 
-		fd = g_open(name, O_RDONLY|O_BINARY, 0);
+		fd = g_open (name, O_RDONLY|O_BINARY, 0);
 		if (fd==-1) {
 			perror("Cannot open mailbox");
-			exit(1);
+			exit (1);
 		}
-		s = folder_scan_init();
-		folder_scan_init_with_fd(s, fd);
+		s = folder_scan_init ();
+		folder_scan_init_with_fd (s, fd);
 		s->scan_from = FALSE;
 #if 0
-		h = g_malloc0(sizeof(*h));
+		h = g_malloc0 (sizeof (*h));
 		h->savestate = CAMEL_MIME_PARSER_STATE_EOF;
-		folder_push_part(s, h);
+		folder_push_part (s, h);
 #endif
 		while (s->state != CAMEL_MIME_PARSER_STATE_EOF) {
-			folder_scan_step(s, &data, &len);
+			folder_scan_step (s, &data, &len);
 			printf("\n -- PARSER STEP RETURN -- %d '%s'\n\n", s->state, states[s->state]);
 			switch (s->state) {
 			case CAMEL_MIME_PARSER_STATE_HEADER:
@@ -1879,22 +1879,22 @@ gint main(gint argc, gchar **argv)
 					printf("adding base64 filter\n");
 					attachname = g_strdup_printf("attach.%d.%d", i, attach++);
 #if 0
-					folder_push_filter_save(s, attachname);
+					folder_push_filter_save (s, attachname);
 #endif
-					g_free(attachname);
+					g_free (attachname);
 #if 0
-					folder_push_filter_mime(s, 0);
+					folder_push_filter_mime (s, 0);
 #endif
 				}
 				if (encoding && !g_ascii_strncasecmp(encoding, " quoted-printable", 17)) {
 					printf("adding quoted-printable filter\n");
 					attachname = g_strdup_printf("attach.%d.%d", i, attach++);
 #if 0
-					folder_push_filter_save(s, attachname);
+					folder_push_filter_save (s, attachname);
 #endif
-					g_free(attachname);
+					g_free (attachname);
 #if 0
-					folder_push_filter_mime(s, 1);
+					folder_push_filter_mime (s, 1);
 #endif
 				}
 
@@ -1907,20 +1907,20 @@ gint main(gint argc, gchar **argv)
 				if (encoding && !g_ascii_strncasecmp(encoding, " base64", 7)) {
 					printf("removing filters\n");
 #if 0
-					folder_filter_pull(s);
-					folder_filter_pull(s);
+					folder_filter_pull (s);
+					folder_filter_pull (s);
 #endif
 				}
 				if (encoding && !g_ascii_strncasecmp(encoding, " quoted-printable", 17)) {
 					printf("removing filters\n");
 #if 0
-					folder_filter_pull(s);
-					folder_filter_pull(s);
+					folder_filter_pull (s);
+					folder_filter_pull (s);
 #endif
 				}
 				if (charset) {
 #if 0
-					folder_filter_pull(s);
+					folder_filter_pull (s);
 #endif
 					charset = NULL;
 				}
@@ -1930,8 +1930,8 @@ gint main(gint argc, gchar **argv)
 				break;
 			}
 		}
-		folder_scan_close(s);
-		close(fd);
+		folder_scan_close (s);
+		close (fd);
 	}
 	return 0;
 }
diff --git a/camel/camel-mime-parser.h b/camel/camel-mime-parser.h
index 73321e6..cce09fa 100644
--- a/camel/camel-mime-parser.h
+++ b/camel/camel-mime-parser.h
@@ -122,7 +122,7 @@ camel_mime_parser_state_t camel_mime_parser_step (CamelMimeParser *parser, gchar
 void camel_mime_parser_unstep (CamelMimeParser *parser);
 void camel_mime_parser_drop_step (CamelMimeParser *parser);
 camel_mime_parser_state_t camel_mime_parser_state (CamelMimeParser *parser);
-void camel_mime_parser_push_state(CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar *boundary);
+void camel_mime_parser_push_state (CamelMimeParser *mp, camel_mime_parser_state_t newstate, const gchar *boundary);
 
 /* read through the parser */
 gint camel_mime_parser_read (CamelMimeParser *parser, const gchar **databuffer, gint len, GError **error);
@@ -155,7 +155,7 @@ goffset camel_mime_parser_seek (CamelMimeParser *parser, goffset offset, gint wh
 
 goffset camel_mime_parser_tell_start_headers (CamelMimeParser *parser);
 goffset camel_mime_parser_tell_start_from (CamelMimeParser *parser);
-goffset camel_mime_parser_tell_start_boundary(CamelMimeParser *parser);
+goffset camel_mime_parser_tell_start_boundary (CamelMimeParser *parser);
 
 G_END_DECLS
 
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c
index f33cd8e..8bb6165 100644
--- a/camel/camel-mime-part-utils.c
+++ b/camel/camel-mime-part-utils.c
@@ -132,7 +132,7 @@ camel_mime_part_construct_content_from_parser (CamelMimePart *dw,
 		else
 			content = (CamelDataWrapper *) camel_multipart_new ();
 
-		camel_multipart_construct_from_parser((CamelMultipart *)content, mp);
+		camel_multipart_construct_from_parser ((CamelMultipart *)content, mp);
 		d(printf("Created multi-part\n"));
 		break;
 	default:
@@ -171,11 +171,11 @@ camel_mime_message_build_preview (CamelMimePart *msg,
 		gint i, nparts;
 		CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)msg);
 
-		if (!CAMEL_IS_MULTIPART(mp))
+		if (!CAMEL_IS_MULTIPART (mp))
 			g_assert (0);
-		nparts = camel_multipart_get_number(mp);
+		nparts = camel_multipart_get_number (mp);
 		for (i = 0; i < nparts && !got_plain; i++) {
-			CamelMimePart *part = camel_multipart_get_part(mp, i);
+			CamelMimePart *part = camel_multipart_get_part (mp, i);
 			got_plain = camel_mime_message_build_preview (part, info);
 		}
 
@@ -183,7 +183,7 @@ camel_mime_message_build_preview (CamelMimePart *msg,
 		/*    !camel_content_type_is (dw->mime_type, "text", "html") && */
 		    !camel_content_type_is (dw->mime_type, "text", "calendar")) {
 		CamelStream *mstream, *bstream;
-		mstream = camel_stream_mem_new();
+		mstream = camel_stream_mem_new ();
 		if (camel_data_wrapper_decode_to_stream (dw, mstream, NULL) > 0) {
 			gchar *line = NULL;
 			GString *str = g_string_new (NULL);
@@ -192,38 +192,38 @@ camel_mime_message_build_preview (CamelMimePart *msg,
 			bstream = camel_stream_buffer_new (mstream, CAMEL_STREAM_BUFFER_READ|CAMEL_STREAM_BUFFER_BUFFER);
 
 			/* We should fetch just 200 unquoted lines. */
-			while ((line = camel_stream_buffer_read_line((CamelStreamBuffer *)bstream, NULL)) && str->len < 200) {
+			while ((line = camel_stream_buffer_read_line ((CamelStreamBuffer *)bstream, NULL)) && str->len < 200) {
 				gchar *tmp = line;
 				if (!line)
 					continue;
 
 				if (*line == '>' || strstr(line, "wrote:")) {
-					g_free(tmp);
+					g_free (tmp);
 					continue;
 				}
 				if (g_str_has_prefix (line, "--")) {
-					g_free(tmp);
+					g_free (tmp);
 					line = NULL;
 					break;
 				}
 				while (*line && ((*line == ' ') || *line == '\t'))
 					line++;
 				if (*line == '\0' || *line == '\n') {
-					g_free(tmp);
+					g_free (tmp);
 					continue;
 				}
 
 				g_string_append (str, " ");
 				g_string_append (str, line);
-				g_free(tmp);
+				g_free (tmp);
 				line = NULL;
 			}
 			if (str->len > 100) {
 				g_string_insert (str, 100, "\n");
 			}
 			/* We don't mark dirty, as we don't store these */
-			((CamelMessageInfoBase *) info)->preview = camel_utf8_make_valid(str->str);
-			g_string_free(str, TRUE);
+			((CamelMessageInfoBase *) info)->preview = camel_utf8_make_valid (str->str);
+			g_string_free (str, TRUE);
 
 			g_object_unref (bstream);
 		}
diff --git a/camel/camel-mime-part-utils.h b/camel/camel-mime-part-utils.h
index 0bb95c3..3c18aaa 100644
--- a/camel/camel-mime-part-utils.h
+++ b/camel/camel-mime-part-utils.h
@@ -39,7 +39,7 @@ gboolean	camel_mime_part_construct_content_from_parser
 						(CamelMimePart *mime_part,
 						 CamelMimeParser *mp,
 						 GError **error);
-gboolean	camel_mime_message_build_preview(CamelMimePart *mime_part,
+gboolean	camel_mime_message_build_preview (CamelMimePart *mime_part,
 						 CamelMessageInfo *info);
 
 G_END_DECLS
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index bf1c574..90f9d23 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -116,18 +116,18 @@ write_references (CamelStream *stream,
 	   start with ... */
 
 	value = h->value;
-	len = strlen(h->name)+1;
+	len = strlen (h->name)+1;
 	total = camel_stream_printf (
 		stream, "%s%s", h->name, isspace(value[0])?":":": ");
 	if (total == -1)
 		return -1;
 	while (*value) {
 		ids = value;
-		ide = strchr(ids+1, '>');
+		ide = strchr (ids+1, '>');
 		if (ide)
 			value = ++ide;
 		else
-			ide = value = strlen(ids)+ids;
+			ide = value = strlen (ids)+ids;
 
 		if (len>0 && len + (ide - ids) >= CAMEL_FOLD_SIZE) {
 			out = camel_stream_printf (stream, "\n\t");
@@ -151,7 +151,7 @@ write_references (CamelStream *stream,
 /* recognize and associate them with a unique enum  */
 /* identifier (see CamelHeaderType above)           */
 static void
-init_header_name_table(void)
+init_header_name_table (void)
 {
 	header_name_table = g_hash_table_new (
 		camel_strcase_hash, camel_strcase_equal);
@@ -374,7 +374,7 @@ mime_part_finalize (GObject *object)
 	camel_string_list_free (priv->content_languages);
 	camel_content_disposition_unref (priv->disposition);
 
-	camel_header_raw_clear(&CAMEL_MIME_PART (object)->headers);
+	camel_header_raw_clear (&CAMEL_MIME_PART (object)->headers);
 
 	/* Chain up to parent's finalize() method. */
 	G_OBJECT_CLASS (camel_mime_part_parent_class)->finalize (object);
@@ -505,12 +505,12 @@ mime_part_write_to_stream (CamelDataWrapper *dw,
 			if (val == NULL) {
 				g_warning("h->value is NULL here for %s", h->name);
 				count = 0;
-			} else if ((writefn = g_hash_table_lookup(header_formatted_table, h->name)) == NULL) {
-				val = camel_header_fold(val, strlen(h->name));
+			} else if ((writefn = g_hash_table_lookup (header_formatted_table, h->name)) == NULL) {
+				val = camel_header_fold (val, strlen (h->name));
 				count = camel_stream_printf(stream, "%s%s%s\n", h->name, isspace(val[0]) ? ":" : ": ", val);
-				g_free(val);
+				g_free (val);
 			} else {
-				count = writefn(stream, h);
+				count = writefn (stream, h);
 			}
 			if (count == -1) {
 				g_set_error (
@@ -594,7 +594,7 @@ mime_part_write_to_stream (CamelDataWrapper *dw,
 
 			/* we only re-do crlf on encoded blocks */
 			if (filter && camel_content_type_is (dw->mime_type, "text", "*")) {
-				CamelMimeFilter *crlf = camel_mime_filter_crlf_new(CAMEL_MIME_FILTER_CRLF_ENCODE,
+				CamelMimeFilter *crlf = camel_mime_filter_crlf_new (CAMEL_MIME_FILTER_CRLF_ENCODE,
 										   CAMEL_MIME_FILTER_CRLF_MODE_CRLF_ONLY);
 
 				camel_stream_filter_add (
@@ -655,7 +655,7 @@ mime_part_construct_from_stream (CamelDataWrapper *dw,
 
 	d(printf("mime_part::construct_from_stream()\n"));
 
-	mp = camel_mime_parser_new();
+	mp = camel_mime_parser_new ();
 	if (camel_mime_parser_init_with_stream (mp, s, error) == -1) {
 		ret = -1;
 	} else {
@@ -682,7 +682,7 @@ mime_part_construct_from_parser (CamelMimePart *mime_part,
 
 	d(printf("mime_part::construct_from_parser()\n"));
 
-	switch (camel_mime_parser_step(mp, &buf, &len)) {
+	switch (camel_mime_parser_step (mp, &buf, &len)) {
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 		/* set the default type of a message always */
 		if (dw->mime_type)
@@ -691,7 +691,7 @@ mime_part_construct_from_parser (CamelMimePart *mime_part,
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 	case CAMEL_MIME_PARSER_STATE_MULTIPART:
 		/* we have the headers, build them into 'us' */
-		headers = camel_mime_parser_headers_raw(mp);
+		headers = camel_mime_parser_headers_raw (mp);
 
 		/* if content-type exists, process it first, set for fallback charset in headers */
 		content = camel_header_raw_find(&headers, "content-type", NULL);
@@ -703,7 +703,7 @@ mime_part_construct_from_parser (CamelMimePart *mime_part,
 			    && headers->value != content)
 				camel_medium_add_header((CamelMedium *)dw, "X-Invalid-Content-Type", headers->value);
 			else
-				camel_medium_add_header((CamelMedium *)dw, headers->name, headers->value);
+				camel_medium_add_header ((CamelMedium *)dw, headers->name, headers->value);
 			headers = headers->next;
 		}
 
@@ -716,7 +716,7 @@ mime_part_construct_from_parser (CamelMimePart *mime_part,
 	}
 
 	d(printf("mime_part::construct_from_parser() leaving\n"));
-	err = camel_mime_parser_errno(mp);
+	err = camel_mime_parser_errno (mp);
 	if (err != 0) {
 		errno = err;
 		g_set_error (
@@ -959,10 +959,10 @@ camel_mime_part_set_filename (CamelMimePart *mime_part, const gchar *filename)
 
 	camel_header_set_param (
 		&mime_part->priv->disposition->params, "filename", filename);
-	str = camel_content_disposition_format(mime_part->priv->disposition);
+	str = camel_content_disposition_format (mime_part->priv->disposition);
 
 	camel_medium_set_header (medium, "Content-Disposition", str);
-	g_free(str);
+	g_free (str);
 
 	dw = (CamelDataWrapper *) mime_part;
 	if (!dw->mime_type)
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 4b00513..a60baff 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -387,19 +387,19 @@ camel_uudecode_step (guchar *in, gsize len, guchar *out, gint *state, guint32 *s
  * Returns: the number of bytes encoded
  **/
 gsize
-camel_quoted_encode_close(guchar *in, gsize len, guchar *out, gint *state, gint *save)
+camel_quoted_encode_close (guchar *in, gsize len, guchar *out, gint *state, gint *save)
 {
 	register guchar *outptr = out;
 	gint last;
 
 	if (len>0)
-		outptr += camel_quoted_encode_step(in, len, outptr, state, save);
+		outptr += camel_quoted_encode_step (in, len, outptr, state, save);
 
 	last = *state;
 	if (last != -1) {
 		/* space/tab must be encoded if it's the last character on
 		   the line */
-		if (camel_mime_is_qpsafe(last) && last!=' ' && last!=9) {
+		if (camel_mime_is_qpsafe (last) && last!=' ' && last!=9) {
 			*outptr++ = last;
 		} else {
 			*outptr++ = '=';
@@ -466,7 +466,7 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
 			last = -1;
 		} else {
 			if (last != -1) {
-				if (camel_mime_is_qpsafe(last)) {
+				if (camel_mime_is_qpsafe (last)) {
 					*outptr++ = last;
 					sofar++;
 				} else {
@@ -474,7 +474,7 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
 				}
 			}
 
-			if (camel_mime_is_qpsafe(c)) {
+			if (camel_mime_is_qpsafe (c)) {
 				if (sofar > 74) {
 					*outptr++ = '=';
 					*outptr++ = '\n';
@@ -533,7 +533,7 @@ camel_quoted_encode_step (guchar *in, gsize len, guchar *out, gint *statep, gint
  * Returns: the number of bytes decoded
  **/
 gsize
-camel_quoted_decode_step(guchar *in, gsize len, guchar *out, gint *savestate, gint *saveme)
+camel_quoted_decode_step (guchar *in, gsize len, guchar *out, gint *savestate, gint *saveme)
 {
 	register guchar *inptr, *outptr;
 	guchar *inend, c;
@@ -581,9 +581,9 @@ camel_quoted_decode_step(guchar *in, gsize len, guchar *out, gint *savestate, gi
 			break;
 		case 2:
 			c = *inptr++;
-			if (isxdigit(c) && isxdigit(save)) {
-				c = toupper(c);
-				save = toupper(save);
+			if (isxdigit (c) && isxdigit (save)) {
+				c = toupper (c);
+				save = toupper (save);
 				*outptr++ = (((save>='A'?save-'A'+10:save-'0')&0x0f) << 4)
 					| ((c>='A'?c-'A'+10:c-'0')&0x0f);
 			} else if (c=='\n' && save == '\r') {
@@ -625,7 +625,7 @@ camel_quoted_decode_step(guchar *in, gsize len, guchar *out, gint *savestate, gi
   which is slightly different than plain quoted-printable (mainly by allowing 0x20 <> _)
 */
 static gsize
-quoted_decode(const guchar *in, gsize len, guchar *out)
+quoted_decode (const guchar *in, gsize len, guchar *out)
 {
 	register const guchar *inptr;
 	register guchar *outptr;
@@ -644,8 +644,8 @@ quoted_decode(const guchar *in, gsize len, guchar *out)
 		if (c=='=') {
 			/* silently ignore truncated data? */
 			if (inend-in>=2) {
-				c = toupper(*inptr++);
-				c1 = toupper(*inptr++);
+				c = toupper (*inptr++);
+				c1 = toupper (*inptr++);
 				*outptr++ = (((c>='A'?c-'A'+10:c-'0')&0x0f) << 4)
 					| ((c1>='A'?c1-'A'+10:c1-'0')&0x0f);
 			} else {
@@ -696,15 +696,15 @@ quoted_encode (const guchar *in, gsize len, guchar *out, gushort safemask)
 }
 
 static void
-header_decode_lwsp(const gchar **in)
+header_decode_lwsp (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gchar c;
 
 	d2(printf("is ws: '%s'\n", *in));
 
-	while ((camel_mime_is_lwsp(*inptr) || *inptr =='(') && *inptr != '\0') {
-		while (camel_mime_is_lwsp(*inptr) && *inptr != '\0') {
+	while ((camel_mime_is_lwsp (*inptr) || *inptr =='(') && *inptr != '\0') {
+		while (camel_mime_is_lwsp (*inptr) && *inptr != '\0') {
 			d2(printf("(%c)", *inptr));
 			inptr++;
 		}
@@ -1084,11 +1084,11 @@ append_8bit (GString *out, const gchar *inbuf, gsize inlen, const gchar *charset
 		return FALSE;
 
 	outlen = inlen * 6 + 16;
-	outbuf = outbase = g_malloc(outlen);
+	outbuf = outbase = g_malloc (outlen);
 
 	if (camel_iconv (ic, &inbuf, &inlen, &outbuf, &outlen) == (gsize) -1) {
 		w(g_warning("Conversion to '%s' failed: %s", charset, g_strerror (errno)));
-		g_free(outbase);
+		g_free (outbase);
 		camel_iconv_close (ic);
 		return FALSE;
 	}
@@ -1096,8 +1096,8 @@ append_8bit (GString *out, const gchar *inbuf, gsize inlen, const gchar *charset
 	camel_iconv (ic, NULL, NULL, &outbuf, &outlen);
 
 	*outbuf = 0;
-	g_string_append(out, outbase);
-	g_free(outbase);
+	g_string_append (out, outbase);
+	g_free (outbase);
 	camel_iconv_close (ic);
 
 	return TRUE;
@@ -1282,7 +1282,7 @@ camel_header_format_ctext (const gchar *in, const gchar *default_charset)
 
 /* FIXME: needs a way to cache iconv opens for different charsets? */
 static void
-rfc2047_encode_word(GString *outstring, const gchar *in, gsize len, const gchar *type, gushort safemask)
+rfc2047_encode_word (GString *outstring, const gchar *in, gsize len, const gchar *type, gushort safemask)
 {
 	iconv_t ic = (iconv_t) -1;
 	gchar *buffer, *out, *ascii;
@@ -1345,14 +1345,14 @@ rfc2047_encode_word(GString *outstring, const gchar *in, gsize len, const gchar
 				proclen = inlen;
 			}
 
-			memcpy(out, inptr, proclen);
+			memcpy (out, inptr, proclen);
 			inptr += proclen;
 			inlen -= proclen;
 			out += proclen;
 		} else {
 			/* well we could do similar, but we can't (without undue effort), we'll just break it up into
 			   hopefully-small-enough chunks, and leave it at that */
-			convlen = MIN(inlen, CAMEL_FOLD_PREENCODED);
+			convlen = MIN (inlen, CAMEL_FOLD_PREENCODED);
 			p = inptr;
 			if (camel_iconv (ic, &inptr, (gsize *) &convlen, &out, &outlen) == (gsize) -1 && errno != EINVAL) {
 				w(g_warning("Conversion problem: conversion truncated: %s", g_strerror (errno)));
@@ -1529,21 +1529,21 @@ camel_header_encode_string (const guchar *in)
 
 /* apply quoted-string rules to a string */
 static void
-quote_word(GString *out, gboolean do_quotes, const gchar *start, gsize len)
+quote_word (GString *out, gboolean do_quotes, const gchar *start, gsize len)
 {
 	gint i, c;
 
 	/* TODO: What about folding on long lines? */
 	if (do_quotes)
-		g_string_append_c(out, '"');
+		g_string_append_c (out, '"');
 	for (i=0;i<len;i++) {
 		c = *start++;
 		if (c == '\"' || c=='\\' || c=='\r')
-			g_string_append_c(out, '\\');
-		g_string_append_c(out, c);
+			g_string_append_c (out, '\\');
+		g_string_append_c (out, c);
 	}
 	if (do_quotes)
-		g_string_append_c(out, '"');
+		g_string_append_c (out, '"');
 }
 
 /* incrementing possibility for the word type */
@@ -1669,8 +1669,8 @@ header_encode_phrase_merge_words (GList **wordsp)
 			if (word_types_compatable (word->type, next->type)) {
 				if (MERGED_WORD_LT_FOLDLEN (next->end - word->start, MAX (word->type, next->type))) {
 					/* the resulting word type is the MAX of the 2 types */
-					word->type = MAX(word->type, next->type);
-					word->encoding = MAX(word->encoding, next->encoding);
+					word->type = MAX (word->type, next->type);
+					word->encoding = MAX (word->encoding, next->encoding);
 					word->end = next->end;
 					words = g_list_remove_link (words, nextl);
 					g_list_free_1 (nextl);
@@ -1820,26 +1820,26 @@ decode_token (const gchar **in)
  * Returns: a new string containing the first token in @in
  **/
 gchar *
-camel_header_token_decode(const gchar *in)
+camel_header_token_decode (const gchar *in)
 {
 	if (in == NULL)
 		return NULL;
 
-	return decode_token(&in);
+	return decode_token (&in);
 }
 
 /*
    <"> * ( <any gchar except <"> \, cr  /  \ <any char> ) <">
 */
 static gchar *
-header_decode_quoted_string(const gchar **in)
+header_decode_quoted_string (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gchar *out = NULL, *outptr;
 	gsize outlen;
 	gint c;
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (*inptr == '"') {
 		const gchar *intmp;
 		gint skip = 0;
@@ -1854,7 +1854,7 @@ header_decode_quoted_string(const gchar **in)
 			}
 		}
 		outlen = intmp-inptr-skip;
-		out = outptr = g_malloc(outlen+1);
+		out = outptr = g_malloc (outlen+1);
 		while ( (c = *inptr) && c!= '"') {
 			inptr++;
 			if (c=='\\' && *inptr) {
@@ -1871,17 +1871,17 @@ header_decode_quoted_string(const gchar **in)
 }
 
 static gchar *
-header_decode_atom(const gchar **in)
+header_decode_atom (const gchar **in)
 {
 	const gchar *inptr = *in, *start;
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	start = inptr;
-	while (camel_mime_is_atom(*inptr))
+	while (camel_mime_is_atom (*inptr))
 		inptr++;
 	*in = inptr;
 	if (inptr > start)
-		return g_strndup(start, inptr-start);
+		return g_strndup (start, inptr-start);
 	else
 		return NULL;
 }
@@ -1902,18 +1902,18 @@ header_decode_word (const gchar **in)
 }
 
 static gchar *
-header_decode_value(const gchar **in)
+header_decode_value (const gchar **in)
 {
 	const gchar *inptr = *in;
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (*inptr == '"') {
 		d(printf("decoding quoted string\n"));
-		return header_decode_quoted_string(in);
-	} else if (camel_mime_is_ttoken(*inptr)) {
+		return header_decode_quoted_string (in);
+	} else if (camel_mime_is_ttoken (*inptr)) {
 		d(printf("decoding token\n"));
 		/* this may not have the right specials for all params? */
-		return decode_token(in);
+		return decode_token (in);
 	}
 	return NULL;
 }
@@ -1930,14 +1930,14 @@ header_decode_value(const gchar **in)
  * Returns: the gint value
  **/
 gint
-camel_header_decode_int(const gchar **in)
+camel_header_decode_int (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gint c, v=0;
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	while ( (c=*inptr++ & 0xff)
-		&& isdigit(c) ) {
+		&& isdigit (c) ) {
 		v = v*10+(c-'0');
 	}
 	*in = inptr-1;
@@ -1975,27 +1975,27 @@ hex_decode (const gchar *in, gsize len)
 
 /* Tries to convert @in @from charset @to charset.  Any failure, we get no data out rather than partial conversion */
 static gchar *
-header_convert(const gchar *to, const gchar *from, const gchar *in, gsize inlen)
+header_convert (const gchar *to, const gchar *from, const gchar *in, gsize inlen)
 {
 	iconv_t ic;
 	gsize outlen, ret;
 	gchar *outbuf, *outbase, *result = NULL;
 
-	ic = camel_iconv_open(to, from);
+	ic = camel_iconv_open (to, from);
 	if (ic == (iconv_t) -1)
 		return NULL;
 
 	outlen = inlen * 6 + 16;
-	outbuf = outbase = g_malloc(outlen);
+	outbuf = outbase = g_malloc (outlen);
 
-	ret = camel_iconv(ic, &in, &inlen, &outbuf, &outlen);
+	ret = camel_iconv (ic, &in, &inlen, &outbuf, &outlen);
 	if (ret != (gsize) -1) {
-		camel_iconv(ic, NULL, NULL, &outbuf, &outlen);
+		camel_iconv (ic, NULL, NULL, &outbuf, &outlen);
 		*outbuf = '\0';
-		result = g_strdup(outbase);
+		result = g_strdup (outbase);
 	}
-	camel_iconv_close(ic);
-	g_free(outbase);
+	camel_iconv_close (ic);
+	g_free (outbase);
 
 	return result;
 }
@@ -2016,8 +2016,8 @@ rfc2184_decode (const gchar *in, gsize len)
 	if (!inptr)
 		return NULL;
 
-	encoding = g_alloca(inptr-in+1);
-	memcpy(encoding, in, inptr-in);
+	encoding = g_alloca (inptr-in+1);
+	memcpy (encoding, in, inptr-in);
 	encoding[inptr-in] = 0;
 	charset = camel_iconv_charset_name (encoding);
 
@@ -2030,7 +2030,7 @@ rfc2184_decode (const gchar *in, gsize len)
 
 	decword = hex_decode (inptr, inend - inptr);
 	decoded = header_convert("UTF-8", charset, decword, strlen(decword));
-	g_free(decword);
+	g_free (decword);
 
 	return decoded;
 }
@@ -2146,7 +2146,7 @@ camel_content_type_set_param (CamelContentType *t, const gchar *name, const gcha
  * %FALSE otherwise
  **/
 gint
-camel_content_type_is(CamelContentType *ct, const gchar *type, const gchar *subtype)
+camel_content_type_is (CamelContentType *ct, const gchar *type, const gchar *subtype)
 {
 	/* no type == text/plain or text/"*" */
 	if (ct==NULL || (ct->type == NULL && ct->subtype == NULL)) {
@@ -2156,9 +2156,9 @@ camel_content_type_is(CamelContentType *ct, const gchar *type, const gchar *subt
 	}
 
 	return (ct->type != NULL
-		&& (!g_ascii_strcasecmp(ct->type, type)
+		&& (!g_ascii_strcasecmp (ct->type, type)
 		    && ((ct->subtype != NULL
-			 && !g_ascii_strcasecmp(ct->subtype, subtype))
+			 && !g_ascii_strcasecmp (ct->subtype, subtype))
 			|| !strcmp("*", subtype))));
 }
 
@@ -2169,15 +2169,15 @@ camel_content_type_is(CamelContentType *ct, const gchar *type, const gchar *subt
  * Free the list of params.
  **/
 void
-camel_header_param_list_free(struct _camel_header_param *p)
+camel_header_param_list_free (struct _camel_header_param *p)
 {
 	struct _camel_header_param *n;
 
 	while (p) {
 		n = p->next;
-		g_free(p->name);
-		g_free(p->value);
-		g_free(p);
+		g_free (p->name);
+		g_free (p->value);
+		g_free (p);
 		p = n;
 	}
 }
@@ -2192,13 +2192,13 @@ camel_header_param_list_free(struct _camel_header_param *p)
  * Returns: the new #CamelContentType
  **/
 CamelContentType *
-camel_content_type_new(const gchar *type, const gchar *subtype)
+camel_content_type_new (const gchar *type, const gchar *subtype)
 {
 	CamelContentType *t;
 
 	t = g_slice_new (CamelContentType);
-	t->type = g_strdup(type);
-	t->subtype = g_strdup(subtype);
+	t->type = g_strdup (type);
+	t->subtype = g_strdup (subtype);
 	t->params = NULL;
 	t->refcount = 1;
 
@@ -2212,7 +2212,7 @@ camel_content_type_new(const gchar *type, const gchar *subtype)
  * Refs the content type.
  **/
 void
-camel_content_type_ref(CamelContentType *ct)
+camel_content_type_ref (CamelContentType *ct)
 {
 	if (ct)
 		ct->refcount++;
@@ -2225,13 +2225,13 @@ camel_content_type_ref(CamelContentType *ct)
  * Unrefs, and potentially frees, the content type.
  **/
 void
-camel_content_type_unref(CamelContentType *ct)
+camel_content_type_unref (CamelContentType *ct)
 {
 	if (ct) {
 		if (ct->refcount <= 1) {
-			camel_header_param_list_free(ct->params);
-			g_free(ct->type);
-			g_free(ct->subtype);
+			camel_header_param_list_free (ct->params);
+			g_free (ct->type);
+			g_free (ct->subtype);
 			g_slice_free (CamelContentType, ct);
 			ct = NULL;
 		} else {
@@ -2242,7 +2242,7 @@ camel_content_type_unref(CamelContentType *ct)
 
 /* for decoding email addresses, canonically */
 static gchar *
-header_decode_domain(const gchar **in)
+header_decode_domain (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gint go = TRUE;
@@ -2250,37 +2250,37 @@ header_decode_domain(const gchar **in)
 	GString *domain = g_string_new("");
 
 	/* domain ref | domain literal */
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	while (go) {
 		if (*inptr == '[') { /* domain literal */
-			domain = g_string_append_c(domain, '[');
+			domain = g_string_append_c (domain, '[');
 			inptr++;
-			header_decode_lwsp(&inptr);
+			header_decode_lwsp (&inptr);
 			while (*inptr && camel_mime_is_dtext (*inptr)) {
-				domain = g_string_append_c(domain, *inptr);
+				domain = g_string_append_c (domain, *inptr);
 				inptr++;
 			}
 			if (*inptr == ']') {
-				domain = g_string_append_c(domain, ']');
+				domain = g_string_append_c (domain, ']');
 				inptr++;
 			} else {
 				w(g_warning("closing ']' not found in domain: %s", *in));
 			}
 		} else {
-			gchar *a = header_decode_atom(&inptr);
+			gchar *a = header_decode_atom (&inptr);
 			if (a) {
-				domain = g_string_append(domain, a);
-				g_free(a);
+				domain = g_string_append (domain, a);
+				g_free (a);
 			} else {
 				w(g_warning("missing atom from domain-ref"));
 				break;
 			}
 		}
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 		if (*inptr == '.') { /* next sub-domain? */
-			domain = g_string_append_c(domain, '.');
+			domain = g_string_append_c (domain, '.');
 			inptr++;
-			header_decode_lwsp(&inptr);
+			header_decode_lwsp (&inptr);
 		} else
 			go = FALSE;
 	}
@@ -2288,44 +2288,44 @@ header_decode_domain(const gchar **in)
 	*in = inptr;
 
 	ret = domain->str;
-	g_string_free(domain, FALSE);
+	g_string_free (domain, FALSE);
 	return ret;
 }
 
 static gchar *
-header_decode_addrspec(const gchar **in)
+header_decode_addrspec (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gchar *word;
 	GString *addr = g_string_new("");
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 
 	/* addr-spec */
 	word = header_decode_word (&inptr);
 	if (word) {
-		addr = g_string_append(addr, word);
-		header_decode_lwsp(&inptr);
-		g_free(word);
+		addr = g_string_append (addr, word);
+		header_decode_lwsp (&inptr);
+		g_free (word);
 		while (*inptr == '.' && word) {
 			inptr++;
-			addr = g_string_append_c(addr, '.');
+			addr = g_string_append_c (addr, '.');
 			word = header_decode_word (&inptr);
 			if (word) {
-				addr = g_string_append(addr, word);
-				header_decode_lwsp(&inptr);
-				g_free(word);
+				addr = g_string_append (addr, word);
+				header_decode_lwsp (&inptr);
+				g_free (word);
 			} else {
 				w(g_warning("Invalid address spec: %s", *in));
 			}
 		}
 		if (*inptr == '@') {
 			inptr++;
-			addr = g_string_append_c(addr, '@');
-			word = header_decode_domain(&inptr);
+			addr = g_string_append_c (addr, '@');
+			word = header_decode_domain (&inptr);
 			if (word) {
-				addr = g_string_append(addr, word);
-				g_free(word);
+				addr = g_string_append (addr, word);
+				g_free (word);
 			} else {
 				w(g_warning("Invalid address, missing domain: %s", *in));
 			}
@@ -2334,7 +2334,7 @@ header_decode_addrspec(const gchar **in)
 		}
 	} else {
 		w(g_warning("invalid addr-spec, no local part"));
-		g_string_free(addr, TRUE);
+		g_string_free (addr, TRUE);
 
 		return NULL;
 	}
@@ -2343,7 +2343,7 @@ header_decode_addrspec(const gchar **in)
 
 	*in = inptr;
 	word = addr->str;
-	g_string_free(addr, FALSE);
+	g_string_free (addr, FALSE);
 	return word;
 }
 
@@ -2361,7 +2361,7 @@ header_decode_addrspec(const gchar **in)
    */
 
 static struct _camel_header_address *
-header_decode_mailbox(const gchar **in, const gchar *charset)
+header_decode_mailbox (const gchar **in, const gchar *charset)
 {
 	const gchar *inptr = *in;
 	gchar *pre;
@@ -2375,7 +2375,7 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 
 	/* for each address */
 	pre = header_decode_word (&inptr);
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (!(*inptr == '.' || *inptr == '@' || *inptr==',' || *inptr=='\0')) {
 		/* ',' and '\0' required incase it is a simple address, no @ domain part (buggy writer) */
 		name = g_string_new ("");
@@ -2386,7 +2386,7 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 			text = camel_header_decode_string (pre, charset);
 			g_string_append (name, text);
 			last = pre;
-			g_free(text);
+			g_free (text);
 
 			pre = header_decode_word (&inptr);
 			if (pre) {
@@ -2398,33 +2398,33 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 				    && (p>6 && pre[0] == '=' && pre[1] == '?')) {
 					/* dont append ' ' */
 				} else {
-					name = g_string_append_c(name, ' ');
+					name = g_string_append_c (name, ' ');
 				}
 			} else {
 				/* Fix for stupidly-broken-mailers that like to put '.''s in names unquoted */
 				/* see bug #8147 */
 				while (!pre && *inptr && *inptr != '<') {
 					w(g_warning("Working around stupid mailer bug #5: unescaped characters in names"));
-					name = g_string_append_c(name, *inptr++);
+					name = g_string_append_c (name, *inptr++);
 					pre = header_decode_word (&inptr);
 				}
 			}
-			g_free(last);
+			g_free (last);
 		}
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 		if (*inptr == '<') {
 			closeme = TRUE;
 		try_address_again:
 			inptr++;
-			header_decode_lwsp(&inptr);
+			header_decode_lwsp (&inptr);
 			if (*inptr == '@') {
 				while (*inptr == '@') {
 					inptr++;
-					header_decode_domain(&inptr);
-					header_decode_lwsp(&inptr);
+					header_decode_domain (&inptr);
+					header_decode_lwsp (&inptr);
 					if (*inptr == ',') {
 						inptr++;
-						header_decode_lwsp(&inptr);
+						header_decode_lwsp (&inptr);
 					}
 				}
 				if (*inptr == ':') {
@@ -2441,7 +2441,7 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 	}
 
 	if (pre) {
-		addr = g_string_append(addr, pre);
+		addr = g_string_append (addr, pre);
 	} else {
 		w(g_warning("No local-part for email address: %s", *in));
 	}
@@ -2449,26 +2449,26 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 	/* should be at word '.' localpart */
 	while (*inptr == '.' && pre) {
 		inptr++;
-		g_free(pre);
+		g_free (pre);
 		pre = header_decode_word (&inptr);
-		addr = g_string_append_c(addr, '.');
+		addr = g_string_append_c (addr, '.');
 		if (pre)
-			addr = g_string_append(addr, pre);
+			addr = g_string_append (addr, pre);
 		comment = inptr;
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 	}
-	g_free(pre);
+	g_free (pre);
 
 	/* now at '@' domain part */
 	if (*inptr == '@') {
 		gchar *dom;
 
 		inptr++;
-		addr = g_string_append_c(addr, '@');
+		addr = g_string_append_c (addr, '@');
 		comment = inptr;
-		dom = header_decode_domain(&inptr);
-		addr = g_string_append(addr, dom);
-		g_free(dom);
+		dom = header_decode_domain (&inptr);
+		addr = g_string_append (addr, dom);
+		g_free (dom);
 	} else if (*inptr != '>' || !closeme) {
 		/* If we get a <, the address was probably a name part, lets try again shall we? */
 		/* Another fix for seriously-broken-mailers */
@@ -2482,28 +2482,28 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 			if (*inptr == '<')
 				closeme = TRUE;
 			else
-				g_string_append_c(addr, *inptr);
+				g_string_append_c (addr, *inptr);
 
 			/* check for address is encoded word ... */
-			text = camel_header_decode_string(addr->str, charset);
+			text = camel_header_decode_string (addr->str, charset);
 			if (name == NULL) {
 				name = addr;
 				addr = g_string_new("");
 				if (text) {
-					g_string_truncate(name, 0);
-					g_string_append(name, text);
+					g_string_truncate (name, 0);
+					g_string_append (name, text);
 				}
 			}/* else {
-				g_string_append(name, text?text:addr->str);
-				g_string_truncate(addr, 0);
+				g_string_append (name, text?text:addr->str);
+				g_string_truncate (addr, 0);
 			}*/
-			g_free(text);
+			g_free (text);
 
 			/* or maybe that we've added up a bunch of broken bits to make an encoded word */
 			if ((text = rfc2047_decode_word (name->str, name->len, charset))) {
-				g_string_truncate(name, 0);
-				g_string_append(name, text);
-				g_free(text);
+				g_string_truncate (name, 0);
+				g_string_append (name, text);
+				g_free (text);
 			}
 
 			goto try_address_again;
@@ -2512,7 +2512,7 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 	}
 
 	if (closeme) {
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 		if (*inptr == '>') {
 			inptr++;
 		} else {
@@ -2529,10 +2529,10 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 
 		d(printf("checking for comment from '%s'\n", comment));
 
-		comstart = strchr(comment, '(');
+		comstart = strchr (comment, '(');
 		if (comstart) {
 			comstart++;
-			header_decode_lwsp(&inptr);
+			header_decode_lwsp (&inptr);
 			comend = inptr-1;
 			while (comend > comstart && comend[0] != ')')
 				comend--;
@@ -2573,15 +2573,15 @@ header_decode_mailbox(const gchar **in, const gchar *charset)
 
 	d(printf("got mailbox: %s\n", addr->str));
 
-	g_string_free(addr, TRUE);
+	g_string_free (addr, TRUE);
 	if (name)
-		g_string_free(name, TRUE);
+		g_string_free (name, TRUE);
 
 	return address;
 }
 
 static struct _camel_header_address *
-header_decode_address(const gchar **in, const gchar *charset)
+header_decode_address (const gchar **in, const gchar *charset)
 {
 	const gchar *inptr = *in;
 	gchar *pre;
@@ -2589,27 +2589,27 @@ header_decode_address(const gchar **in, const gchar *charset)
 	struct _camel_header_address *addr = NULL, *member;
 
 	/* pre-scan, trying to work out format, discard results */
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	while ((pre = header_decode_word (&inptr))) {
-		group = g_string_append(group, pre);
+		group = g_string_append (group, pre);
 		group = g_string_append(group, " ");
-		g_free(pre);
+		g_free (pre);
 	}
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (*inptr == ':') {
 		d(printf("group detected: %s\n", group->str));
-		addr = camel_header_address_new_group(group->str);
+		addr = camel_header_address_new_group (group->str);
 		/* that was a group spec, scan mailbox's */
 		inptr++;
 		/* FIXME: check rfc 2047 encodings of words, here or above in the loop */
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 		if (*inptr != ';') {
 			gint go = TRUE;
 			do {
-				member = header_decode_mailbox(&inptr, charset);
+				member = header_decode_mailbox (&inptr, charset);
 				if (member)
-					camel_header_address_add_member(addr, member);
-				header_decode_lwsp(&inptr);
+					camel_header_address_add_member (addr, member);
+				header_decode_lwsp (&inptr);
 				if (*inptr == ',')
 					inptr++;
 				else
@@ -2625,29 +2625,29 @@ header_decode_address(const gchar **in, const gchar *charset)
 		}
 		*in = inptr;
 	} else {
-		addr = header_decode_mailbox(in, charset);
+		addr = header_decode_mailbox (in, charset);
 	}
 
-	g_string_free(group, TRUE);
+	g_string_free (group, TRUE);
 
 	return addr;
 }
 
 static gchar *
-header_msgid_decode_internal(const gchar **in)
+header_msgid_decode_internal (const gchar **in)
 {
 	const gchar *inptr = *in;
 	gchar *msgid = NULL;
 
 	d(printf("decoding Message-ID: '%s'\n", *in));
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (*inptr == '<') {
 		inptr++;
-		header_decode_lwsp(&inptr);
-		msgid = header_decode_addrspec(&inptr);
+		header_decode_lwsp (&inptr);
+		msgid = header_decode_addrspec (&inptr);
 		if (msgid) {
-			header_decode_lwsp(&inptr);
+			header_decode_lwsp (&inptr);
 			if (*inptr == '>') {
 				inptr++;
 			} else {
@@ -2673,12 +2673,12 @@ header_msgid_decode_internal(const gchar **in)
  * Returns: the msg-id
  **/
 gchar *
-camel_header_msgid_decode(const gchar *in)
+camel_header_msgid_decode (const gchar *in)
 {
 	if (in == NULL)
 		return NULL;
 
-	return header_msgid_decode_internal(&in);
+	return header_msgid_decode_internal (&in);
 }
 
 /**
@@ -2757,19 +2757,19 @@ camel_header_contentid_decode (const gchar *in)
 }
 
 void
-camel_header_references_list_append_asis(struct _camel_header_references **list, gchar *ref)
+camel_header_references_list_append_asis (struct _camel_header_references **list, gchar *ref)
 {
 	struct _camel_header_references *w = (struct _camel_header_references *)list, *n;
 	while (w->next)
 		w = w->next;
-	n = g_malloc(sizeof(*n));
+	n = g_malloc (sizeof (*n));
 	n->id = ref;
 	n->next = NULL;
 	w->next = n;
 }
 
 gint
-camel_header_references_list_size(struct _camel_header_references **list)
+camel_header_references_list_size (struct _camel_header_references **list)
 {
 	gint count = 0;
 	struct _camel_header_references *w = *list;
@@ -2781,13 +2781,13 @@ camel_header_references_list_size(struct _camel_header_references **list)
 }
 
 void
-camel_header_references_list_clear(struct _camel_header_references **list)
+camel_header_references_list_clear (struct _camel_header_references **list)
 {
 	struct _camel_header_references *w = *list, *n;
 	while (w) {
 		n = w->next;
-		g_free(w->id);
-		g_free(w);
+		g_free (w->id);
+		g_free (w);
 		w = n;
 	}
 	*list = NULL;
@@ -2853,14 +2853,14 @@ camel_header_references_decode (const gchar *in)
 }
 
 struct _camel_header_references *
-camel_header_references_dup(const struct _camel_header_references *list)
+camel_header_references_dup (const struct _camel_header_references *list)
 {
 	struct _camel_header_references *new = NULL, *tmp;
 
 	while (list) {
-		tmp = g_new(struct _camel_header_references, 1);
+		tmp = g_new (struct _camel_header_references, 1);
 		tmp->next = new;
-		tmp->id = g_strdup(list->id);
+		tmp->id = g_strdup (list->id);
 		new = tmp;
 		list = list->next;
 	}
@@ -2868,16 +2868,16 @@ camel_header_references_dup(const struct _camel_header_references *list)
 }
 
 struct _camel_header_address *
-camel_header_mailbox_decode(const gchar *in, const gchar *charset)
+camel_header_mailbox_decode (const gchar *in, const gchar *charset)
 {
 	if (in == NULL)
 		return NULL;
 
-	return header_decode_mailbox(&in, charset);
+	return header_decode_mailbox (&in, charset);
 }
 
 struct _camel_header_address *
-camel_header_address_decode(const gchar *in, const gchar *charset)
+camel_header_address_decode (const gchar *in, const gchar *charset)
 {
 	const gchar *inptr = in, *last;
 	struct _camel_header_address *list = NULL, *addr;
@@ -2887,16 +2887,16 @@ camel_header_address_decode(const gchar *in, const gchar *charset)
 	if (in == NULL)
 		return NULL;
 
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	if (*inptr == 0)
 		return NULL;
 
 	do {
 		last = inptr;
-		addr = header_decode_address(&inptr, charset);
+		addr = header_decode_address (&inptr, charset);
 		if (addr)
-			camel_header_address_list_append(&list, addr);
-		header_decode_lwsp(&inptr);
+			camel_header_address_list_append (&list, addr);
+		header_decode_lwsp (&inptr);
 		if (*inptr == ',')
 			inptr++;
 		else
@@ -2915,7 +2915,7 @@ camel_header_address_decode(const gchar *in, const gchar *charset)
 }
 
 struct _camel_header_newsgroup *
-camel_header_newsgroups_decode(const gchar *in)
+camel_header_newsgroups_decode (const gchar *in)
 {
 	const gchar *inptr = in;
 	register gchar c;
@@ -2926,13 +2926,13 @@ camel_header_newsgroups_decode(const gchar *in)
 	last = (struct _camel_header_newsgroup *)&head;
 
 	do {
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 		start = inptr;
-		while ((c = *inptr++) && !camel_mime_is_lwsp(c) && c != ',')
+		while ((c = *inptr++) && !camel_mime_is_lwsp (c) && c != ',')
 			;
 		if (start != inptr-1) {
-			ng = g_malloc(sizeof(*ng));
-			ng->newsgroup = g_strndup(start, inptr-start-1);
+			ng = g_malloc (sizeof (*ng));
+			ng->newsgroup = g_strndup (start, inptr-start-1);
 			ng->next = NULL;
 			last->next = ng;
 			last = ng;
@@ -2943,13 +2943,13 @@ camel_header_newsgroups_decode(const gchar *in)
 }
 
 void
-camel_header_newsgroups_free(struct _camel_header_newsgroup *ng)
+camel_header_newsgroups_free (struct _camel_header_newsgroup *ng)
 {
 	while (ng) {
 		struct _camel_header_newsgroup *nng = ng->next;
 
-		g_free(ng->newsgroup);
-		g_free(ng);
+		g_free (ng->newsgroup);
+		g_free (ng);
 		ng = nng;
 	}
 }
@@ -2989,7 +2989,7 @@ camel_transfer_encoding_from_string (const gchar *string)
 }
 
 void
-camel_header_mime_decode(const gchar *in, gint *maj, gint *min)
+camel_header_mime_decode (const gchar *in, gint *maj, gint *min)
 {
 	const gchar *inptr = in;
 	gint major=-1, minor=-1;
@@ -2997,15 +2997,15 @@ camel_header_mime_decode(const gchar *in, gint *maj, gint *min)
 	d(printf("decoding MIME-Version: '%s'\n", in));
 
 	if (in != NULL) {
-		header_decode_lwsp(&inptr);
-		if (isdigit(*inptr)) {
-			major = camel_header_decode_int(&inptr);
-			header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
+		if (isdigit (*inptr)) {
+			major = camel_header_decode_int (&inptr);
+			header_decode_lwsp (&inptr);
 			if (*inptr == '.') {
 				inptr++;
-				header_decode_lwsp(&inptr);
-				if (isdigit(*inptr))
-					minor = camel_header_decode_int(&inptr);
+				header_decode_lwsp (&inptr);
+				if (isdigit (*inptr))
+					minor = camel_header_decode_int (&inptr);
 			}
 		}
 	}
@@ -3024,13 +3024,13 @@ struct _rfc2184_param {
 };
 
 static gint
-rfc2184_param_cmp(gconstpointer ap, gconstpointer bp)
+rfc2184_param_cmp (gconstpointer ap, gconstpointer bp)
 {
 	const struct _rfc2184_param *a = *(gpointer *)ap;
 	const struct _rfc2184_param *b = *(gpointer *)bp;
 	gint res;
 
-	res = strcmp(a->param.name, b->param.name);
+	res = strcmp (a->param.name, b->param.name);
 	if (res == 0) {
 		if (a->index > b->index)
 			res = 1;
@@ -3043,7 +3043,7 @@ rfc2184_param_cmp(gconstpointer ap, gconstpointer bp)
 
 /* NB: Steals name and value */
 static struct _camel_header_param *
-header_append_param(struct _camel_header_param *last, gchar *name, gchar *value)
+header_append_param (struct _camel_header_param *last, gchar *name, gchar *value)
 {
 	struct _camel_header_param *node;
 
@@ -3051,22 +3051,22 @@ header_append_param(struct _camel_header_param *last, gchar *name, gchar *value)
 	    8 bit data in parameters, illegal, tries to convert using locale, or just safens it up.
 	    rfc2047 ecoded parameters, illegal, decodes them anyway.  Some Outlook & Mozilla do this?
 	*/
-	node = g_malloc(sizeof(*node));
+	node = g_malloc (sizeof (*node));
 	last->next = node;
 	node->next = NULL;
 	node->name = name;
 	if (strncmp(value, "=?", 2) == 0
-	    && (node->value = header_decode_text(value, FALSE, NULL))) {
-		g_free(value);
+	    && (node->value = header_decode_text (value, FALSE, NULL))) {
+		g_free (value);
 	} else if (g_ascii_strcasecmp (name, "boundary") != 0 && !g_utf8_validate(value, -1, NULL)) {
-		const gchar *charset = camel_iconv_locale_charset();
+		const gchar *charset = camel_iconv_locale_charset ();
 
 		if ((node->value = header_convert("UTF-8", charset?charset:"ISO-8859-1", value, strlen(value)))) {
-			g_free(value);
+			g_free (value);
 		} else {
 			node->value = value;
 			for (;*value;value++)
-				if (!isascii((guchar)*value))
+				if (!isascii ((guchar)*value))
 					*value = '_';
 		}
 	} else
@@ -3085,52 +3085,52 @@ header_decode_param_list (const gchar **in)
 	gchar *tmp;
 
 	/* Dump parameters into the output list, in the order found.  RFC 2184 split parameters are kept in an array */
-	header_decode_lwsp(&inptr);
+	header_decode_lwsp (&inptr);
 	while (*inptr == ';') {
 		gchar *name;
 		gchar *value = NULL;
 
 		inptr++;
-		name = decode_token(&inptr);
-		header_decode_lwsp(&inptr);
+		name = decode_token (&inptr);
+		header_decode_lwsp (&inptr);
 		if (*inptr == '=') {
 			inptr++;
-			value = header_decode_value(&inptr);
+			value = header_decode_value (&inptr);
 		}
 
 		if (name && value) {
-			gchar *index = strchr(name, '*');
+			gchar *index = strchr (name, '*');
 
 			if (index) {
 				if (index[1] == 0) {
 					/* VAL*="foo", decode immediately and append */
 					*index = 0;
-					tmp = rfc2184_decode(value, strlen(value));
+					tmp = rfc2184_decode (value, strlen (value));
 					if (tmp) {
-						g_free(value);
+						g_free (value);
 						value = tmp;
 					}
-					last = header_append_param(last, name, value);
+					last = header_append_param (last, name, value);
 				} else {
 					/* VAL*1="foo", save for later */
 					*index++ = 0;
-					work = g_malloc(sizeof(*work));
+					work = g_malloc (sizeof (*work));
 					work->param.name = name;
 					work->param.value = value;
-					work->index = atoi(index);
+					work->index = atoi (index);
 					if (split == NULL)
-						split = g_ptr_array_new();
-					g_ptr_array_add(split, work);
+						split = g_ptr_array_new ();
+					g_ptr_array_add (split, work);
 				}
 			} else {
-				last = header_append_param(last, name, value);
+				last = header_append_param (last, name, value);
 			}
 		} else {
-			g_free(name);
-			g_free(value);
+			g_free (name);
+			g_free (value);
 		}
 
-		header_decode_lwsp(&inptr);
+		header_decode_lwsp (&inptr);
 	}
 
 	/* Rejoin any RFC 2184 split parameters in the proper order */
@@ -3140,32 +3140,32 @@ header_decode_param_list (const gchar **in)
 		struct _rfc2184_param *first;
 		gint i;
 
-		qsort(split->pdata, split->len, sizeof(split->pdata[0]), rfc2184_param_cmp);
+		qsort (split->pdata, split->len, sizeof (split->pdata[0]), rfc2184_param_cmp);
 		first = split->pdata[0];
 		for (i=0;i<split->len;i++) {
 			work = split->pdata[i];
 			if (split->len-1 == i)
-				g_string_append(value, work->param.value);
-			if (split->len-1 == i || strcmp(work->param.name, first->param.name) != 0) {
-				tmp = rfc2184_decode(value->str, value->len);
+				g_string_append (value, work->param.value);
+			if (split->len-1 == i || strcmp (work->param.name, first->param.name) != 0) {
+				tmp = rfc2184_decode (value->str, value->len);
 				if (tmp == NULL)
-					tmp = g_strdup(value->str);
+					tmp = g_strdup (value->str);
 
-				last = header_append_param(last, g_strdup(first->param.name), tmp);
-				g_string_truncate(value, 0);
+				last = header_append_param (last, g_strdup (first->param.name), tmp);
+				g_string_truncate (value, 0);
 				first = work;
 			}
 			if (split->len-1 != i)
-				g_string_append(value, work->param.value);
+				g_string_append (value, work->param.value);
 		}
-		g_string_free(value, TRUE);
+		g_string_free (value, TRUE);
 		for (i=0;i<split->len;i++) {
 			work = split->pdata[i];
-			g_free(work->param.name);
-			g_free(work->param.value);
-			g_free(work);
+			g_free (work->param.name);
+			g_free (work->param.value);
+			g_free (work);
 		}
-		g_ptr_array_free(split, TRUE);
+		g_ptr_array_free (split, TRUE);
 	}
 
 	*in = inptr;
@@ -3174,12 +3174,12 @@ header_decode_param_list (const gchar **in)
 }
 
 struct _camel_header_param *
-camel_header_param_list_decode(const gchar *in)
+camel_header_param_list_decode (const gchar *in)
 {
 	if (in == NULL)
 		return NULL;
 
-	return header_decode_param_list(&in);
+	return header_decode_param_list (&in);
 }
 
 static gchar *
@@ -3220,16 +3220,16 @@ header_encode_param (const guchar *in, gboolean *encoded, gboolean is_filename)
 
 	/* if we have really broken utf8 passed in, we just treat it as binary data */
 
-	charset = camel_charset_best((gchar *) in, strlen((gchar *) in));
+	charset = camel_charset_best ((gchar *) in, strlen ((gchar *) in));
 	if (charset == NULL) {
-		return g_strdup((gchar *) in);
+		return g_strdup ((gchar *) in);
 	}
 
 	if (g_ascii_strcasecmp(charset, "UTF-8") != 0) {
 		if ((outbuf = (guchar *) header_convert(charset, "UTF-8", (const gchar *) in, strlen((gchar *) in))))
 			inptr = outbuf;
 		else
-			return g_strdup((gchar *) in);
+			return g_strdup ((gchar *) in);
 	}
 
 	/* FIXME: set the 'language' as well, assuming we can get that info...? */
@@ -3237,7 +3237,7 @@ header_encode_param (const guchar *in, gboolean *encoded, gboolean is_filename)
 	g_string_append(out, "''");
 
 	while ((c = *inptr++)) {
-		if (camel_mime_is_attrchar(c))
+		if (camel_mime_is_attrchar (c))
 			g_string_append_c (out, c);
 		else
 			g_string_append_printf (out, "%%%c%c", tohex[(c >> 4) & 0xf], tohex[c & 0xf]);
@@ -3366,19 +3366,19 @@ camel_header_param_list_format_append (GString *out, struct _camel_header_param
 }
 
 gchar *
-camel_header_param_list_format(struct _camel_header_param *p)
+camel_header_param_list_format (struct _camel_header_param *p)
 {
 	GString *out = g_string_new("");
 	gchar *ret;
 
-	camel_header_param_list_format_append(out, p);
+	camel_header_param_list_format_append (out, p);
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 	return ret;
 }
 
 CamelContentType *
-camel_content_type_decode(const gchar *in)
+camel_content_type_decode (const gchar *in)
 {
 	const gchar *inptr = in;
 	gchar *type, *subtype = NULL;
@@ -3387,12 +3387,12 @@ camel_content_type_decode(const gchar *in)
 	if (in==NULL)
 		return NULL;
 
-	type = decode_token(&inptr);
-	header_decode_lwsp(&inptr);
+	type = decode_token (&inptr);
+	header_decode_lwsp (&inptr);
 	if (type) {
 		if  (*inptr == '/') {
 			inptr++;
-			subtype = decode_token(&inptr);
+			subtype = decode_token (&inptr);
 		}
 		if (subtype == NULL && (!g_ascii_strcasecmp(type, "text"))) {
 			w(g_warning("text type with no subtype, resorting to text/plain: %s", in));
@@ -3402,19 +3402,19 @@ camel_content_type_decode(const gchar *in)
 			w(g_warning("MIME type with no subtype: %s", in));
 		}
 
-		t = camel_content_type_new(type, subtype);
-		t->params = header_decode_param_list(&inptr);
-		g_free(type);
-		g_free(subtype);
+		t = camel_content_type_new (type, subtype);
+		t->params = header_decode_param_list (&inptr);
+		g_free (type);
+		g_free (subtype);
 	} else {
-		g_free(type);
+		g_free (type);
 		d(printf("cannot find MIME type in header (2) '%s'", in));
 	}
 	return t;
 }
 
 void
-camel_content_type_dump(CamelContentType *ct)
+camel_content_type_dump (CamelContentType *ct)
 {
 	struct _camel_header_param *p;
 
@@ -3490,7 +3490,7 @@ camel_content_transfer_encoding_decode (const gchar *in)
 }
 
 CamelContentDisposition *
-camel_content_disposition_decode(const gchar *in)
+camel_content_disposition_decode (const gchar *in)
 {
 	CamelContentDisposition *d = NULL;
 	const gchar *inptr = in;
@@ -3498,31 +3498,31 @@ camel_content_disposition_decode(const gchar *in)
 	if (in == NULL)
 		return NULL;
 
-	d = g_malloc(sizeof(*d));
+	d = g_malloc (sizeof (*d));
 	d->refcount = 1;
-	d->disposition = decode_token(&inptr);
+	d->disposition = decode_token (&inptr);
 	if (d->disposition == NULL) {
 		w(g_warning("Empty disposition type"));
 	}
-	d->params = header_decode_param_list(&inptr);
+	d->params = header_decode_param_list (&inptr);
 	return d;
 }
 
 void
-camel_content_disposition_ref(CamelContentDisposition *d)
+camel_content_disposition_ref (CamelContentDisposition *d)
 {
 	if (d)
 		d->refcount++;
 }
 
 void
-camel_content_disposition_unref(CamelContentDisposition *d)
+camel_content_disposition_unref (CamelContentDisposition *d)
 {
 	if (d) {
 		if (d->refcount<=1) {
-			camel_header_param_list_free(d->params);
-			g_free(d->disposition);
-			g_free(d);
+			camel_header_param_list_free (d->params);
+			g_free (d->disposition);
+			g_free (d);
 		} else {
 			d->refcount--;
 		}
@@ -3530,7 +3530,7 @@ camel_content_disposition_unref(CamelContentDisposition *d)
 }
 
 gchar *
-camel_content_disposition_format(CamelContentDisposition *d)
+camel_content_disposition_format (CamelContentDisposition *d)
 {
 	GString *out;
 	gchar *ret;
@@ -3540,13 +3540,13 @@ camel_content_disposition_format(CamelContentDisposition *d)
 
 	out = g_string_new("");
 	if (d->disposition)
-		out = g_string_append(out, d->disposition);
+		out = g_string_append (out, d->disposition);
 	else
 		out = g_string_append(out, "attachment");
-	camel_header_param_list_format_append(out, d->params);
+	camel_header_param_list_format_append (out, d->params);
 
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 	return ret;
 }
 
@@ -4127,7 +4127,7 @@ camel_header_decode_date (const gchar *str, gint *tz_offset)
 }
 
 gchar *
-camel_header_location_decode(const gchar *in)
+camel_header_location_decode (const gchar *in)
 {
 	gint quote = 0;
 	GString *out = g_string_new("");
@@ -4150,7 +4150,7 @@ camel_header_location_decode(const gchar *in)
 	 * characters, even when included in quotes.
 	 */
 
-	header_decode_lwsp(&in);
+	header_decode_lwsp (&in);
 	if (*in == '"') {
 		in++;
 		quote = 1;
@@ -4159,12 +4159,12 @@ camel_header_location_decode(const gchar *in)
 	while ((c = *in++)) {
 		if (quote && c=='"')
 			break;
-		if (!camel_mime_is_lwsp(c))
-			g_string_append_c(out, c);
+		if (!camel_mime_is_lwsp (c))
+			g_string_append_c (out, c);
 	}
 
-	res = g_strdup(out->str);
-	g_string_free(out, TRUE);
+	res = g_strdup (out->str);
+	g_string_free (out, TRUE);
 
 	return res;
 }
@@ -4180,7 +4180,7 @@ check_header (struct _camel_header_raw *header)
 
 	cp = (guchar *) header->value;
 	while (cp && *cp) {
-		if (!isascii(*cp)) {
+		if (!isascii (*cp)) {
 			w(g_warning("Appending header violates rfc: %s: %s", header->name, header->value));
 			return;
 		}
@@ -4190,43 +4190,43 @@ check_header (struct _camel_header_raw *header)
 #endif
 
 void
-camel_header_raw_append_parse(struct _camel_header_raw **list, const gchar *header, gint offset)
+camel_header_raw_append_parse (struct _camel_header_raw **list, const gchar *header, gint offset)
 {
 	register const gchar *in;
 	gsize fieldlen;
 	gchar *name;
 
 	in = header;
-	while (camel_mime_is_fieldname(*in) || *in==':')
+	while (camel_mime_is_fieldname (*in) || *in==':')
 		in++;
 	fieldlen = in-header-1;
-	while (camel_mime_is_lwsp(*in))
+	while (camel_mime_is_lwsp (*in))
 		in++;
 	if (fieldlen == 0 || header[fieldlen] != ':') {
 		printf("Invalid header line: '%s'\n", header);
 		return;
 	}
 	name = g_alloca (fieldlen + 1);
-	memcpy(name, header, fieldlen);
+	memcpy (name, header, fieldlen);
 	name[fieldlen] = 0;
 
-	camel_header_raw_append(list, name, in, offset);
+	camel_header_raw_append (list, name, in, offset);
 }
 
 void
-camel_header_raw_append(struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
+camel_header_raw_append (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
 {
 	struct _camel_header_raw *l, *n;
 
 	d(printf("Header: %s: %s\n", name, value));
 
-	n = g_malloc(sizeof(*n));
+	n = g_malloc (sizeof (*n));
 	n->next = NULL;
-	n->name = g_strdup(name);
-	n->value = g_strdup(value);
+	n->name = g_strdup (name);
+	n->value = g_strdup (value);
 	n->offset = offset;
 #ifdef CHECKS
-	check_header(n);
+	check_header (n);
 #endif
 	l = (struct _camel_header_raw *)list;
 	while (l->next) {
@@ -4238,25 +4238,25 @@ camel_header_raw_append(struct _camel_header_raw **list, const gchar *name, cons
 #if 0
 	if (!g_ascii_strcasecmp(name, "To")) {
 		printf("- Decoding To\n");
-		camel_header_to_decode(value);
+		camel_header_to_decode (value);
 	} else if (!g_ascii_strcasecmp(name, "Content-type")) {
 		printf("- Decoding content-type\n");
-		camel_content_type_dump(camel_content_type_decode(value));
+		camel_content_type_dump (camel_content_type_decode (value));
 	} else if (!g_ascii_strcasecmp(name, "MIME-Version")) {
 		printf("- Decoding mime version\n");
-		camel_header_mime_decode(value);
+		camel_header_mime_decode (value);
 	}
 #endif
 }
 
 static struct _camel_header_raw *
-header_raw_find_node(struct _camel_header_raw **list, const gchar *name)
+header_raw_find_node (struct _camel_header_raw **list, const gchar *name)
 {
 	struct _camel_header_raw *l;
 
 	l = *list;
 	while (l) {
-		if (!g_ascii_strcasecmp(l->name, name))
+		if (!g_ascii_strcasecmp (l->name, name))
 			break;
 		l = l->next;
 	}
@@ -4264,11 +4264,11 @@ header_raw_find_node(struct _camel_header_raw **list, const gchar *name)
 }
 
 const gchar *
-camel_header_raw_find(struct _camel_header_raw **list, const gchar *name, gint *offset)
+camel_header_raw_find (struct _camel_header_raw **list, const gchar *name, gint *offset)
 {
 	struct _camel_header_raw *l;
 
-	l = header_raw_find_node(list, name);
+	l = header_raw_find_node (list, name);
 	if (l) {
 		if (offset)
 			*offset = l->offset;
@@ -4278,7 +4278,7 @@ camel_header_raw_find(struct _camel_header_raw **list, const gchar *name, gint *
 }
 
 const gchar *
-camel_header_raw_find_next(struct _camel_header_raw **list, const gchar *name, gint *offset, const gchar *last)
+camel_header_raw_find_next (struct _camel_header_raw **list, const gchar *name, gint *offset, const gchar *last)
 {
 	struct _camel_header_raw *l;
 
@@ -4288,19 +4288,19 @@ camel_header_raw_find_next(struct _camel_header_raw **list, const gchar *name, g
 	l = *list;
 	while (l && l->value != last)
 		l = l->next;
-	return camel_header_raw_find(&l, name, offset);
+	return camel_header_raw_find (&l, name, offset);
 }
 
 static void
-header_raw_free(struct _camel_header_raw *l)
+header_raw_free (struct _camel_header_raw *l)
 {
-	g_free(l->name);
-	g_free(l->value);
-	g_free(l);
+	g_free (l->name);
+	g_free (l->value);
+	g_free (l);
 }
 
 void
-camel_header_raw_remove(struct _camel_header_raw **list, const gchar *name)
+camel_header_raw_remove (struct _camel_header_raw **list, const gchar *name)
 {
 	struct _camel_header_raw *l, *p;
 
@@ -4308,9 +4308,9 @@ camel_header_raw_remove(struct _camel_header_raw **list, const gchar *name)
 	p = (struct _camel_header_raw *)list;
 	l = *list;
 	while (l) {
-		if (!g_ascii_strcasecmp(l->name, name)) {
+		if (!g_ascii_strcasecmp (l->name, name)) {
 			p->next = l->next;
-			header_raw_free(l);
+			header_raw_free (l);
 			l = p->next;
 		} else {
 			p = l;
@@ -4320,20 +4320,20 @@ camel_header_raw_remove(struct _camel_header_raw **list, const gchar *name)
 }
 
 void
-camel_header_raw_replace(struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
+camel_header_raw_replace (struct _camel_header_raw **list, const gchar *name, const gchar *value, gint offset)
 {
-	camel_header_raw_remove(list, name);
-	camel_header_raw_append(list, name, value, offset);
+	camel_header_raw_remove (list, name);
+	camel_header_raw_append (list, name, value, offset);
 }
 
 void
-camel_header_raw_clear(struct _camel_header_raw **list)
+camel_header_raw_clear (struct _camel_header_raw **list)
 {
 	struct _camel_header_raw *l, *n;
 	l = *list;
 	while (l) {
 		n = l->next;
-		header_raw_free(l);
+		header_raw_free (l);
 		l = n;
 	}
 	*list = NULL;
@@ -4357,7 +4357,7 @@ camel_header_msgid_generate (void)
 		retval = gethostname (host, sizeof (host));
 		if (retval == 0 && *host) {
 			hints.ai_flags = AI_CANONNAME;
-			ai = camel_getaddrinfo(host, NULL, &hints, NULL);
+			ai = camel_getaddrinfo (host, NULL, &hints, NULL);
 			if (ai && ai->ai_canonname)
 				name = ai->ai_canonname;
 			else
@@ -4373,7 +4373,7 @@ camel_header_msgid_generate (void)
 	COUNT_UNLOCK ();
 
 	if (ai)
-		camel_freeaddrinfo(ai);
+		camel_freeaddrinfo (ai);
 
 	return msgid;
 }
@@ -4433,28 +4433,28 @@ mailing_list_init (gpointer param)
 
 	/* precompile regex's for speed at runtime */
 	for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) {
-		errcode = regcomp(&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE);
+		errcode = regcomp (&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE);
 		if (errcode != 0) {
 			gchar *errstr;
 			gsize len;
 
-			len = regerror(errcode, &mail_list_magic[i].regex, NULL, 0);
-			errstr = g_malloc0(len + 1);
-			regerror(errcode, &mail_list_magic[i].regex, errstr, len);
+			len = regerror (errcode, &mail_list_magic[i].regex, NULL, 0);
+			errstr = g_malloc0 (len + 1);
+			regerror (errcode, &mail_list_magic[i].regex, errstr, len);
 
 			g_warning("Internal error, compiling regex failed: %s: %s", mail_list_magic[i].pattern, errstr);
-			g_free(errstr);
+			g_free (errstr);
 			failed++;
 		}
 	}
 
-	g_assert(failed == 0);
+	g_assert (failed == 0);
 
 	return NULL;
 }
 
 gchar *
-camel_header_raw_check_mailing_list(struct _camel_header_raw **list)
+camel_header_raw_check_mailing_list (struct _camel_header_raw **list)
 {
 	static GOnce once = G_ONCE_INIT;
 	const gchar *v;
@@ -4498,20 +4498,20 @@ struct _camel_header_address *
 camel_header_address_new (void)
 {
 	struct _camel_header_address *h;
-	h = g_malloc0(sizeof(*h));
+	h = g_malloc0 (sizeof (*h));
 	h->type = CAMEL_HEADER_ADDRESS_NONE;
 	h->refcount = 1;
 	return h;
 }
 
 struct _camel_header_address *
-camel_header_address_new_name(const gchar *name, const gchar *addr)
+camel_header_address_new_name (const gchar *name, const gchar *addr)
 {
 	struct _camel_header_address *h;
-	h = camel_header_address_new();
+	h = camel_header_address_new ();
 	h->type = CAMEL_HEADER_ADDRESS_NAME;
-	h->name = g_strdup(name);
-	h->v.addr = g_strdup(addr);
+	h->name = g_strdup (name);
+	h->v.addr = g_strdup (addr);
 	return h;
 }
 
@@ -4520,31 +4520,31 @@ camel_header_address_new_group (const gchar *name)
 {
 	struct _camel_header_address *h;
 
-	h = camel_header_address_new();
+	h = camel_header_address_new ();
 	h->type = CAMEL_HEADER_ADDRESS_GROUP;
-	h->name = g_strdup(name);
+	h->name = g_strdup (name);
 	return h;
 }
 
 void
-camel_header_address_ref(struct _camel_header_address *h)
+camel_header_address_ref (struct _camel_header_address *h)
 {
 	if (h)
 		h->refcount++;
 }
 
 void
-camel_header_address_unref(struct _camel_header_address *h)
+camel_header_address_unref (struct _camel_header_address *h)
 {
 	if (h) {
 		if (h->refcount <= 1) {
 			if (h->type == CAMEL_HEADER_ADDRESS_GROUP) {
-				camel_header_address_list_clear(&h->v.members);
+				camel_header_address_list_clear (&h->v.members);
 			} else if (h->type == CAMEL_HEADER_ADDRESS_NAME) {
-				g_free(h->v.addr);
+				g_free (h->v.addr);
 			}
-			g_free(h->name);
-			g_free(h);
+			g_free (h->name);
+			g_free (h);
 		} else {
 			h->refcount--;
 		}
@@ -4552,23 +4552,23 @@ camel_header_address_unref(struct _camel_header_address *h)
 }
 
 void
-camel_header_address_set_name(struct _camel_header_address *h, const gchar *name)
+camel_header_address_set_name (struct _camel_header_address *h, const gchar *name)
 {
 	if (h) {
-		g_free(h->name);
-		h->name = g_strdup(name);
+		g_free (h->name);
+		h->name = g_strdup (name);
 	}
 }
 
 void
-camel_header_address_set_addr(struct _camel_header_address *h, const gchar *addr)
+camel_header_address_set_addr (struct _camel_header_address *h, const gchar *addr)
 {
 	if (h) {
 		if (h->type == CAMEL_HEADER_ADDRESS_NAME
 		    || h->type == CAMEL_HEADER_ADDRESS_NONE) {
 			h->type = CAMEL_HEADER_ADDRESS_NAME;
-			g_free(h->v.addr);
-			h->v.addr = g_strdup(addr);
+			g_free (h->v.addr);
+			h->v.addr = g_strdup (addr);
 		} else {
 			g_warning("Trying to set the address on a group");
 		}
@@ -4576,13 +4576,13 @@ camel_header_address_set_addr(struct _camel_header_address *h, const gchar *addr
 }
 
 void
-camel_header_address_set_members(struct _camel_header_address *h, struct _camel_header_address *group)
+camel_header_address_set_members (struct _camel_header_address *h, struct _camel_header_address *group)
 {
 	if (h) {
 		if (h->type == CAMEL_HEADER_ADDRESS_GROUP
 		    || h->type == CAMEL_HEADER_ADDRESS_NONE) {
 			h->type = CAMEL_HEADER_ADDRESS_GROUP;
-			camel_header_address_list_clear(&h->v.members);
+			camel_header_address_list_clear (&h->v.members);
 			/* should this ref them? */
 			h->v.members = group;
 		} else {
@@ -4592,19 +4592,19 @@ camel_header_address_set_members(struct _camel_header_address *h, struct _camel_
 }
 
 void
-camel_header_address_add_member(struct _camel_header_address *h, struct _camel_header_address *member)
+camel_header_address_add_member (struct _camel_header_address *h, struct _camel_header_address *member)
 {
 	if (h) {
 		if (h->type == CAMEL_HEADER_ADDRESS_GROUP
 		    || h->type == CAMEL_HEADER_ADDRESS_NONE) {
 			h->type = CAMEL_HEADER_ADDRESS_GROUP;
-			camel_header_address_list_append(&h->v.members, member);
+			camel_header_address_list_append (&h->v.members, member);
 		}
 	}
 }
 
 void
-camel_header_address_list_append_list(struct _camel_header_address **l, struct _camel_header_address **h)
+camel_header_address_list_append_list (struct _camel_header_address **l, struct _camel_header_address **h)
 {
 	if (l) {
 		struct _camel_header_address *n = (struct _camel_header_address *)l;
@@ -4616,22 +4616,22 @@ camel_header_address_list_append_list(struct _camel_header_address **l, struct _
 }
 
 void
-camel_header_address_list_append(struct _camel_header_address **l, struct _camel_header_address *h)
+camel_header_address_list_append (struct _camel_header_address **l, struct _camel_header_address *h)
 {
 	if (h) {
-		camel_header_address_list_append_list(l, &h);
+		camel_header_address_list_append_list (l, &h);
 		h->next = NULL;
 	}
 }
 
 void
-camel_header_address_list_clear(struct _camel_header_address **l)
+camel_header_address_list_clear (struct _camel_header_address **l)
 {
 	struct _camel_header_address *a, *n;
 	a = *l;
 	while (a) {
 		n = a->next;
-		camel_header_address_unref(a);
+		camel_header_address_unref (a);
 		a = n;
 	}
 	*l = NULL;
@@ -4791,7 +4791,7 @@ camel_header_address_fold (const gchar *in, gsize headerlen)
 /* simple header folding */
 /* will work even if the header is already folded */
 gchar *
-camel_header_fold(const gchar *in, gsize headerlen)
+camel_header_fold (const gchar *in, gsize headerlen)
 {
 	gsize len, outlen, tmplen;
 	const gchar *inptr = in, *space, *p, *n;
@@ -4807,7 +4807,7 @@ camel_header_fold(const gchar *in, gsize headerlen)
 	len = headerlen + 2;
 	p = in;
 	while (*p) {
-		n = strchr(p, '\n');
+		n = strchr (p, '\n');
 		if (n == NULL) {
 			len += strlen (p);
 			break;
@@ -4822,11 +4822,11 @@ camel_header_fold(const gchar *in, gsize headerlen)
 		p = n + 1;
 	}
 	if (len < CAMEL_FOLD_SIZE)
-		return g_strdup(in);
+		return g_strdup (in);
 
 	/* we need to fold, so first unfold (if we need to), then process */
 	if (needunfold)
-		inptr = in = camel_header_unfold(in);
+		inptr = in = camel_header_unfold (in);
 
 	out = g_string_new("");
 	outlen = headerlen+2;
@@ -4871,16 +4871,16 @@ camel_header_fold(const gchar *in, gsize headerlen)
 		inptr += len;
 	}
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	if (needunfold)
-		g_free((gchar *)in);
+		g_free ((gchar *)in);
 
 	return ret;
 }
 
 gchar *
-camel_header_unfold(const gchar *in)
+camel_header_unfold (const gchar *in)
 {
 	const gchar *inptr = in;
 	gchar c, *o, *out;
@@ -4888,15 +4888,15 @@ camel_header_unfold(const gchar *in)
 	if (in == NULL)
 		return NULL;
 
-	out = g_malloc(strlen(in)+1);
+	out = g_malloc (strlen (in)+1);
 
 	o = out;
 	while ((c = *inptr++)) {
 		if (c == '\n') {
-			if (camel_mime_is_lwsp(*inptr)) {
+			if (camel_mime_is_lwsp (*inptr)) {
 				do {
 					inptr++;
-				} while (camel_mime_is_lwsp(*inptr));
+				} while (camel_mime_is_lwsp (*inptr));
 				*o++ = ' ';
 			} else {
 				*o++ = c;
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h
index 75e2a9c..987fc0e 100644
--- a/camel/camel-mime-utils.h
+++ b/camel/camel-mime-utils.h
@@ -222,8 +222,8 @@ struct _camel_header_references *camel_header_references_dup (const struct _came
 gchar *camel_header_location_decode (const gchar *in);
 
 /* nntp stuff */
-struct _camel_header_newsgroup *camel_header_newsgroups_decode(const gchar *in);
-void camel_header_newsgroups_free(struct _camel_header_newsgroup *ng);
+struct _camel_header_newsgroup *camel_header_newsgroups_decode (const gchar *in);
+void camel_header_newsgroups_free (struct _camel_header_newsgroup *ng);
 
 const gchar *camel_transfer_encoding_to_string (CamelTransferEncoding encoding);
 CamelTransferEncoding camel_transfer_encoding_from_string (const gchar *string);
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index e89b604..dba27f6 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -56,15 +56,15 @@ static void movemail_external (const gchar *source, const gchar *dest,
 #endif
 
 #ifdef HAVE_BROKEN_SPOOL
-static gint camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, CamelMimeFilter *filter);
+static gint camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes, CamelMimeFilter *filter);
 static gint camel_movemail_solaris (gint oldsfd, gint dfd, GError **error);
 #else
 /* these could probably be exposed as a utility? (but only mbox needs it) */
-static gint camel_movemail_copy_file(gint sfd, gint dfd, GError **error);
+static gint camel_movemail_copy_file (gint sfd, gint dfd, GError **error);
 #endif
 
 #if 0
-static gint camel_movemail_copy(gint fromfd, gint tofd, goffset start, gsize bytes);
+static gint camel_movemail_copy (gint fromfd, gint tofd, goffset start, gsize bytes);
 #endif
 
 /**
@@ -133,17 +133,17 @@ camel_movemail (const gchar *source,
 	}
 
 	/* lock our source mailbox */
-	lockid = camel_lock_helper_lock(source, error);
+	lockid = camel_lock_helper_lock (source, error);
 	if (lockid == -1) {
-		close(sfd);
-		close(dfd);
+		close (sfd);
+		close (dfd);
 		return -1;
 	}
 
 #ifdef HAVE_BROKEN_SPOOL
-	res = camel_movemail_solaris(sfd, dfd, ex);
+	res = camel_movemail_solaris (sfd, dfd, ex);
 #else
-	res = camel_movemail_copy_file(sfd, dfd, error);
+	res = camel_movemail_copy_file (sfd, dfd, error);
 #endif
 
 	/* If no errors occurred copying the data, and we successfully
@@ -164,7 +164,7 @@ camel_movemail (const gchar *source,
 		close (dfd);
 	close (sfd);
 
-	camel_lock_helper_unlock(lockid);
+	camel_lock_helper_unlock (lockid);
 
 	return res;
 }
@@ -298,14 +298,14 @@ camel_movemail_copy_file (gint sfd,
 
 #if 0
 static gint
-camel_movemail_copy(gint fromfd, gint tofd, goffset start, gsize bytes)
+camel_movemail_copy (gint fromfd, gint tofd, goffset start, gsize bytes)
 {
         gchar buffer[4096];
         gint written = 0;
 
 	d(printf("writing %d bytes ... ", bytes));
 
-	if (lseek(fromfd, start, SEEK_SET) != start)
+	if (lseek (fromfd, start, SEEK_SET) != start)
 		return -1;
 
         while (bytes>0) {
@@ -317,7 +317,7 @@ camel_movemail_copy(gint fromfd, gint tofd, goffset start, gsize bytes)
                 else
                         toread = bytes;
 		do {
-			towrite = read(fromfd, buffer, toread);
+			towrite = read (fromfd, buffer, toread);
 		} while (towrite == -1 && errno == EINTR);
 
 		if (towrite == -1)
@@ -330,7 +330,7 @@ camel_movemail_copy(gint fromfd, gint tofd, goffset start, gsize bytes)
 		}
 
 		do {
-			toread = write(tofd, buffer, towrite);
+			toread = write (tofd, buffer, towrite);
 		} while (toread == -1 && errno == EINTR);
 
 		if (toread == -1)
@@ -350,7 +350,7 @@ camel_movemail_copy(gint fromfd, gint tofd, goffset start, gsize bytes)
 
 #ifdef HAVE_BROKEN_SPOOL
 static gint
-camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, CamelMimeFilter *filter)
+camel_movemail_copy_filter (gint fromfd, gint tofd, goffset start, gsize bytes, CamelMimeFilter *filter)
 {
         gchar buffer[4096+PRE_SIZE];
         gint written = 0;
@@ -359,9 +359,9 @@ camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, C
 
 	d(printf("writing %d bytes ... ", bytes));
 
-	camel_mime_filter_reset(filter);
+	camel_mime_filter_reset (filter);
 
-	if (lseek(fromfd, start, SEEK_SET) != start)
+	if (lseek (fromfd, start, SEEK_SET) != start)
 		return -1;
 
         while (bytes>0) {
@@ -373,7 +373,7 @@ camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, C
                 else
                         toread = bytes;
 		do {
-			towrite = read(fromfd, buffer+PRE_SIZE, toread);
+			towrite = read (fromfd, buffer+PRE_SIZE, toread);
 		} while (towrite == -1 && errno == EINTR);
 
 		if (towrite == -1)
@@ -384,13 +384,13 @@ camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, C
                 /* check for 'end of file' */
                 if (towrite == 0) {
 			d(printf("end of file?\n"));
-			camel_mime_filter_complete(filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
+			camel_mime_filter_complete (filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
 						   &filterbuffer, &filterlen, &filterpre);
 			towrite = filterlen;
 			if (towrite == 0)
 				break;
 		} else {
-			camel_mime_filter_filter(filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
+			camel_mime_filter_filter (filter, buffer+PRE_SIZE, towrite, PRE_SIZE,
 						 &filterbuffer, &filterlen, &filterpre);
 			towrite = filterlen;
 		}
@@ -398,7 +398,7 @@ camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, C
 		d(printf("writing %d filtered bytes\n", towrite));
 
 		do {
-			toread = write(tofd, filterbuffer, towrite);
+			toread = write (tofd, filterbuffer, towrite);
 		} while (toread == -1 && errno == EINTR);
 
 		if (toread == -1)
@@ -416,7 +416,7 @@ camel_movemail_copy_filter(gint fromfd, gint tofd, goffset start, gsize bytes, C
 /* write the headers back out again, but not he Content-Length header, because we dont
    want	to maintain it! */
 static gint
-solaris_header_write(gint fd, struct _camel_header_raw *header)
+solaris_header_write (gint fd, struct _camel_header_raw *header)
 {
         struct iovec iv[4];
         gint outlen = 0, len;
@@ -429,12 +429,12 @@ solaris_header_write(gint fd, struct _camel_header_raw *header)
         while (header) {
 		if (g_ascii_strcasecmp(header->name, "Content-Length")) {
 			iv[0].iov_base = header->name;
-			iv[0].iov_len = strlen(header->name);
+			iv[0].iov_len = strlen (header->name);
 			iv[2].iov_base = header->value;
-			iv[2].iov_len = strlen(header->value);
+			iv[2].iov_len = strlen (header->value);
 
 			do {
-				len = writev(fd, iv, 4);
+				len = writev (fd, iv, 4);
 			} while (len == -1 && errno == EINTR);
 
 			if (len == -1)
@@ -475,7 +475,7 @@ camel_movemail_solaris (gint oldsfd,
 	gchar *from = NULL;
 
 	/* need to dup as the mime parser will close on finish */
-	sfd = dup(oldsfd);
+	sfd = dup (oldsfd);
 	if (sfd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -485,16 +485,16 @@ camel_movemail_solaris (gint oldsfd,
 		return -1;
 	}
 
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_init_with_fd(mp, sfd);
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_scan_from (mp, TRUE);
+	camel_mime_parser_init_with_fd (mp, sfd);
 
-	ffrom = camel_mime_filter_from_new();
+	ffrom = camel_mime_filter_from_new ();
 
-	while (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM) {
-		g_assert(camel_mime_parser_from_line(mp));
-		from = g_strdup(camel_mime_parser_from_line(mp));
-		if (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM_END) {
+	while (camel_mime_parser_step (mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM) {
+		g_assert (camel_mime_parser_from_line (mp));
+		from = g_strdup (camel_mime_parser_from_line (mp));
+		if (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM_END) {
 			const gchar *cl;
 			gint length;
 			gint start, body;
@@ -502,40 +502,40 @@ camel_movemail_solaris (gint oldsfd,
 
 			ret = 0;
 
-			start = camel_mime_parser_tell_start_from(mp);
-			body = camel_mime_parser_tell(mp);
+			start = camel_mime_parser_tell_start_from (mp);
+			body = camel_mime_parser_tell (mp);
 
-			if (write(dfd, from, strlen(from)) != strlen(from))
+			if (write (dfd, from, strlen (from)) != strlen (from))
 				goto fail;
 
 			/* write out headers, but NOT content-length header */
-			if (solaris_header_write(dfd, camel_mime_parser_headers_raw(mp)) == -1)
+			if (solaris_header_write (dfd, camel_mime_parser_headers_raw (mp)) == -1)
 				goto fail;
 
 			cl = camel_mime_parser_header(mp, "content-length", NULL);
 			if (cl == NULL) {
 				g_warning("Required Content-Length header is missing from solaris mail box @ %d", (gint)camel_mime_parser_tell(mp));
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_step(mp, &buffer, &len);
-				camel_mime_parser_unstep(mp);
-				length = camel_mime_parser_tell_start_from(mp) - body;
+				camel_mime_parser_drop_step (mp);
+				camel_mime_parser_drop_step (mp);
+				camel_mime_parser_step (mp, &buffer, &len);
+				camel_mime_parser_unstep (mp);
+				length = camel_mime_parser_tell_start_from (mp) - body;
 				newpos = -1;
 			} else {
-				length = atoi(cl);
-				camel_mime_parser_drop_step(mp);
-				camel_mime_parser_drop_step(mp);
+				length = atoi (cl);
+				camel_mime_parser_drop_step (mp);
+				camel_mime_parser_drop_step (mp);
 				newpos = length+body;
 			}
 			/* copy body->length converting From lines */
-			if (camel_movemail_copy_filter(sfd, dfd, body, length, ffrom) == -1)
+			if (camel_movemail_copy_filter (sfd, dfd, body, length, ffrom) == -1)
 				goto fail;
 			if (newpos != -1)
-				camel_mime_parser_seek(mp, newpos, SEEK_SET);
+				camel_mime_parser_seek (mp, newpos, SEEK_SET);
 		} else {
 			g_error("Inalid parser state: %d", camel_mime_parser_state(mp));
 		}
-		g_free(from);
+		g_free (from);
 	}
 
 	g_object_unref (mp);
@@ -544,7 +544,7 @@ camel_movemail_solaris (gint oldsfd,
 	return ret;
 
 fail:
-	g_free(from);
+	g_free (from);
 
 	g_set_error (
 		error, G_IO_ERROR,
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
index fae9d10..e52ba08 100644
--- a/camel/camel-multipart-signed.c
+++ b/camel/camel-multipart-signed.c
@@ -55,34 +55,34 @@ multipart_signed_skip_content (CamelMimeParser *cmp)
 	gsize len;
 	gint state;
 
-	switch (camel_mime_parser_state(cmp)) {
+	switch (camel_mime_parser_state (cmp)) {
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 		/* body part */
-		while (camel_mime_parser_step(cmp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
+		while (camel_mime_parser_step (cmp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
 			/* NOOP */ ;
 		break;
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 		/* message body part */
-		(void)camel_mime_parser_step(cmp, &buf, &len);
+		(void)camel_mime_parser_step (cmp, &buf, &len);
 		multipart_signed_skip_content (cmp);
 
 		/* clean up followon state if any, see camel-mime-message.c */
-		state = camel_mime_parser_step(cmp, &buf, &len);
+		state = camel_mime_parser_step (cmp, &buf, &len);
 		switch (state) {
 		case CAMEL_MIME_PARSER_STATE_EOF:
 		case CAMEL_MIME_PARSER_STATE_FROM_END: /* these doesn't belong to us */
-			camel_mime_parser_unstep(cmp);
+			camel_mime_parser_unstep (cmp);
 		case CAMEL_MIME_PARSER_STATE_MESSAGE_END:
 			break;
 		default:
 			g_error ("Bad parser state: Expecting MESSAGE_END or EOF or EOM, got: %u", camel_mime_parser_state (cmp));
-			camel_mime_parser_unstep(cmp);
+			camel_mime_parser_unstep (cmp);
 			return -1;
 		}
 		break;
 	case CAMEL_MIME_PARSER_STATE_MULTIPART:
 		/* embedded multipart */
-		while ((state = camel_mime_parser_step(cmp, &buf, &len)) != CAMEL_MIME_PARSER_STATE_MULTIPART_END)
+		while ((state = camel_mime_parser_step (cmp, &buf, &len)) != CAMEL_MIME_PARSER_STATE_MULTIPART_END)
 			multipart_signed_skip_content (cmp);
 		break;
 	default:
@@ -116,23 +116,23 @@ multipart_signed_parse_content (CamelMultipartSigned *mps)
 	camel_stream_reset (stream, NULL);
 	cmp = camel_mime_parser_new ();
 	camel_mime_parser_init_with_stream (cmp, stream, NULL);
-	camel_mime_parser_push_state(cmp, CAMEL_MIME_PARSER_STATE_MULTIPART, boundary);
+	camel_mime_parser_push_state (cmp, CAMEL_MIME_PARSER_STATE_MULTIPART, boundary);
 
 	mps->start1 = -1;
 	mps->end1 = -1;
 	mps->start2 = -1;
 	mps->end2 = -1;
 
-	while ((state = camel_mime_parser_step(cmp, &buf, &len)) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
+	while ((state = camel_mime_parser_step (cmp, &buf, &len)) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
 		if (mps->start1 == -1) {
-			mps->start1 = camel_mime_parser_tell_start_headers(cmp);
+			mps->start1 = camel_mime_parser_tell_start_headers (cmp);
 		} else if (mps->start2 == -1) {
 			GByteArray *buffer;
 
 			buffer = camel_stream_mem_get_byte_array (
 				CAMEL_STREAM_MEM (stream));
-			mps->start2 = camel_mime_parser_tell_start_headers(cmp);
-			mps->end1 = camel_mime_parser_tell_start_boundary(cmp);
+			mps->start2 = camel_mime_parser_tell_start_headers (cmp);
+			mps->end1 = camel_mime_parser_tell_start_boundary (cmp);
 			if (mps->end1 > mps->start1 && buffer->data[mps->end1-1] == '\n')
 				mps->end1--;
 			if (mps->end1 > mps->start1 && buffer->data[mps->end1-1] == '\r')
@@ -147,10 +147,10 @@ multipart_signed_parse_content (CamelMultipartSigned *mps)
 	}
 
 	if (state == CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
-		mps->end2 = camel_mime_parser_tell_start_boundary(cmp);
+		mps->end2 = camel_mime_parser_tell_start_boundary (cmp);
 
-		camel_multipart_set_preface(mp, camel_mime_parser_preface(cmp));
-		camel_multipart_set_postface(mp, camel_mime_parser_postface(cmp));
+		camel_multipart_set_preface (mp, camel_mime_parser_preface (cmp));
+		camel_multipart_set_postface (mp, camel_mime_parser_postface (cmp));
 	}
 
 	g_object_unref (cmp);
@@ -238,18 +238,18 @@ multipart_signed_set_mime_type_field (CamelDataWrapper *data_wrapper,
 
 	/* Chain up to parent's set_mime_type_field() method. */
 	data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (camel_multipart_signed_parent_class);
-	data_wrapper_class->set_mime_type_field(data_wrapper, mime_type);
+	data_wrapper_class->set_mime_type_field (data_wrapper, mime_type);
 
 	if (mime_type) {
 		const gchar *micalg, *protocol;
 
 		protocol = camel_content_type_param(mime_type, "protocol");
-		g_free(mps->protocol);
-		mps->protocol = g_strdup(protocol);
+		g_free (mps->protocol);
+		mps->protocol = g_strdup (protocol);
 
 		micalg = camel_content_type_param(mime_type, "micalg");
-		g_free(mps->micalg);
-		mps->micalg = g_strdup(micalg);
+		g_free (mps->micalg);
+		mps->micalg = g_strdup (micalg);
 	}
 }
 
@@ -295,7 +295,7 @@ multipart_signed_write_to_stream (CamelDataWrapper *data_wrapper,
 	}
 
 	/* 2 */
-	boundary = camel_multipart_get_boundary(mp);
+	boundary = camel_multipart_get_boundary (mp);
 	if (mp->preface) {
 		count = camel_stream_write_string (stream, mp->preface, error);
 		if (count == -1)
@@ -360,7 +360,7 @@ multipart_signed_construct_from_stream (CamelDataWrapper *data_wrapper,
                                         GError **error)
 {
 	CamelMultipartSigned *mps = (CamelMultipartSigned *)data_wrapper;
-	CamelStream *mem = camel_stream_mem_new();
+	CamelStream *mem = camel_stream_mem_new ();
 
 	if (camel_stream_write_to_stream (stream, mem, error) == -1)
 		return -1;
@@ -416,7 +416,7 @@ multipart_signed_get_part (CamelMultipart *multipart,
 		if (mps->contentraw) {
 			stream = g_object_ref (mps->contentraw);
 		} else if (mps->start1 == -1
-			   && multipart_signed_parse_content(mps) == -1
+			   && multipart_signed_parse_content (mps) == -1
 			   && (stream = ((CamelDataWrapper *)mps)->stream) == NULL) {
 			g_warning("Trying to get content on an invalid multipart/signed");
 			return NULL;
@@ -425,10 +425,10 @@ multipart_signed_get_part (CamelMultipart *multipart,
 		} else if (mps->start1 == -1) {
 			stream = g_object_ref (dw->stream);
 		} else {
-			stream = camel_seekable_substream_new((CamelSeekableStream *)dw->stream, mps->start1, mps->end1);
+			stream = camel_seekable_substream_new ((CamelSeekableStream *)dw->stream, mps->start1, mps->end1);
 		}
 		camel_stream_reset (stream, NULL);
-		mps->content = camel_mime_part_new();
+		mps->content = camel_mime_part_new ();
 		camel_data_wrapper_construct_from_stream (
 			CAMEL_DATA_WRAPPER (mps->content), stream, NULL);
 		g_object_unref (stream);
@@ -437,15 +437,15 @@ multipart_signed_get_part (CamelMultipart *multipart,
 		if (mps->signature)
 			return mps->signature;
 		if (mps->start1 == -1
-		    && multipart_signed_parse_content(mps) == -1) {
+		    && multipart_signed_parse_content (mps) == -1) {
 			g_warning("Trying to get signature on invalid multipart/signed");
 			return NULL;
 		} else if (dw->stream == NULL) {
 			return NULL;
 		}
-		stream = camel_seekable_substream_new((CamelSeekableStream *)dw->stream, mps->start2, mps->end2);
+		stream = camel_seekable_substream_new ((CamelSeekableStream *)dw->stream, mps->start2, mps->end2);
 		camel_stream_reset (stream, NULL);
-		mps->signature = camel_mime_part_new();
+		mps->signature = camel_mime_part_new ();
 		camel_data_wrapper_construct_from_stream (
 			CAMEL_DATA_WRAPPER (mps->signature), stream, NULL);
 		g_object_unref (stream);
@@ -468,7 +468,7 @@ multipart_signed_get_number (CamelMultipart *multipart)
 	if ((mps->content || mps->contentraw) && mps->signature)
 		return 2;
 
-	if (mps->start1 == -1 && multipart_signed_parse_content(mps) == -1) {
+	if (mps->start1 == -1 && multipart_signed_parse_content (mps) == -1) {
 		if (dw->stream == NULL)
 			return 0;
 		else
@@ -491,19 +491,19 @@ multipart_signed_construct_from_parser (CamelMultipart *multipart,
 
 	/* we *must not* be in multipart state, otherwise the mime parser will
 	   parse the headers which is a no no @#$ # stupid multipart/signed spec */
-	g_assert(camel_mime_parser_state(mp) == CAMEL_MIME_PARSER_STATE_HEADER);
+	g_assert (camel_mime_parser_state (mp) == CAMEL_MIME_PARSER_STATE_HEADER);
 
 	/* All we do is copy it to a memstream */
-	content_type = camel_mime_parser_content_type(mp);
+	content_type = camel_mime_parser_content_type (mp);
 	camel_multipart_set_boundary(multipart, camel_content_type_param(content_type, "boundary"));
 
-	stream = camel_stream_mem_new();
-	while (camel_mime_parser_step(mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
-		camel_stream_write(stream, buf, len, NULL);
+	stream = camel_stream_mem_new ();
+	while (camel_mime_parser_step (mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_BODY_END)
+		camel_stream_write (stream, buf, len, NULL);
 
 	multipart_signed_set_stream (mps, stream);
 
-	err = camel_mime_parser_errno(mp);
+	err = camel_mime_parser_errno (mp);
 	if (err != 0) {
 		errno = err;
 		return -1;
@@ -605,7 +605,7 @@ camel_multipart_signed_get_content_stream (CamelMultipartSigned *mps,
 		CamelStream *sub;
 		CamelMimeFilter *canon_filter;
 
-		if (mps->start1 == -1 && multipart_signed_parse_content(mps) == -1) {
+		if (mps->start1 == -1 && multipart_signed_parse_content (mps) == -1) {
 			g_set_error (
 				error, CAMEL_ERROR,
 				CAMEL_ERROR_GENERIC,
@@ -614,13 +614,13 @@ camel_multipart_signed_get_content_stream (CamelMultipartSigned *mps,
 		}
 
 		/* first, prepare our parts */
-		sub = camel_seekable_substream_new((CamelSeekableStream *)((CamelDataWrapper *)mps)->stream, mps->start1, mps->end1);
+		sub = camel_seekable_substream_new ((CamelSeekableStream *)((CamelDataWrapper *)mps)->stream, mps->start1, mps->end1);
 		constream = camel_stream_filter_new (sub);
 		g_object_unref (sub);
 
 		/* Note: see rfc2015 or rfc3156, section 5 */
 		canon_filter = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF);
-		camel_stream_filter_add((CamelStreamFilter *)constream, (CamelMimeFilter *)canon_filter);
+		camel_stream_filter_add ((CamelStreamFilter *)constream, (CamelMimeFilter *)canon_filter);
 		g_object_unref (canon_filter);
 	}
 
diff --git a/camel/camel-multipart-signed.h b/camel/camel-multipart-signed.h
index 06a9308..5ceee44 100644
--- a/camel/camel-multipart-signed.h
+++ b/camel/camel-multipart-signed.h
@@ -104,7 +104,7 @@ GType camel_multipart_signed_get_type (void);
 /* public methods */
 CamelMultipartSigned *camel_multipart_signed_new           (void);
 
-CamelStream *camel_multipart_signed_get_content_stream(CamelMultipartSigned *mps, GError **error);
+CamelStream *camel_multipart_signed_get_content_stream (CamelMultipartSigned *mps, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index fe73caf..1f2ae22 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -257,8 +257,8 @@ multipart_set_boundary (CamelMultipart *multipart,
 
 		/* Generate a fairly random boundary string. */
 		bgen = g_strdup_printf ("%p:%lu:%lu", (gpointer) multipart,
-					(gulong) getpid(),
-					(gulong) time(NULL));
+					(gulong) getpid (),
+					(gulong) time (NULL));
 
 		checksum = g_checksum_new (G_CHECKSUM_MD5);
 		g_checksum_update (checksum, (guchar *) bgen, -1);
@@ -298,28 +298,28 @@ multipart_construct_from_parser (CamelMultipart *multipart,
 	gchar *buf;
 	gsize len;
 
-	g_assert(camel_mime_parser_state(mp) == CAMEL_MIME_PARSER_STATE_MULTIPART);
+	g_assert (camel_mime_parser_state (mp) == CAMEL_MIME_PARSER_STATE_MULTIPART);
 
 	/* FIXME: we should use a came-mime-mutlipart, not jsut a camel-multipart, but who cares */
 	d(printf("Creating multi-part\n"));
 
-	content_type = camel_mime_parser_content_type(mp);
-	camel_multipart_set_boundary(multipart,
+	content_type = camel_mime_parser_content_type (mp);
+	camel_multipart_set_boundary (multipart,
 				     camel_content_type_param(content_type, "boundary"));
 
-	while (camel_mime_parser_step(mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
-		camel_mime_parser_unstep(mp);
-		bodypart = camel_mime_part_new();
+	while (camel_mime_parser_step (mp, &buf, &len) != CAMEL_MIME_PARSER_STATE_MULTIPART_END) {
+		camel_mime_parser_unstep (mp);
+		bodypart = camel_mime_part_new ();
 		camel_mime_part_construct_from_parser (bodypart, mp, NULL);
-		camel_multipart_add_part(multipart, bodypart);
+		camel_multipart_add_part (multipart, bodypart);
 		g_object_unref (bodypart);
 	}
 
 	/* these are only return valid data in the MULTIPART_END state */
-	camel_multipart_set_preface(multipart, camel_mime_parser_preface (mp));
-	camel_multipart_set_postface(multipart, camel_mime_parser_postface (mp));
+	camel_multipart_set_preface (multipart, camel_mime_parser_preface (mp));
+	camel_multipart_set_postface (multipart, camel_mime_parser_postface (mp));
 
-	err = camel_mime_parser_errno(mp);
+	err = camel_mime_parser_errno (mp);
 	if (err != 0) {
 		errno = err;
 		return -1;
@@ -620,7 +620,7 @@ camel_multipart_construct_from_parser (CamelMultipart *multipart,
 {
 	CamelMultipartClass *class;
 
-	g_return_val_if_fail (CAMEL_IS_MULTIPART(multipart), -1);
+	g_return_val_if_fail (CAMEL_IS_MULTIPART (multipart), -1);
 	g_return_val_if_fail (CAMEL_IS_MIME_PARSER (mp), -1);
 
 	class = CAMEL_MULTIPART_GET_CLASS (multipart);
diff --git a/camel/camel-multipart.h b/camel/camel-multipart.h
index 8e9d6cc..887c399 100644
--- a/camel/camel-multipart.h
+++ b/camel/camel-multipart.h
@@ -106,7 +106,7 @@ const gchar *        camel_multipart_get_boundary   (CamelMultipart *multipart);
 void		    camel_multipart_set_preface	   (CamelMultipart *multipart, const gchar *preface);
 void		    camel_multipart_set_postface   (CamelMultipart *multipart, const gchar *postface);
 
-gint		    camel_multipart_construct_from_parser(CamelMultipart *multipart, struct _CamelMimeParser *parser);
+gint		    camel_multipart_construct_from_parser (CamelMultipart *multipart, struct _CamelMimeParser *parser);
 
 G_END_DECLS
 
diff --git a/camel/camel-net-utils.c b/camel/camel-net-utils.c
index d2b44f3..88e36ea 100644
--- a/camel/camel-net-utils.c
+++ b/camel/camel-net-utils.c
@@ -432,14 +432,14 @@ struct _addrinfo_msg {
 };
 
 static void
-cs_freeinfo(struct _addrinfo_msg *msg)
+cs_freeinfo (struct _addrinfo_msg *msg)
 {
-	g_free(msg->host);
-	g_free(msg->serv);
+	g_free (msg->host);
+	g_free (msg->serv);
 #ifdef NEED_ADDRINFO
-	g_free(msg->hostbufmem);
+	g_free (msg->hostbufmem);
 #endif
-	g_free(msg);
+	g_free (msg);
 }
 
 /* returns -1 if we didn't wait for reply from thread */
@@ -453,14 +453,14 @@ cs_waitinfo (gpointer (worker)(gpointer),
 	GThread *thread;
 	gint cancel_fd, cancel = 0, fd;
 
-	cancel_fd = camel_operation_cancel_fd(NULL);
+	cancel_fd = camel_operation_cancel_fd (NULL);
 	if (cancel_fd == -1) {
-		worker(msg);
+		worker (msg);
 		return 0;
 	}
 
-	reply_port = msg->msg.reply_port = camel_msgport_new();
-	fd = camel_msgport_fd(msg->msg.reply_port);
+	reply_port = msg->msg.reply_port = camel_msgport_new ();
+	fd = camel_msgport_fd (msg->msg.reply_port);
 	if ((thread = g_thread_create (worker, msg, TRUE, error)) != NULL) {
 		gint status;
 #ifndef G_OS_WIN32
@@ -475,16 +475,16 @@ cs_waitinfo (gpointer (worker)(gpointer),
 		do {
 			polls[0].revents = 0;
 			polls[1].revents = 0;
-			status = g_poll(polls, 2, -1);
+			status = g_poll (polls, 2, -1);
 		} while (status == -1 && errno == EINTR);
 #else
 		fd_set read_set;
 
-		FD_ZERO(&read_set);
-		FD_SET(fd, &read_set);
-		FD_SET(cancel_fd, &read_set);
+		FD_ZERO (&read_set);
+		FD_SET (fd, &read_set);
+		FD_SET (cancel_fd, &read_set);
 
-		status = select(MAX(fd, cancel_fd) + 1, &read_set, NULL, NULL, NULL);
+		status = select (MAX (fd, cancel_fd) + 1, &read_set, NULL, NULL, NULL);
 #endif
 
 		if (status == -1 ||
@@ -524,19 +524,19 @@ cs_waitinfo (gpointer (worker)(gpointer),
 			g_thread_join (thread);
 			d(printf("child done\n"));
 
-			reply = (struct _addrinfo_msg *)camel_msgport_try_pop(reply_port);
+			reply = (struct _addrinfo_msg *)camel_msgport_try_pop (reply_port);
 			if (reply != msg)
 				g_warning ("%s: Received msg reply %p doesn't match msg %p", G_STRFUNC, reply, msg);
 		}
 	}
-	camel_msgport_destroy(reply_port);
+	camel_msgport_destroy (reply_port);
 
 	return cancel;
 }
 
 #ifdef NEED_ADDRINFO
 static gpointer
-cs_getaddrinfo(gpointer data)
+cs_getaddrinfo (gpointer data)
 {
 	struct _addrinfo_msg *msg = data;
 	gint herr;
@@ -548,11 +548,11 @@ cs_getaddrinfo(gpointer data)
 
 	/* This is a pretty simplistic emulation of getaddrinfo */
 
-	while ((msg->result = camel_gethostbyname_r(msg->name, &h, msg->hostbufmem, msg->hostbuflen, &herr)) == ERANGE) {
+	while ((msg->result = camel_gethostbyname_r (msg->name, &h, msg->hostbufmem, msg->hostbuflen, &herr)) == ERANGE) {
 		if (msg->cancelled)
 			break;
                 msg->hostbuflen *= 2;
-                msg->hostbufmem = g_realloc(msg->hostbufmem, msg->hostbuflen);
+                msg->hostbufmem = g_realloc (msg->hostbufmem, msg->hostbuflen);
 	}
 
 	/* If we got cancelled, dont reply, just free it */
@@ -596,23 +596,23 @@ cs_getaddrinfo(gpointer data)
 					socktype = "udp";
 			}
 
-			serv = getservbyname(msg->service, socktype);
+			serv = getservbyname (msg->service, socktype);
 			if (serv == NULL) {
 				msg->result = EAI_NONAME;
 				goto reply;
 			}
 			port = serv->s_port;
 		} else {
-			port = htons(strtoul(msg->service, NULL, 10));
+			port = htons (strtoul (msg->service, NULL, 10));
 		}
 	}
 
 	for (i = 0; h.h_addr_list[i] && !msg->cancelled; i++) {
-		res = g_malloc0(sizeof(*res));
+		res = g_malloc0 (sizeof (*res));
 		if (msg->hints) {
 			res->ai_flags = msg->hints->ai_flags;
 			if (msg->hints->ai_flags & AI_CANONNAME)
-				res->ai_canonname = g_strdup(h.h_name);
+				res->ai_canonname = g_strdup (h.h_name);
 			res->ai_socktype = msg->hints->ai_socktype;
 			res->ai_protocol = msg->hints->ai_protocol;
 		} else {
@@ -621,12 +621,12 @@ cs_getaddrinfo(gpointer data)
 			res->ai_protocol = 0;	/* fudge */
 		}
 		res->ai_family = AF_INET;
-		res->ai_addrlen = sizeof(*sin);
-		res->ai_addr = g_malloc(sizeof(*sin));
+		res->ai_addrlen = sizeof (*sin);
+		res->ai_addr = g_malloc (sizeof (*sin));
 		sin = (struct sockaddr_in *)res->ai_addr;
 		sin->sin_family = AF_INET;
 		sin->sin_port = port;
-		memcpy(&sin->sin_addr, h.h_addr_list[i], sizeof(sin->sin_addr));
+		memcpy (&sin->sin_addr, h.h_addr_list[i], sizeof (sin->sin_addr));
 
 		if (last == NULL) {
 			*msg->res = last = res;
@@ -636,17 +636,17 @@ cs_getaddrinfo(gpointer data)
 		}
 	}
 reply:
-	camel_msgport_reply((CamelMsg *)msg);
+	camel_msgport_reply ((CamelMsg *)msg);
 cancel:
 	return NULL;
 }
 #else
 static gpointer
-cs_getaddrinfo(gpointer data)
+cs_getaddrinfo (gpointer data)
 {
 	struct _addrinfo_msg *info = data;
 
-	info->result = getaddrinfo(info->name, info->service, info->hints, info->res);
+	info->result = getaddrinfo (info->name, info->service, info->hints, info->res);
 
 	/* On Solaris, the service name 'http' or 'https' is not defined.
 	   Use the port as the service name directly. */
@@ -658,7 +658,7 @@ cs_getaddrinfo(gpointer data)
 	}
 
 	if (!info->cancelled)
-		camel_msgport_reply((CamelMsg *)info);
+		camel_msgport_reply ((CamelMsg *)info);
 
 	return NULL;
 }
@@ -680,9 +680,9 @@ camel_getaddrinfo (const gchar *name,
 #ifndef ENABLE_IPv6
 	struct addrinfo myhints;
 #endif
-	g_return_val_if_fail(name != NULL, NULL);
+	g_return_val_if_fail (name != NULL, NULL);
 
-	if (camel_operation_cancel_check(NULL)) {
+	if (camel_operation_cancel_check (NULL)) {
 		g_set_error (
 			error, G_IO_ERROR,
 			G_IO_ERROR_CANCELLED,
@@ -695,7 +695,7 @@ camel_getaddrinfo (const gchar *name,
 	/* force ipv4 addresses only */
 #ifndef ENABLE_IPv6
 	if (hints == NULL)
-		memset(&myhints, 0, sizeof(myhints));
+		memset (&myhints, 0, sizeof (myhints));
 	else
 		memcpy (&myhints, hints, sizeof (myhints));
 
@@ -703,14 +703,14 @@ camel_getaddrinfo (const gchar *name,
 	hints = &myhints;
 #endif
 
-	msg = g_malloc0(sizeof(*msg));
+	msg = g_malloc0 (sizeof (*msg));
 	msg->name = name;
 	msg->service = service;
 	msg->hints = hints;
 	msg->res = &res;
 #ifdef NEED_ADDRINFO
 	msg->hostbuflen = 1024;
-	msg->hostbufmem = g_malloc(msg->hostbuflen);
+	msg->hostbufmem = g_malloc (msg->hostbuflen);
 #endif
 	if (cs_waitinfo(cs_getaddrinfo, msg, _("Host lookup failed"), error) == 0) {
 		if (msg->result != 0) {
@@ -723,7 +723,7 @@ camel_getaddrinfo (const gchar *name,
 		res = NULL;
 
 	cs_freeinfo (msg);
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return res;
 }
@@ -734,25 +734,25 @@ camel_getaddrinfo (const gchar *name,
  * Since: 2.22
  **/
 void
-camel_freeaddrinfo(struct addrinfo *host)
+camel_freeaddrinfo (struct addrinfo *host)
 {
 #ifdef NEED_ADDRINFO
 	while (host) {
 		struct addrinfo *next = host->ai_next;
 
-		g_free(host->ai_canonname);
-		g_free(host->ai_addr);
-		g_free(host);
+		g_free (host->ai_canonname);
+		g_free (host->ai_addr);
+		g_free (host);
 		host = next;
 	}
 #else
-	freeaddrinfo(host);
+	freeaddrinfo (host);
 #endif
 }
 
 #ifdef NEED_ADDRINFO
 static gpointer
-cs_getnameinfo(gpointer data)
+cs_getnameinfo (gpointer data)
 {
 	struct _addrinfo_msg *msg = data;
 	gint herr;
@@ -767,21 +767,21 @@ cs_getnameinfo(gpointer data)
 
 	/* FIXME: honour getnameinfo flags: do we care, not really */
 
-	while ((msg->result = camel_gethostbyaddr_r((const gchar *)&sin->sin_addr, sizeof(sin->sin_addr), AF_INET, &h,
+	while ((msg->result = camel_gethostbyaddr_r ((const gchar *)&sin->sin_addr, sizeof (sin->sin_addr), AF_INET, &h,
 						    msg->hostbufmem, msg->hostbuflen, &herr)) == ERANGE) {
 		if (msg->cancelled)
 			break;
                 msg->hostbuflen *= 2;
-                msg->hostbufmem = g_realloc(msg->hostbufmem, msg->hostbuflen);
+                msg->hostbufmem = g_realloc (msg->hostbufmem, msg->hostbuflen);
 	}
 
 	if (msg->cancelled)
 		goto cancel;
 
 	if (msg->host) {
-		g_free(msg->host);
+		g_free (msg->host);
 		if (msg->result == 0 && h.h_name && h.h_name[0]) {
-			msg->host = g_strdup(h.h_name);
+			msg->host = g_strdup (h.h_name);
 		} else {
 			guchar *in = (guchar *)&sin->sin_addr;
 
@@ -801,15 +801,15 @@ cancel:
 }
 #else
 static gpointer
-cs_getnameinfo(gpointer data)
+cs_getnameinfo (gpointer data)
 {
 	struct _addrinfo_msg *msg = data;
 
 	/* there doens't appear to be a return code which says host or serv buffers are too short, lengthen them */
-	msg->result = getnameinfo(msg->addr, msg->addrlen, msg->host, msg->hostlen, msg->serv, msg->servlen, msg->flags);
+	msg->result = getnameinfo (msg->addr, msg->addrlen, msg->host, msg->hostlen, msg->serv, msg->servlen, msg->flags);
 
 	if (!msg->cancelled)
-		camel_msgport_reply((CamelMsg *)msg);
+		camel_msgport_reply ((CamelMsg *)msg);
 
 	return NULL;
 }
@@ -841,23 +841,23 @@ camel_getnameinfo (const struct sockaddr *sa,
 
 	camel_operation_start_transient(NULL, _("Resolving address"));
 
-	msg = g_malloc0(sizeof(*msg));
+	msg = g_malloc0 (sizeof (*msg));
 	msg->addr = sa;
 	msg->addrlen = salen;
 	if (host) {
 		msg->hostlen = NI_MAXHOST;
-		msg->host = g_malloc(msg->hostlen);
+		msg->host = g_malloc (msg->hostlen);
 		msg->host[0] = 0;
 	}
 	if (serv) {
 		msg->servlen = NI_MAXSERV;
-		msg->serv = g_malloc(msg->servlen);
+		msg->serv = g_malloc (msg->servlen);
 		msg->serv[0] = 0;
 	}
 	msg->flags = flags;
 #ifdef NEED_ADDRINFO
 	msg->hostbuflen = 1024;
-	msg->hostbufmem = g_malloc(msg->hostbuflen);
+	msg->hostbufmem = g_malloc (msg->hostbuflen);
 #endif
 	cs_waitinfo(cs_getnameinfo, msg, _("Name lookup failed"), error);
 
@@ -873,7 +873,7 @@ camel_getnameinfo (const struct sockaddr *sa,
 	}
 
 	cs_freeinfo (msg);
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return result;
 }
diff --git a/camel/camel-net-utils.h b/camel/camel-net-utils.h
index 17ef3a3..0a36677 100644
--- a/camel/camel-net-utils.h
+++ b/camel/camel-net-utils.h
@@ -88,10 +88,10 @@ struct addrinfo {
 #endif
 #endif
 
-struct addrinfo *camel_getaddrinfo(const gchar *name, const gchar *service,
+struct addrinfo *camel_getaddrinfo (const gchar *name, const gchar *service,
 				   const struct addrinfo *hints, GError **error);
-void camel_freeaddrinfo(struct addrinfo *host);
-gint camel_getnameinfo(const struct sockaddr *sa, socklen_t salen, gchar **host, gchar **serv,
+void camel_freeaddrinfo (struct addrinfo *host);
+gint camel_getnameinfo (const struct sockaddr *sa, socklen_t salen, gchar **host, gchar **serv,
 		      gint flags, GError **error);
 
 G_END_DECLS
diff --git a/camel/camel-nntp-address.c b/camel/camel-nntp-address.c
index 6fb5d30..85bf1b9 100644
--- a/camel/camel-nntp-address.c
+++ b/camel/camel-nntp-address.c
@@ -41,12 +41,12 @@ nntp_address_decode (CamelAddress *address,
 	struct _camel_header_newsgroup *ha, *n;
 	gint count = address->addresses->len;
 
-	ha = camel_header_newsgroups_decode(raw);
+	ha = camel_header_newsgroups_decode (raw);
 	if (ha) {
 		for (n = ha;n;n=n->next)
 			camel_nntp_address_add (
 				CAMEL_NNTP_ADDRESS (address), n->newsgroup);
-		camel_header_newsgroups_free(ha);
+		camel_header_newsgroups_free (ha);
 	}
 
 	return address->addresses->len - count;
@@ -69,11 +69,11 @@ nntp_address_encode (CamelAddress *address)
 		if (i != 0)
 			g_string_append(out, ", ");
 
-		g_string_append(out, g_ptr_array_index(address->addresses, i));
+		g_string_append (out, g_ptr_array_index (address->addresses, i));
 	}
 
 	ret = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return ret;
 }
@@ -84,7 +84,7 @@ nntp_address_cat (CamelAddress *dest,
 {
 	gint ii;
 
-	g_assert(CAMEL_IS_NNTP_ADDRESS(source));
+	g_assert (CAMEL_IS_NNTP_ADDRESS (source));
 
 	for (ii = 0; ii < source->addresses->len; ii++)
 		camel_nntp_address_add (
@@ -151,14 +151,14 @@ camel_nntp_address_add (CamelNNTPAddress *a, const gchar *name)
 {
 	gint index, i;
 
-	g_assert(CAMEL_IS_NNTP_ADDRESS(a));
+	g_assert (CAMEL_IS_NNTP_ADDRESS (a));
 
 	index = ((CamelAddress *)a)->addresses->len;
 	for (i=0;i<index;i++)
-		if (!strcmp(g_ptr_array_index(((CamelAddress *)a)->addresses, i), name))
+		if (!strcmp (g_ptr_array_index (((CamelAddress *)a)->addresses, i), name))
 			return i;
 
-	g_ptr_array_add(((CamelAddress *)a)->addresses, g_strdup(name));
+	g_ptr_array_add (((CamelAddress *)a)->addresses, g_strdup (name));
 
 	return index;
 }
@@ -176,7 +176,7 @@ camel_nntp_address_add (CamelNNTPAddress *a, const gchar *name)
 gboolean
 camel_nntp_address_get (CamelNNTPAddress *a, gint index, const gchar **namep)
 {
-	g_assert(CAMEL_IS_NNTP_ADDRESS(a));
+	g_assert (CAMEL_IS_NNTP_ADDRESS (a));
 
 	if (index < 0 || index >= ((CamelAddress *)a)->addresses->len)
 		return FALSE;
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 8b4ceb2..c9d3026 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -456,7 +456,7 @@ camel_object_state_write (CamelObject *object)
 				g_rename (savename, state_filename);
 			}
 		} else {
-			fclose(fp);
+			fclose (fp);
 		}
 	} else {
 		g_warning("Could not save object state file to '%s': %s", savename, g_strerror(errno));
diff --git a/camel/camel-offline-folder.c b/camel/camel-offline-folder.c
index 2251cbb..c643810 100644
--- a/camel/camel-offline-folder.c
+++ b/camel/camel-offline-folder.c
@@ -176,7 +176,7 @@ offline_folder_downsync (CamelOfflineFolder *offline,
 
 	if (!uids)
 		goto done;
-	uncached_uids = camel_folder_get_uncached_uids(folder, uids, NULL);
+	uncached_uids = camel_folder_get_uncached_uids (folder, uids, NULL);
 	if (uids) {
 		if (expression)
 			camel_folder_search_free (folder, uids);
@@ -195,7 +195,7 @@ offline_folder_downsync (CamelOfflineFolder *offline,
 
 done:
 	if (uncached_uids)
-		camel_folder_free_uids(folder, uncached_uids);
+		camel_folder_free_uids (folder, uncached_uids);
 
 	camel_operation_end (NULL);
 
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 0308b07..8a5738a 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -82,7 +82,7 @@ static GStaticMutex operation_lock = G_STATIC_MUTEX_INIT;
 #define UNLOCK() g_static_mutex_unlock(&operation_lock)
 
 static guint stamp (void);
-static CamelDList operation_list = CAMEL_DLIST_INITIALISER(operation_list);
+static CamelDList operation_list = CAMEL_DLIST_INITIALISER (operation_list);
 static GStaticPrivate operation_key = G_STATIC_PRIVATE_INIT;
 
 typedef struct _CamelOperationMsg {
@@ -90,7 +90,7 @@ typedef struct _CamelOperationMsg {
 } CamelOperationMsg;
 
 static CamelOperation *
-co_getcc(void)
+co_getcc (void)
 {
 	return (CamelOperation *)g_static_private_get (&operation_key);
 }
@@ -136,19 +136,19 @@ camel_operation_new (CamelOperationStatusFunc status, gpointer status_data)
 {
 	CamelOperation *cc;
 
-	cc = g_malloc0(sizeof(*cc));
+	cc = g_malloc0 (sizeof (*cc));
 
 	cc->flags = 0;
 	cc->blocked = 0;
 	cc->refcount = 1;
 	cc->status = status;
 	cc->status_data = status_data;
-	cc->cancel_port = camel_msgport_new();
+	cc->cancel_port = camel_msgport_new ();
 	cc->cancel_fd = -1;
 
-	LOCK();
-	camel_dlist_addtail(&operation_list, (CamelDListNode *)cc);
-	UNLOCK();
+	LOCK ();
+	camel_dlist_addtail (&operation_list, (CamelDListNode *)cc);
+	UNLOCK ();
 
 	return cc;
 }
@@ -161,13 +161,13 @@ camel_operation_new (CamelOperationStatusFunc status, gpointer status_data)
  * receive operation updates, even if more are sent.
  **/
 void
-camel_operation_mute(CamelOperation *cc)
+camel_operation_mute (CamelOperation *cc)
 {
-	LOCK();
+	LOCK ();
 	cc->status = NULL;
 	cc->status_data = NULL;
 	clear_status_stack (cc, FALSE);
-	UNLOCK();
+	UNLOCK ();
 }
 
 /**
@@ -178,10 +178,10 @@ camel_operation_mute(CamelOperation *cc)
 CamelOperation *
 camel_operation_registered (void)
 {
-	CamelOperation *cc = co_getcc();
+	CamelOperation *cc = co_getcc ();
 
 	if (cc)
-		camel_operation_ref(cc);
+		camel_operation_ref (cc);
 
 	return cc;
 }
@@ -195,11 +195,11 @@ camel_operation_registered (void)
 void
 camel_operation_ref (CamelOperation *cc)
 {
-	g_assert(cc->refcount > 0);
+	g_assert (cc->refcount > 0);
 
-	LOCK();
+	LOCK ();
 	cc->refcount++;
-	UNLOCK();
+	UNLOCK ();
 }
 
 /**
@@ -211,25 +211,25 @@ camel_operation_ref (CamelOperation *cc)
 void
 camel_operation_unref (CamelOperation *cc)
 {
-	g_assert(cc->refcount > 0);
+	g_assert (cc->refcount > 0);
 
-	LOCK();
+	LOCK ();
 	if (cc->refcount == 1) {
 		CamelOperationMsg *msg;
 
-		camel_dlist_remove((CamelDListNode *)cc);
+		camel_dlist_remove ((CamelDListNode *)cc);
 
-		while ((msg = (CamelOperationMsg *)camel_msgport_try_pop(cc->cancel_port)))
-			g_free(msg);
+		while ((msg = (CamelOperationMsg *)camel_msgport_try_pop (cc->cancel_port)))
+			g_free (msg);
 
-		camel_msgport_destroy(cc->cancel_port);
+		camel_msgport_destroy (cc->cancel_port);
 
 		clear_status_stack (cc, TRUE);
-		g_free(cc);
+		g_free (cc);
 	} else {
 		cc->refcount--;
 	}
-	UNLOCK();
+	UNLOCK ();
 }
 
 /**
@@ -244,7 +244,7 @@ camel_operation_cancel (CamelOperation *cc)
 {
 	CamelOperationMsg *msg;
 
-	LOCK();
+	LOCK ();
 
 	if (cc == NULL) {
 		CamelOperation *cn;
@@ -253,8 +253,8 @@ camel_operation_cancel (CamelOperation *cc)
 		cn = cc->next;
 		while (cn) {
 			cc->flags |= CAMEL_OPERATION_CANCELLED;
-			msg = g_malloc0(sizeof(*msg));
-			camel_msgport_push(cc->cancel_port, (CamelMsg *)msg);
+			msg = g_malloc0 (sizeof (*msg));
+			camel_msgport_push (cc->cancel_port, (CamelMsg *)msg);
 			cc = cn;
 			cn = cn->next;
 		}
@@ -262,11 +262,11 @@ camel_operation_cancel (CamelOperation *cc)
 		d(printf("cancelling thread %d\n", cc->id));
 
 		cc->flags |= CAMEL_OPERATION_CANCELLED;
-		msg = g_malloc0(sizeof(*msg));
-		camel_msgport_push(cc->cancel_port, (CamelMsg *)msg);
+		msg = g_malloc0 (sizeof (*msg));
+		camel_msgport_push (cc->cancel_port, (CamelMsg *)msg);
 	}
 
-	UNLOCK();
+	UNLOCK ();
 }
 
 /**
@@ -281,20 +281,20 @@ camel_operation_cancel (CamelOperation *cc)
  * processing.
  **/
 void
-camel_operation_uncancel(CamelOperation *cc)
+camel_operation_uncancel (CamelOperation *cc)
 {
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc) {
 		CamelOperationMsg *msg;
 
-		LOCK();
-		while ((msg = (CamelOperationMsg *)camel_msgport_try_pop(cc->cancel_port)))
-			g_free(msg);
+		LOCK ();
+		while ((msg = (CamelOperationMsg *)camel_msgport_try_pop (cc->cancel_port)))
+			g_free (msg);
 
 		cc->flags &= ~CAMEL_OPERATION_CANCELLED;
-		UNLOCK();
+		UNLOCK ();
 	}
 }
 
@@ -315,7 +315,7 @@ camel_operation_uncancel(CamelOperation *cc)
 CamelOperation *
 camel_operation_register (CamelOperation *cc)
 {
-	CamelOperation *oldcc = co_getcc();
+	CamelOperation *oldcc = co_getcc ();
 
 	g_static_private_set (&operation_key, cc, NULL);
 
@@ -352,9 +352,9 @@ camel_operation_cancel_check (CamelOperation *cc)
 	d(printf("checking for cancel in thread %p\n", g_thread_self()));
 
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
-	LOCK();
+	LOCK ();
 
 	if (cc == NULL || cc->blocked > 0) {
 		d(printf("ahah!  cancellation is blocked\n"));
@@ -362,17 +362,17 @@ camel_operation_cancel_check (CamelOperation *cc)
 	} else if (cc->flags & CAMEL_OPERATION_CANCELLED) {
 		d(printf("previously cancelled\n"));
 		cancelled = TRUE;
-	} else if ((msg = (CamelOperationMsg *)camel_msgport_try_pop(cc->cancel_port))) {
+	} else if ((msg = (CamelOperationMsg *)camel_msgport_try_pop (cc->cancel_port))) {
 		d(printf("Got cancellation message\n"));
 		do {
-			g_free(msg);
-		} while ((msg = (CamelOperationMsg *)camel_msgport_try_pop(cc->cancel_port)));
+			g_free (msg);
+		} while ((msg = (CamelOperationMsg *)camel_msgport_try_pop (cc->cancel_port)));
 		cc->flags |= CAMEL_OPERATION_CANCELLED;
 		cancelled = TRUE;
 	} else
 		cancelled = FALSE;
 
-	UNLOCK();
+	UNLOCK ();
 
 	return cancelled;
 }
@@ -391,17 +391,17 @@ gint
 camel_operation_cancel_fd (CamelOperation *cc)
 {
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL || cc->blocked)
 		return -1;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->cancel_fd == -1)
-		cc->cancel_fd = camel_msgport_fd(cc->cancel_port);
+		cc->cancel_fd = camel_msgport_fd (cc->cancel_port);
 
-	UNLOCK();
+	UNLOCK ();
 
 	return cc->cancel_fd;
 }
@@ -421,17 +421,17 @@ PRFileDesc *
 camel_operation_cancel_prfd (CamelOperation *cc)
 {
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL || cc->blocked)
 		return NULL;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->cancel_prfd == NULL)
-		cc->cancel_prfd = camel_msgport_prfd(cc->cancel_port);
+		cc->cancel_prfd = camel_msgport_prfd (cc->cancel_port);
 
-	UNLOCK();
+	UNLOCK ();
 
 	return cc->cancel_prfd;
 }
@@ -456,33 +456,33 @@ camel_operation_start (CamelOperation *cc, const gchar *what, ...)
 	gpointer status_data;
 
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL)
 		return;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->status == NULL) {
-		UNLOCK();
+		UNLOCK ();
 		return;
 	}
 
-	va_start(ap, what);
-	msg = g_strdup_vprintf(what, ap);
-	va_end(ap);
+	va_start (ap, what);
+	msg = g_strdup_vprintf (what, ap);
+	va_end (ap);
 	cc->status_update = 0;
-	s = g_malloc0(sizeof(*s));
+	s = g_malloc0 (sizeof (*s));
 	s->msg = msg;
 	s->flags = 0;
 	cc->lastreport = s;
-	cc->status_stack = g_slist_prepend(cc->status_stack, s);
+	cc->status_stack = g_slist_prepend (cc->status_stack, s);
 
 	/* This avoids a race with camel_operation_mute() after we unlock. */
 	status_func = cc->status;
 	status_data = cc->status_data;
 
-	UNLOCK();
+	UNLOCK ();
 
 	status_func (cc, msg, CAMEL_OPERATION_START, status_data);
 
@@ -503,15 +503,15 @@ void
 camel_operation_start_transient (CamelOperation *cc, const gchar *what, ...)
 {
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL)
 		return;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->status == NULL) {
-		UNLOCK();
+		UNLOCK ();
 		return;
 	}
 
@@ -521,25 +521,25 @@ camel_operation_start_transient (CamelOperation *cc, const gchar *what, ...)
 		gchar *msg;
 		struct _status_stack *s;
 
-		va_start(ap, what);
-		msg = g_strdup_vprintf(what, ap);
-		va_end(ap);
-		s = g_malloc0(sizeof(*s));
+		va_start (ap, what);
+		msg = g_strdup_vprintf (what, ap);
+		va_end (ap);
+		s = g_malloc0 (sizeof (*s));
 		s->msg = msg;
 		s->flags = CAMEL_OPERATION_TRANSIENT;
-		s->stamp = stamp();
-		cc->status_stack = g_slist_prepend(cc->status_stack, s);
+		s->stamp = stamp ();
+		cc->status_stack = g_slist_prepend (cc->status_stack, s);
 	}
 	d(printf("start '%s'\n", msg, pc));
 
-	UNLOCK();
+	UNLOCK ();
 }
 
-static guint stamp(void)
+static guint stamp (void)
 {
 	GTimeVal tv;
 
-	g_get_current_time(&tv);
+	g_get_current_time (&tv);
 	/* update 4 times/second */
 	return (tv.tv_sec * 4) + tv.tv_usec / (1000000/4);
 }
@@ -566,15 +566,15 @@ camel_operation_progress (CamelOperation *cc, gint pc)
 	gpointer status_data;
 
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL)
 		return;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->status == NULL || cc->status_stack == NULL) {
-		UNLOCK();
+		UNLOCK ();
 		return;
 	}
 
@@ -583,34 +583,34 @@ camel_operation_progress (CamelOperation *cc, gint pc)
 
 	/* Transient messages dont start updating till 4 seconds after
 	   they started, then they update every second */
-	now = stamp();
+	now = stamp ();
 	if (cc->status_update == now) {
-		UNLOCK();
+		UNLOCK ();
 		return;
 	} else if (s->flags & CAMEL_OPERATION_TRANSIENT) {
 		if (s->stamp + CAMEL_OPERATION_TRANSIENT_DELAY > now) {
-			UNLOCK();
+			UNLOCK ();
 			return;
 		} else {
 			cc->status_update = now;
 			cc->lastreport = s;
-			msg = g_strdup(s->msg);
+			msg = g_strdup (s->msg);
 		}
 	} else {
 		s->stamp = cc->status_update = now;
 		cc->lastreport = s;
-		msg = g_strdup(s->msg);
+		msg = g_strdup (s->msg);
 	}
 
 	/* This avoids a race with camel_operation_mute() after we unlock. */
 	status_func = cc->status;
 	status_data = cc->status_data;
 
-	UNLOCK();
+	UNLOCK ();
 
 	status_func (cc, msg, pc, status_data);
 
-	g_free(msg);
+	g_free (msg);
 }
 
 /**
@@ -631,15 +631,15 @@ camel_operation_end (CamelOperation *cc)
 	gpointer status_data;
 
 	if (cc == NULL)
-		cc = co_getcc();
+		cc = co_getcc ();
 
 	if (cc == NULL)
 		return;
 
-	LOCK();
+	LOCK ();
 
 	if (cc->status == NULL || cc->status_stack == NULL) {
-		UNLOCK();
+		UNLOCK ();
 		return;
 	}
 
@@ -647,7 +647,7 @@ camel_operation_end (CamelOperation *cc)
 	 * ended was transient, see if we have any other transient
 	 * messages that haven't been updated yet above us, otherwise,
 	 * re-update as a non-transient at the last reported pc */
-	now = stamp();
+	now = stamp ();
 	s = cc->status_stack->data;
 	if (s->flags & CAMEL_OPERATION_TRANSIENT) {
 		if (cc->lastreport == s) {
@@ -656,13 +656,13 @@ camel_operation_end (CamelOperation *cc)
 				p = l->data;
 				if (p->flags & CAMEL_OPERATION_TRANSIENT) {
 					if (p->stamp + CAMEL_OPERATION_TRANSIENT_DELAY < now) {
-						msg = g_strdup(p->msg);
+						msg = g_strdup (p->msg);
 						pc = p->pc;
 						cc->lastreport = p;
 						break;
 					}
 				} else {
-					msg = g_strdup(p->msg);
+					msg = g_strdup (p->msg);
 					pc = p->pc;
 					cc->lastreport = p;
 					break;
@@ -670,20 +670,20 @@ camel_operation_end (CamelOperation *cc)
 				l = l->next;
 			}
 		}
-		g_free(s->msg);
+		g_free (s->msg);
 	} else {
 		msg = s->msg;
 		pc = CAMEL_OPERATION_END;
 		cc->lastreport = s;
 	}
-	g_free(s);
-	cc->status_stack = g_slist_delete_link(cc->status_stack, cc->status_stack);
+	g_free (s);
+	cc->status_stack = g_slist_delete_link (cc->status_stack, cc->status_stack);
 
 	/* This avoids a race with camel_operation_mute() after we unlock. */
 	status_func = cc->status;
 	status_data = cc->status_data;
 
-	UNLOCK();
+	UNLOCK ();
 
 	if (msg) {
 		status_func (cc, msg, pc, status_data);
diff --git a/camel/camel-operation.h b/camel/camel-operation.h
index 1d05cfb..3bc080a 100644
--- a/camel/camel-operation.h
+++ b/camel/camel-operation.h
@@ -42,29 +42,29 @@ typedef enum _camel_operation_status_t {
 } camel_operation_status_t;
 
 /* main thread functions */
-CamelOperation *camel_operation_new(CamelOperationStatusFunc status, gpointer status_data);
-void camel_operation_mute(CamelOperation *cc);
-void camel_operation_ref(CamelOperation *cc);
-void camel_operation_unref(CamelOperation *cc);
-void camel_operation_cancel(CamelOperation *cc);
-void camel_operation_uncancel(CamelOperation *cc);
+CamelOperation *camel_operation_new (CamelOperationStatusFunc status, gpointer status_data);
+void camel_operation_mute (CamelOperation *cc);
+void camel_operation_ref (CamelOperation *cc);
+void camel_operation_unref (CamelOperation *cc);
+void camel_operation_cancel (CamelOperation *cc);
+void camel_operation_uncancel (CamelOperation *cc);
 /* subthread functions */
-CamelOperation *camel_operation_register(CamelOperation *cc);
+CamelOperation *camel_operation_register (CamelOperation *cc);
 void camel_operation_unregister (CamelOperation *cc);
 
 /* called internally by camel, for the current thread */
-gint camel_operation_cancel_check(CamelOperation *cc);
-gint camel_operation_cancel_fd(CamelOperation *cc);
+gint camel_operation_cancel_check (CamelOperation *cc);
+gint camel_operation_cancel_fd (CamelOperation *cc);
 #ifdef CAMEL_HAVE_NSS
-struct PRFileDesc *camel_operation_cancel_prfd(CamelOperation *cc);
+struct PRFileDesc *camel_operation_cancel_prfd (CamelOperation *cc);
 #endif
 /* return the registered operation for this thread, if there is one */
-CamelOperation *camel_operation_registered(void);
+CamelOperation *camel_operation_registered (void);
 
-void camel_operation_start(CamelOperation *cc, const gchar *what, ...);
-void camel_operation_start_transient(CamelOperation *cc, const gchar *what, ...);
-void camel_operation_progress(CamelOperation *cc, gint pc);
-void camel_operation_end(CamelOperation *cc);
+void camel_operation_start (CamelOperation *cc, const gchar *what, ...);
+void camel_operation_start_transient (CamelOperation *cc, const gchar *what, ...);
+void camel_operation_progress (CamelOperation *cc, gint pc);
+void camel_operation_end (CamelOperation *cc);
 
 G_END_DECLS
 
diff --git a/camel/camel-partition-table.c b/camel/camel-partition-table.c
index b4f34d3..ffd42c3 100644
--- a/camel/camel-partition-table.c
+++ b/camel/camel-partition-table.c
@@ -397,7 +397,7 @@ camel_partition_table_add (CamelPartitionTable *cpi,
 	g_return_val_if_fail (CAMEL_IS_PARTITION_TABLE (cpi), -1);
 	g_return_val_if_fail (key != NULL, -1);
 
-	hashid = hash_key(key);
+	hashid = hash_key (key);
 
 	CAMEL_PARTITION_TABLE_LOCK (cpi, lock);
 	ptblock = find_partition (cpi, hashid, &index);
@@ -471,7 +471,7 @@ camel_partition_table_add (CamelPartitionTable *cpi,
 			/* See if we have room in the partition table for this block or need to split that too */
 			if (ptb->used >= G_N_ELEMENTS (ptb->partition)) {
 				/* TODO: Could check next block to see if it'll fit there first */
-				ptnblock = camel_block_file_new_block(cpi->blocks);
+				ptnblock = camel_block_file_new_block (cpi->blocks);
 				if (ptnblock == NULL) {
 					if (nblock)
 						camel_block_file_unref_block (cpi->blocks, nblock);
@@ -892,7 +892,7 @@ camel_key_table_lookup (CamelKeyTable *ki,
 	blockid =  keyid & (~(CAMEL_BLOCK_SIZE-1));
 	index = keyid & (CAMEL_BLOCK_SIZE-1);
 
-	bl = camel_block_file_get_block(ki->blocks, blockid);
+	bl = camel_block_file_get_block (ki->blocks, blockid);
 	if (bl == NULL)
 		return 0;
 
@@ -929,7 +929,7 @@ camel_key_table_lookup (CamelKeyTable *ki,
 
 /* iterate through all keys */
 camel_key_t
-camel_key_table_next(CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *flagsp, camel_block_t *datap)
+camel_key_table_next (CamelKeyTable *ki, camel_key_t next, gchar **keyp, guint *flagsp, camel_block_t *datap)
 {
 	CamelBlock *bl;
 	CamelKeyBlock *kb;
diff --git a/camel/camel-partition-table.h b/camel/camel-partition-table.h
index 58ec6fb..7fe39a7 100644
--- a/camel/camel-partition-table.h
+++ b/camel/camel-partition-table.h
@@ -91,7 +91,7 @@ struct _CamelPartitionKey {
 
 struct _CamelPartitionKeyBlock {
 	guint32 used;
-	struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE-4)/sizeof(struct _CamelPartitionKey)];
+	struct _CamelPartitionKey keys[(CAMEL_BLOCK_SIZE-4)/sizeof (struct _CamelPartitionKey)];
 };
 
 struct _CamelPartitionMap {
@@ -102,7 +102,7 @@ struct _CamelPartitionMap {
 struct _CamelPartitionMapBlock {
 	camel_block_t next;
 	guint32 used;
-	struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelPartitionMap)];
+	struct _CamelPartitionMap partition[(CAMEL_BLOCK_SIZE-8)/sizeof (struct _CamelPartitionMap)];
 };
 
 struct _CamelPartitionTable {
@@ -163,7 +163,7 @@ struct _CamelKeyBlock {
 	camel_block_t next;
 	guint32 used;
 	union {
-		struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE-8)/sizeof(struct _CamelKeyKey)];
+		struct _CamelKeyKey keys[(CAMEL_BLOCK_SIZE-8)/sizeof (struct _CamelKeyKey)];
 		gchar keydata[CAMEL_BLOCK_SIZE-8];
 	} u;
 };
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index 8b1bd4f..a444d69 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -72,13 +72,13 @@ static GOnce setup_once = G_ONCE_INIT;
 static gpointer
 provider_setup (gpointer param)
 {
-	module_table = g_hash_table_new(camel_strcase_hash, camel_strcase_equal);
-	provider_table = g_hash_table_new(camel_strcase_hash, camel_strcase_equal);
+	module_table = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
+	provider_table = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
 
 	vee_provider.object_types[CAMEL_PROVIDER_STORE] = camel_vee_store_get_type ();
 	vee_provider.url_hash = camel_url_hash;
 	vee_provider.url_equal = camel_url_equal;
-	camel_provider_register(&vee_provider);
+	camel_provider_register (&vee_provider);
 
 	return NULL;
 }
@@ -139,7 +139,7 @@ camel_provider_init (void)
 		p = strrchr (name, '.');
 		strcpy (p, "." G_MODULE_SUFFIX);
 
-		m = g_malloc0(sizeof(*m));
+		m = g_malloc0 (sizeof (*m));
 		m->path = name;
 
 		while ((fgets (buf, sizeof (buf), fp))) {
@@ -149,10 +149,10 @@ camel_provider_init (void)
 				*p = '\0';
 
 			if (*buf) {
-				gchar *protocol = g_strdup(buf);
+				gchar *protocol = g_strdup (buf);
 
-				m->types = g_slist_prepend(m->types, protocol);
-				g_hash_table_insert(module_table, protocol, m);
+				m->types = g_slist_prepend (m->types, protocol);
+				g_hash_table_insert (module_table, protocol, m);
 			}
 		}
 
@@ -221,7 +221,7 @@ camel_provider_load (const gchar *path,
  * Registers a provider.
  **/
 void
-camel_provider_register(CamelProvider *provider)
+camel_provider_register (CamelProvider *provider)
 {
 	gint i;
 	CamelProviderConfEntry *conf;
@@ -229,13 +229,13 @@ camel_provider_register(CamelProvider *provider)
 
 	g_return_if_fail (provider != NULL);
 
-	g_assert(provider_table);
+	g_assert (provider_table);
 
-	LOCK();
+	LOCK ();
 
-	if (g_hash_table_lookup(provider_table, provider->protocol) != NULL) {
+	if (g_hash_table_lookup (provider_table, provider->protocol) != NULL) {
 		g_warning("Trying to re-register camel provider for protocol '%s'", provider->protocol);
-		UNLOCK();
+		UNLOCK ();
 		return;
 	}
 
@@ -271,7 +271,7 @@ camel_provider_register(CamelProvider *provider)
 		provider_table,
 		(gpointer) provider->protocol, provider);
 
-	UNLOCK();
+	UNLOCK ();
 }
 
 static gint
@@ -303,7 +303,7 @@ add_to_list (gpointer key, gpointer value, gpointer user_data)
  * Returns: a GList of providers, which the caller must free.
  **/
 GList *
-camel_provider_list(gboolean load)
+camel_provider_list (gboolean load)
 {
 	GList *list = NULL;
 
@@ -313,29 +313,29 @@ camel_provider_list(gboolean load)
 
 	g_return_val_if_fail (provider_table != NULL, NULL);
 
-	LOCK();
+	LOCK ();
 
 	if (load) {
 		GList *w;
 
-		g_hash_table_foreach(module_table, add_to_list, &list);
+		g_hash_table_foreach (module_table, add_to_list, &list);
 		for (w = list;w;w = w->next) {
 			CamelProviderModule *m = w->data;
 
 			if (!m->loaded) {
-				camel_provider_load(m->path, NULL);
+				camel_provider_load (m->path, NULL);
 				m->loaded = 1;
 			}
 		}
-		g_list_free(list);
+		g_list_free (list);
 		list = NULL;
 	}
 
-	g_hash_table_foreach(provider_table, add_to_list, &list);
+	g_hash_table_foreach (provider_table, add_to_list, &list);
 
-	UNLOCK();
+	UNLOCK ();
 
-	list = g_list_sort(list, provider_compare);
+	list = g_list_sort (list, provider_compare);
 
 	return list;
 }
@@ -362,23 +362,23 @@ camel_provider_get (const gchar *url_string,
 	g_return_val_if_fail (provider_table != NULL, NULL);
 
 	len = strcspn(url_string, ":");
-	protocol = g_alloca(len+1);
-	memcpy(protocol, url_string, len);
+	protocol = g_alloca (len+1);
+	memcpy (protocol, url_string, len);
 	protocol[len] = 0;
 
-	LOCK();
+	LOCK ();
 
-	provider = g_hash_table_lookup(provider_table, protocol);
+	provider = g_hash_table_lookup (provider_table, protocol);
 	if (!provider) {
 		CamelProviderModule *m;
 
-		m = g_hash_table_lookup(module_table, protocol);
+		m = g_hash_table_lookup (module_table, protocol);
 		if (m && !m->loaded) {
 			m->loaded = 1;
 			if (!camel_provider_load (m->path, error))
 				goto fail;
 		}
-		provider = g_hash_table_lookup(provider_table, protocol);
+		provider = g_hash_table_lookup (provider_table, protocol);
 	}
 
 	if (provider == NULL)
@@ -388,7 +388,7 @@ camel_provider_get (const gchar *url_string,
 			_("No provider available for protocol '%s'"),
 			protocol);
 fail:
-	UNLOCK();
+	UNLOCK ();
 
 	return provider;
 }
diff --git a/camel/camel-sasl-digest-md5.c b/camel/camel-sasl-digest-md5.c
index 1ca0dd4..6e806c8 100644
--- a/camel/camel-sasl-digest-md5.c
+++ b/camel/camel-sasl-digest-md5.c
@@ -839,7 +839,7 @@ sasl_digest_md5_challenge (CamelSasl *sasl,
 			return NULL;
 		}
 
-		memset(&hints, 0, sizeof(hints));
+		memset (&hints, 0, sizeof (hints));
 		hints.ai_flags = AI_CANONNAME;
 		ai = camel_getaddrinfo(service->url->host?service->url->host:"localhost", NULL, &hints, NULL);
 		if (ai && ai->ai_canonname)
@@ -851,7 +851,7 @@ sasl_digest_md5_challenge (CamelSasl *sasl,
 						    service->url->user,
 						    service->url->passwd);
 		if (ai)
-			camel_freeaddrinfo(ai);
+			camel_freeaddrinfo (ai);
 		ret = digest_response (priv->response);
 
 		break;
diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index 554e8e8..f736be9 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -265,14 +265,14 @@ sasl_gssapi_challenge (CamelSasl *sasl,
 
 	switch (priv->state) {
 	case GSSAPI_STATE_INIT:
-		memset(&hints, 0, sizeof(hints));
+		memset (&hints, 0, sizeof (hints));
 		hints.ai_flags = AI_CANONNAME;
 		ai = camel_getaddrinfo(service->url->host?service->url->host:"localhost", NULL, &hints, error);
 		if (ai == NULL)
 			return NULL;
 
 		str = g_strdup_printf("%s %s", service_name, ai->ai_canonname);
-		camel_freeaddrinfo(ai);
+		camel_freeaddrinfo (ai);
 
 		inbuf.value = str;
 		inbuf.length = strlen (str);
diff --git a/camel/camel-sasl-ntlm.c b/camel/camel-sasl-ntlm.c
index e35e758..bfa2b1d 100644
--- a/camel/camel-sasl-ntlm.c
+++ b/camel/camel-sasl-ntlm.c
@@ -262,56 +262,56 @@ md4sum (const guchar *in, gint nbytes, guchar digest[16])
 		CC = C;
 		DD = D;
 
-		A = ROT (A + F(B, C, D) + X[0], 3);
-		D = ROT (D + F(A, B, C) + X[1], 7);
-		C = ROT (C + F(D, A, B) + X[2], 11);
-		B = ROT (B + F(C, D, A) + X[3], 19);
-		A = ROT (A + F(B, C, D) + X[4], 3);
-		D = ROT (D + F(A, B, C) + X[5], 7);
-		C = ROT (C + F(D, A, B) + X[6], 11);
-		B = ROT (B + F(C, D, A) + X[7], 19);
-		A = ROT (A + F(B, C, D) + X[8], 3);
-		D = ROT (D + F(A, B, C) + X[9], 7);
-		C = ROT (C + F(D, A, B) + X[10], 11);
-		B = ROT (B + F(C, D, A) + X[11], 19);
-		A = ROT (A + F(B, C, D) + X[12], 3);
-		D = ROT (D + F(A, B, C) + X[13], 7);
-		C = ROT (C + F(D, A, B) + X[14], 11);
-		B = ROT (B + F(C, D, A) + X[15], 19);
-
-		A = ROT (A + G(B, C, D) + X[0] + 0x5A827999, 3);
-		D = ROT (D + G(A, B, C) + X[4] + 0x5A827999, 5);
-		C = ROT (C + G(D, A, B) + X[8] + 0x5A827999, 9);
-		B = ROT (B + G(C, D, A) + X[12] + 0x5A827999, 13);
-		A = ROT (A + G(B, C, D) + X[1] + 0x5A827999, 3);
-		D = ROT (D + G(A, B, C) + X[5] + 0x5A827999, 5);
-		C = ROT (C + G(D, A, B) + X[9] + 0x5A827999, 9);
-		B = ROT (B + G(C, D, A) + X[13] + 0x5A827999, 13);
-		A = ROT (A + G(B, C, D) + X[2] + 0x5A827999, 3);
-		D = ROT (D + G(A, B, C) + X[6] + 0x5A827999, 5);
-		C = ROT (C + G(D, A, B) + X[10] + 0x5A827999, 9);
-		B = ROT (B + G(C, D, A) + X[14] + 0x5A827999, 13);
-		A = ROT (A + G(B, C, D) + X[3] + 0x5A827999, 3);
-		D = ROT (D + G(A, B, C) + X[7] + 0x5A827999, 5);
-		C = ROT (C + G(D, A, B) + X[11] + 0x5A827999, 9);
-		B = ROT (B + G(C, D, A) + X[15] + 0x5A827999, 13);
-
-		A = ROT (A + H(B, C, D) + X[0] + 0x6ED9EBA1, 3);
-		D = ROT (D + H(A, B, C) + X[8] + 0x6ED9EBA1, 9);
-		C = ROT (C + H(D, A, B) + X[4] + 0x6ED9EBA1, 11);
-		B = ROT (B + H(C, D, A) + X[12] + 0x6ED9EBA1, 15);
-		A = ROT (A + H(B, C, D) + X[2] + 0x6ED9EBA1, 3);
-		D = ROT (D + H(A, B, C) + X[10] + 0x6ED9EBA1, 9);
-		C = ROT (C + H(D, A, B) + X[6] + 0x6ED9EBA1, 11);
-		B = ROT (B + H(C, D, A) + X[14] + 0x6ED9EBA1, 15);
-		A = ROT (A + H(B, C, D) + X[1] + 0x6ED9EBA1, 3);
-		D = ROT (D + H(A, B, C) + X[9] + 0x6ED9EBA1, 9);
-		C = ROT (C + H(D, A, B) + X[5] + 0x6ED9EBA1, 11);
-		B = ROT (B + H(C, D, A) + X[13] + 0x6ED9EBA1, 15);
-		A = ROT (A + H(B, C, D) + X[3] + 0x6ED9EBA1, 3);
-		D = ROT (D + H(A, B, C) + X[11] + 0x6ED9EBA1, 9);
-		C = ROT (C + H(D, A, B) + X[7] + 0x6ED9EBA1, 11);
-		B = ROT (B + H(C, D, A) + X[15] + 0x6ED9EBA1, 15);
+		A = ROT (A + F (B, C, D) + X[0], 3);
+		D = ROT (D + F (A, B, C) + X[1], 7);
+		C = ROT (C + F (D, A, B) + X[2], 11);
+		B = ROT (B + F (C, D, A) + X[3], 19);
+		A = ROT (A + F (B, C, D) + X[4], 3);
+		D = ROT (D + F (A, B, C) + X[5], 7);
+		C = ROT (C + F (D, A, B) + X[6], 11);
+		B = ROT (B + F (C, D, A) + X[7], 19);
+		A = ROT (A + F (B, C, D) + X[8], 3);
+		D = ROT (D + F (A, B, C) + X[9], 7);
+		C = ROT (C + F (D, A, B) + X[10], 11);
+		B = ROT (B + F (C, D, A) + X[11], 19);
+		A = ROT (A + F (B, C, D) + X[12], 3);
+		D = ROT (D + F (A, B, C) + X[13], 7);
+		C = ROT (C + F (D, A, B) + X[14], 11);
+		B = ROT (B + F (C, D, A) + X[15], 19);
+
+		A = ROT (A + G (B, C, D) + X[0] + 0x5A827999, 3);
+		D = ROT (D + G (A, B, C) + X[4] + 0x5A827999, 5);
+		C = ROT (C + G (D, A, B) + X[8] + 0x5A827999, 9);
+		B = ROT (B + G (C, D, A) + X[12] + 0x5A827999, 13);
+		A = ROT (A + G (B, C, D) + X[1] + 0x5A827999, 3);
+		D = ROT (D + G (A, B, C) + X[5] + 0x5A827999, 5);
+		C = ROT (C + G (D, A, B) + X[9] + 0x5A827999, 9);
+		B = ROT (B + G (C, D, A) + X[13] + 0x5A827999, 13);
+		A = ROT (A + G (B, C, D) + X[2] + 0x5A827999, 3);
+		D = ROT (D + G (A, B, C) + X[6] + 0x5A827999, 5);
+		C = ROT (C + G (D, A, B) + X[10] + 0x5A827999, 9);
+		B = ROT (B + G (C, D, A) + X[14] + 0x5A827999, 13);
+		A = ROT (A + G (B, C, D) + X[3] + 0x5A827999, 3);
+		D = ROT (D + G (A, B, C) + X[7] + 0x5A827999, 5);
+		C = ROT (C + G (D, A, B) + X[11] + 0x5A827999, 9);
+		B = ROT (B + G (C, D, A) + X[15] + 0x5A827999, 13);
+
+		A = ROT (A + H (B, C, D) + X[0] + 0x6ED9EBA1, 3);
+		D = ROT (D + H (A, B, C) + X[8] + 0x6ED9EBA1, 9);
+		C = ROT (C + H (D, A, B) + X[4] + 0x6ED9EBA1, 11);
+		B = ROT (B + H (C, D, A) + X[12] + 0x6ED9EBA1, 15);
+		A = ROT (A + H (B, C, D) + X[2] + 0x6ED9EBA1, 3);
+		D = ROT (D + H (A, B, C) + X[10] + 0x6ED9EBA1, 9);
+		C = ROT (C + H (D, A, B) + X[6] + 0x6ED9EBA1, 11);
+		B = ROT (B + H (C, D, A) + X[14] + 0x6ED9EBA1, 15);
+		A = ROT (A + H (B, C, D) + X[1] + 0x6ED9EBA1, 3);
+		D = ROT (D + H (A, B, C) + X[9] + 0x6ED9EBA1, 9);
+		C = ROT (C + H (D, A, B) + X[5] + 0x6ED9EBA1, 11);
+		B = ROT (B + H (C, D, A) + X[13] + 0x6ED9EBA1, 15);
+		A = ROT (A + H (B, C, D) + X[3] + 0x6ED9EBA1, 3);
+		D = ROT (D + H (A, B, C) + X[11] + 0x6ED9EBA1, 9);
+		C = ROT (C + H (D, A, B) + X[7] + 0x6ED9EBA1, 11);
+		B = ROT (B + H (C, D, A) + X[15] + 0x6ED9EBA1, 15);
 
 		A += AA;
 		B += BB;
@@ -528,22 +528,22 @@ des (guint32 ks[16][2], guchar block[8])
 	left = (left << 1) | (left >> 31);
 
 	/* Now do the 16 rounds */
-	F(left,right,ks[0]);
-	F(right,left,ks[1]);
-	F(left,right,ks[2]);
-	F(right,left,ks[3]);
-	F(left,right,ks[4]);
-	F(right,left,ks[5]);
-	F(left,right,ks[6]);
-	F(right,left,ks[7]);
-	F(left,right,ks[8]);
-	F(right,left,ks[9]);
-	F(left,right,ks[10]);
-	F(right,left,ks[11]);
-	F(left,right,ks[12]);
-	F(right,left,ks[13]);
-	F(left,right,ks[14]);
-	F(right,left,ks[15]);
+	F (left,right,ks[0]);
+	F (right,left,ks[1]);
+	F (left,right,ks[2]);
+	F (right,left,ks[3]);
+	F (left,right,ks[4]);
+	F (right,left,ks[5]);
+	F (left,right,ks[6]);
+	F (right,left,ks[7]);
+	F (left,right,ks[8]);
+	F (right,left,ks[9]);
+	F (left,right,ks[10]);
+	F (right,left,ks[11]);
+	F (left,right,ks[12]);
+	F (right,left,ks[13]);
+	F (left,right,ks[14]);
+	F (right,left,ks[15]);
 
 	/* Inverse permutation, also from Hoey via Outerbridge and Schneier */
 	right = (right << 31) | (right >> 1);
@@ -634,7 +634,7 @@ deskey (DES_KS k, guchar *key, gint decrypt)
 			? 1 : 0;	/* and store 1-bit result */
 	}
 	for (i=0; i<16; i++) {		/* key chunk for each iteration */
-		memset(ks,0,sizeof(ks));	/* Clear key schedule */
+		memset (ks,0,sizeof (ks));	/* Clear key schedule */
 		for (j=0; j<56; j++)	/* rotate pc1 the right amount */
 			pcr[j] = pc1m[(l=j+totrot[decrypt? 15-i : i])<(j<28? 28 : 56) ? l: l-28];
 			/* rotate left and right halves independently */
diff --git a/camel/camel-sasl-popb4smtp.c b/camel/camel-sasl-popb4smtp.c
index 043291b..870a109 100644
--- a/camel/camel-sasl-popb4smtp.c
+++ b/camel/camel-sasl-popb4smtp.c
@@ -99,26 +99,26 @@ sasl_popb4smtp_challenge (CamelSasl *sasl,
 	}
 
 	/* check if we've done it before recently in this session */
-	now = time(NULL);
+	now = time (NULL);
 
 	/* need to lock around the whole thing until finished with timep */
 
-	POPB4SMTP_LOCK(lock);
-	timep = g_hash_table_lookup(poplast, popuri);
+	POPB4SMTP_LOCK (lock);
+	timep = g_hash_table_lookup (poplast, popuri);
 	if (timep) {
 		if ((*timep + POPB4SMTP_TIMEOUT) > now) {
 			camel_sasl_set_authenticated (sasl, TRUE);
-			POPB4SMTP_UNLOCK(lock);
-			g_free(popuri);
+			POPB4SMTP_UNLOCK (lock);
+			g_free (popuri);
 			return NULL;
 		}
 	} else {
-		timep = g_malloc0(sizeof(*timep));
-		g_hash_table_insert(poplast, g_strdup(popuri), timep);
+		timep = g_malloc0 (sizeof (*timep));
+		g_hash_table_insert (poplast, g_strdup (popuri), timep);
 	}
 
 	/* connect to pop session */
-	store = camel_session_get_store(session, popuri, error);
+	store = camel_session_get_store (session, popuri, error);
 	if (store) {
 		camel_sasl_set_authenticated (sasl, TRUE);
 		g_object_unref (store);
@@ -128,9 +128,9 @@ sasl_popb4smtp_challenge (CamelSasl *sasl,
 		*timep = 0;
 	}
 
-	POPB4SMTP_UNLOCK(lock);
+	POPB4SMTP_UNLOCK (lock);
 
-	g_free(popuri);
+	g_free (popuri);
 
 	return NULL;
 }
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index 2623f21..d4a6c31 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -211,7 +211,7 @@ camel_ustrstrcase (const gchar *haystack, const gchar *needle)
 	puni = nuni = g_alloca (sizeof (gunichar) * strlen (needle));
 
 	p = (const guchar *) needle;
-	while ((u = camel_utf8_getc(&p)))
+	while ((u = camel_utf8_getc (&p)))
 		*puni++ = g_unichar_tolower (u);
 
 	/* NULL means there was illegal utf-8 sequence */
@@ -219,7 +219,7 @@ camel_ustrstrcase (const gchar *haystack, const gchar *needle)
 		return NULL;
 
 	p = (const guchar *)haystack;
-	while ((u = camel_utf8_getc(&p))) {
+	while ((u = camel_utf8_getc (&p))) {
 		gunichar c;
 
 		c = g_unichar_tolower (u);
@@ -229,7 +229,7 @@ camel_ustrstrcase (const gchar *haystack, const gchar *needle)
 			gint npos = 1;
 
 			while (nuni + npos < puni) {
-				u = camel_utf8_getc(&q);
+				u = camel_utf8_getc (&q);
 				if (!q || !u)
 					return NULL;
 
@@ -267,8 +267,8 @@ camel_ustrcasecmp (const gchar *ps1, const gchar *ps2)
 
 	CAMEL_SEARCH_COMPARE (s1, s2, NULL);
 
-	u1 = camel_utf8_getc(&s1);
-	u2 = camel_utf8_getc(&s2);
+	u1 = camel_utf8_getc (&s1);
+	u2 = camel_utf8_getc (&s2);
 	while (u1 && u2) {
 		u1 = g_unichar_tolower (u1);
 		u2 = g_unichar_tolower (u2);
@@ -277,8 +277,8 @@ camel_ustrcasecmp (const gchar *ps1, const gchar *ps2)
 		else if (u1 > u2)
 			return 1;
 
-		u1 = camel_utf8_getc(&s1);
-		u2 = camel_utf8_getc(&s2);
+		u1 = camel_utf8_getc (&s1);
+		u2 = camel_utf8_getc (&s2);
 	}
 
 	/* end of one of the strings ? */
@@ -299,8 +299,8 @@ camel_ustrncasecmp (const gchar *ps1, const gchar *ps2, gsize len)
 
 	CAMEL_SEARCH_COMPARE (s1, s2, NULL);
 
-	u1 = camel_utf8_getc(&s1);
-	u2 = camel_utf8_getc(&s2);
+	u1 = camel_utf8_getc (&s1);
+	u2 = camel_utf8_getc (&s2);
 	while (len > 0 && u1 && u2) {
 		u1 = g_unichar_tolower (u1);
 		u2 = g_unichar_tolower (u2);
@@ -310,8 +310,8 @@ camel_ustrncasecmp (const gchar *ps1, const gchar *ps2, gsize len)
 			return 1;
 
 		len--;
-		u1 = camel_utf8_getc(&s1);
-		u2 = camel_utf8_getc(&s2);
+		u1 = camel_utf8_getc (&s1);
+		u2 = camel_utf8_getc (&s2);
 	}
 
 	if (len == 0)
@@ -328,7 +328,7 @@ camel_ustrncasecmp (const gchar *ps1, const gchar *ps2, gsize len)
 
 /* value is the match value suitable for exact match if required */
 static gint
-header_match(const gchar *value, const gchar *match, camel_search_match_t how)
+header_match (const gchar *value, const gchar *match, camel_search_match_t how)
 {
 	const guchar *p;
 	gint vlen, mlen;
@@ -337,8 +337,8 @@ header_match(const gchar *value, const gchar *match, camel_search_match_t how)
 	if (how == CAMEL_SEARCH_MATCH_SOUNDEX)
 		return header_soundex (value, match);
 
-	vlen = strlen(value);
-	mlen = strlen(match);
+	vlen = strlen (value);
+	mlen = strlen (match);
 	if (vlen < mlen)
 		return FALSE;
 
@@ -346,16 +346,16 @@ header_match(const gchar *value, const gchar *match, camel_search_match_t how)
 	   otherwise not */
 	p = (const guchar *)match;
 	while ((c = camel_utf8_getc (&p))) {
-		if (g_unichar_isupper(c)) {
+		if (g_unichar_isupper (c)) {
 			switch (how) {
 			case CAMEL_SEARCH_MATCH_EXACT:
-				return strcmp(value, match) == 0;
+				return strcmp (value, match) == 0;
 			case CAMEL_SEARCH_MATCH_CONTAINS:
-				return strstr(value, match) != NULL;
+				return strstr (value, match) != NULL;
 			case CAMEL_SEARCH_MATCH_STARTS:
-				return strncmp(value, match, mlen) == 0;
+				return strncmp (value, match, mlen) == 0;
 			case CAMEL_SEARCH_MATCH_ENDS:
-				return strcmp(value + vlen - mlen, match) == 0;
+				return strcmp (value + vlen - mlen, match) == 0;
 			default:
 				break;
 			}
@@ -365,13 +365,13 @@ header_match(const gchar *value, const gchar *match, camel_search_match_t how)
 
 	switch (how) {
 	case CAMEL_SEARCH_MATCH_EXACT:
-		return camel_ustrcasecmp(value, match) == 0;
+		return camel_ustrcasecmp (value, match) == 0;
 	case CAMEL_SEARCH_MATCH_CONTAINS:
-		return camel_ustrstrcase(value, match) != NULL;
+		return camel_ustrstrcase (value, match) != NULL;
 	case CAMEL_SEARCH_MATCH_STARTS:
-		return camel_ustrncasecmp(value, match, mlen) == 0;
+		return camel_ustrncasecmp (value, match, mlen) == 0;
 	case CAMEL_SEARCH_MATCH_ENDS:
-		return camel_ustrcasecmp(value + vlen - mlen, match) == 0;
+		return camel_ustrcasecmp (value + vlen - mlen, match) == 0;
 	default:
 		break;
 	}
@@ -392,52 +392,52 @@ camel_search_header_match (const gchar *value, const gchar *match, camel_search_
 	gunichar c;
 
 	ptr = (const guchar *)value;
-	while ((c = camel_utf8_getc(&ptr)) && g_unichar_isspace(c))
+	while ((c = camel_utf8_getc (&ptr)) && g_unichar_isspace (c))
 		value = (const gchar *)ptr;
 
 	switch (type) {
 	case CAMEL_SEARCH_TYPE_ENCODED:
-		v = camel_header_decode_string(value, default_charset); /* FIXME: Find header charset */
-		truth = header_match(v, match, how);
-		g_free(v);
+		v = camel_header_decode_string (value, default_charset); /* FIXME: Find header charset */
+		truth = header_match (v, match, how);
+		g_free (v);
 		break;
 	case CAMEL_SEARCH_TYPE_MLIST:
 		/* Special mailing list old-version domain hack
 		   If one of the mailing list names doesn't have an @ in it, its old-style, so
 		   only match against the pre-domain part, which should be common */
 
-		vdom = strchr(value, '@');
-		mdom = strchr(match, '@');
+		vdom = strchr (value, '@');
+		mdom = strchr (match, '@');
 		if (mdom == NULL && vdom != NULL) {
-			v = g_alloca(vdom-value+1);
-			memcpy(v, value, vdom-value);
+			v = g_alloca (vdom-value+1);
+			memcpy (v, value, vdom-value);
 			v[vdom-value] = 0;
 			value = (gchar *)v;
 		} else if (mdom != NULL && vdom == NULL) {
-			v = g_alloca(mdom-match+1);
-			memcpy(v, match, mdom-match);
+			v = g_alloca (mdom-match+1);
+			memcpy (v, match, mdom-match);
 			v[mdom-match] = 0;
 			match = (gchar *)v;
 		}
 		/* Falls through */
 	case CAMEL_SEARCH_TYPE_ASIS:
-		truth = header_match(value, match, how);
+		truth = header_match (value, match, how);
 		break;
 	case CAMEL_SEARCH_TYPE_ADDRESS_ENCODED:
 	case CAMEL_SEARCH_TYPE_ADDRESS:
 		/* possible simple case to save some work if we can */
-		if (header_match(value, match, how))
+		if (header_match (value, match, how))
 			return TRUE;
 
 		/* Now we decode any addresses, and try asis matches on name and address parts */
-		cia = camel_internet_address_new();
+		cia = camel_internet_address_new ();
 		if (type == CAMEL_SEARCH_TYPE_ADDRESS_ENCODED)
-			camel_address_decode((CamelAddress *)cia, value);
+			camel_address_decode ((CamelAddress *)cia, value);
 		else
-			camel_address_unformat((CamelAddress *)cia, value);
+			camel_address_unformat ((CamelAddress *)cia, value);
 
-		for (i=0; !truth && camel_internet_address_get(cia, i, &name, &addr);i++)
-			truth = (name && header_match(name, match, how)) || (addr && header_match(addr, match, how));
+		for (i=0; !truth && camel_internet_address_get (cia, i, &name, &addr);i++)
+			truth = (name && header_match (name, match, how)) || (addr && header_match (addr, match, how));
 
 		g_object_unref (cia);
 		break;
@@ -489,84 +489,84 @@ camel_search_message_body_contains (CamelDataWrapper *object, regex_t *pattern)
 }
 
 static void
-output_c(GString *w, guint32 c, gint *type)
+output_c (GString *w, guint32 c, gint *type)
 {
 	gint utf8len;
 	gchar utf8[8];
 
-	if (!g_unichar_isalnum(c))
+	if (!g_unichar_isalnum (c))
 		*type = CAMEL_SEARCH_WORD_COMPLEX | (*type & CAMEL_SEARCH_WORD_8BIT);
 	else
-		c = g_unichar_tolower(c);
+		c = g_unichar_tolower (c);
 
 	if (c > 0x80)
 		*type |= CAMEL_SEARCH_WORD_8BIT;
 
 	/* FIXME: use camel_utf8_putc */
-	utf8len = g_unichar_to_utf8(c, utf8);
+	utf8len = g_unichar_to_utf8 (c, utf8);
 	utf8[utf8len] = 0;
-	g_string_append(w, utf8);
+	g_string_append (w, utf8);
 }
 
 static void
-output_w(GString *w, GPtrArray *list, gint type)
+output_w (GString *w, GPtrArray *list, gint type)
 {
 	struct _camel_search_word *word;
 
 	if (w->len) {
-		word = g_malloc0(sizeof(*word));
-		word->word = g_strdup(w->str);
+		word = g_malloc0 (sizeof (*word));
+		word->word = g_strdup (w->str);
 		word->type = type;
-		g_ptr_array_add(list, word);
-		g_string_truncate(w, 0);
+		g_ptr_array_add (list, word);
+		g_string_truncate (w, 0);
 	}
 }
 
 struct _camel_search_words *
-camel_search_words_split(const guchar *in)
+camel_search_words_split (const guchar *in)
 {
 	gint type = CAMEL_SEARCH_WORD_SIMPLE, all = 0;
 	GString *w;
 	struct _camel_search_words *words;
-	GPtrArray *list = g_ptr_array_new();
+	GPtrArray *list = g_ptr_array_new ();
 	guint32 c;
 	gint inquote = 0;
 
-	words = g_malloc0(sizeof(*words));
+	words = g_malloc0 (sizeof (*words));
 	w = g_string_new("");
 
 	do {
-		c = camel_utf8_getc(&in);
+		c = camel_utf8_getc (&in);
 
 		if (c == 0
 		    || (inquote && c == '"')
-		    || (!inquote && g_unichar_isspace(c))) {
-			output_w(w, list, type);
+		    || (!inquote && g_unichar_isspace (c))) {
+			output_w (w, list, type);
 			all |= type;
 			type = CAMEL_SEARCH_WORD_SIMPLE;
 			inquote = 0;
 		} else {
 			if (c == '\\') {
-				c = camel_utf8_getc(&in);
+				c = camel_utf8_getc (&in);
 				if (c)
-					output_c(w, c, &type);
+					output_c (w, c, &type);
 				else {
-					output_w(w, list, type);
+					output_w (w, list, type);
 					all |= type;
 				}
 			} else if (c == '\"') {
 				inquote = 1;
 			} else {
-				output_c(w, c, &type);
+				output_c (w, c, &type);
 			}
 		}
 	} while (c);
 
-	g_string_free(w, TRUE);
+	g_string_free (w, TRUE);
 	words->len = list->len;
 	words->words = (struct _camel_search_word **)list->pdata;
 	words->type = all;
-	g_ptr_array_free(list, FALSE);
+	g_ptr_array_free (list, FALSE);
 
 	return words;
 }
@@ -574,35 +574,35 @@ camel_search_words_split(const guchar *in)
 /* takes an existing 'words' list, and converts it to another consisting of
    only simple words, with any punctuation etc stripped */
 struct _camel_search_words *
-camel_search_words_simple(struct _camel_search_words *wordin)
+camel_search_words_simple (struct _camel_search_words *wordin)
 {
 	gint i;
 	const guchar *ptr, *start, *last;
 	gint type = CAMEL_SEARCH_WORD_SIMPLE, all = 0;
-	GPtrArray *list = g_ptr_array_new();
+	GPtrArray *list = g_ptr_array_new ();
 	struct _camel_search_word *word;
 	struct _camel_search_words *words;
 	guint32 c;
 
-	words = g_malloc0(sizeof(*words));
+	words = g_malloc0 (sizeof (*words));
 
 	for (i=0;i<wordin->len;i++) {
 		if ((wordin->words[i]->type & CAMEL_SEARCH_WORD_COMPLEX) == 0) {
-			word = g_malloc0(sizeof(*word));
+			word = g_malloc0 (sizeof (*word));
 			word->type = wordin->words[i]->type;
-			word->word = g_strdup(wordin->words[i]->word);
-			g_ptr_array_add(list, word);
+			word->word = g_strdup (wordin->words[i]->word);
+			g_ptr_array_add (list, word);
 		} else {
 			ptr = (const guchar *) wordin->words[i]->word;
 			start = last = ptr;
 			do {
-				c = camel_utf8_getc(&ptr);
-				if (c == 0 || !g_unichar_isalnum(c)) {
+				c = camel_utf8_getc (&ptr);
+				if (c == 0 || !g_unichar_isalnum (c)) {
 					if (last > start) {
-						word = g_malloc0(sizeof(*word));
-						word->word = g_strndup((gchar *) start, last-start);
+						word = g_malloc0 (sizeof (*word));
+						word->word = g_strndup ((gchar *) start, last-start);
 						word->type = type;
-						g_ptr_array_add(list, word);
+						g_ptr_array_add (list, word);
 						all |= type;
 						type = CAMEL_SEARCH_WORD_SIMPLE;
 					}
@@ -618,23 +618,23 @@ camel_search_words_simple(struct _camel_search_words *wordin)
 	words->len = list->len;
 	words->words = (struct _camel_search_word **)list->pdata;
 	words->type = all;
-	g_ptr_array_free(list, FALSE);
+	g_ptr_array_free (list, FALSE);
 
 	return words;
 }
 
 void
-camel_search_words_free(struct _camel_search_words *words)
+camel_search_words_free (struct _camel_search_words *words)
 {
 	gint i;
 
 	for (i=0;i<words->len;i++) {
 		struct _camel_search_word *word = words->words[i];
 
-		g_free(word->word);
-		g_free(word);
+		g_free (word->word);
+		g_free (word);
 	}
-	g_free(words->words);
-	g_free(words);
+	g_free (words->words);
+	g_free (words);
 }
 
diff --git a/camel/camel-search-private.h b/camel/camel-search-private.h
index ae52f45..0962cb1 100644
--- a/camel/camel-search-private.h
+++ b/camel/camel-search-private.h
@@ -57,14 +57,14 @@ typedef enum {
 } camel_search_t;
 
 /* builds a regex that represents a string search */
-gint camel_search_build_match_regex(regex_t *pattern, camel_search_flags_t type, gint argc, struct _ESExpResult **argv, GError **error);
-gboolean camel_search_message_body_contains(CamelDataWrapper *object, regex_t *pattern);
+gint camel_search_build_match_regex (regex_t *pattern, camel_search_flags_t type, gint argc, struct _ESExpResult **argv, GError **error);
+gboolean camel_search_message_body_contains (CamelDataWrapper *object, regex_t *pattern);
 
-gboolean camel_search_header_match(const gchar *value, const gchar *match, camel_search_match_t how, camel_search_t type, const gchar *default_charset);
-gboolean camel_search_camel_header_soundex(const gchar *header, const gchar *match);
+gboolean camel_search_header_match (const gchar *value, const gchar *match, camel_search_match_t how, camel_search_t type, const gchar *default_charset);
+gboolean camel_search_camel_header_soundex (const gchar *header, const gchar *match);
 
 /* TODO: replace with a real search function */
-const gchar *camel_ustrstrcase(const gchar *haystack, const gchar *needle);
+const gchar *camel_ustrstrcase (const gchar *haystack, const gchar *needle);
 
 /* Some crappy utility functions for handling multiple search words */
 typedef enum _camel_search_word_t {
@@ -84,9 +84,9 @@ struct _camel_search_words {
 	struct _camel_search_word **words;
 };
 
-struct _camel_search_words *camel_search_words_split(const guchar *in);
-struct _camel_search_words *camel_search_words_simple(struct _camel_search_words *wordin);
-void camel_search_words_free(struct _camel_search_words *);
+struct _camel_search_words *camel_search_words_split (const guchar *in);
+struct _camel_search_words *camel_search_words_simple (struct _camel_search_words *wordin);
+void camel_search_words_free (struct _camel_search_words *);
 
 G_END_DECLS
 
diff --git a/camel/camel-search-sql-sexp.c b/camel/camel-search-sql-sexp.c
index 86b7352..48335e7 100644
--- a/camel/camel-search-sql-sexp.c
+++ b/camel/camel-search-sql-sexp.c
@@ -69,7 +69,7 @@ get_db_safe_string (const gchar *str)
 	gchar *tmp = camel_db_sqlize_string (str);
 	gchar *ret;
 
-	ret = g_strdup(tmp);
+	ret = g_strdup (tmp);
 	camel_db_free_sqlized_string (tmp);
 
 	return ret;
@@ -78,7 +78,7 @@ get_db_safe_string (const gchar *str)
 /* Configuration of your sexp expression */
 
 static ESExpResult *
-func_and(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_and (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	ESExpResult *r, *r1;
 	GString *string;
@@ -88,7 +88,7 @@ func_and(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 
 	string = g_string_new("( ");
 	for (i = 0; i < argc; i++) {
-		r1 = e_sexp_term_eval(f, argv[i]);
+		r1 = e_sexp_term_eval (f, argv[i]);
 
 		if (r1->type != ESEXP_RES_STRING) {
 			e_sexp_result_free (f, r1);
@@ -99,19 +99,19 @@ func_and(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 		e_sexp_result_free (f, r1);
 	}
 	g_string_append(string, " )");
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
-	if (strlen(string->str) == 4)
+	if (strlen (string->str) == 4)
 		r->value.string = g_strdup("");
 	else
 		r->value.string = string->str;
-	g_string_free(string, FALSE);
+	g_string_free (string, FALSE);
 
 	return r;
 }
 
 static ESExpResult *
-func_or(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_or (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	ESExpResult *r, *r1;
 	GString *string;
@@ -121,7 +121,7 @@ func_or(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 
 	string = g_string_new("( ");
 	for (i = 0; i < argc; i++) {
-		r1 = e_sexp_term_eval(f, argv[i]);
+		r1 = e_sexp_term_eval (f, argv[i]);
 
 		if (r1->type != ESEXP_RES_STRING) {
 			e_sexp_result_free (f, r1);
@@ -132,22 +132,22 @@ func_or(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 	}
 	g_string_append(string, " )");
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = string->str;
-	g_string_free(string, FALSE);
+	g_string_free (string, FALSE);
 	return r;
 }
 
 static ESExpResult *
-func_not(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+func_not (ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	ESExpResult *r=NULL, *r1;
 
 	d(printf("executing not: %d", argc));
-	r1 = e_sexp_term_eval(f, argv[0]);
+	r1 = e_sexp_term_eval (f, argv[0]);
 
 	if (r1->type == ESEXP_RES_STRING) {
-		r = e_sexp_result_new(f, ESEXP_RES_STRING);
+		r = e_sexp_result_new (f, ESEXP_RES_STRING);
 		/* HACK: Fix and handle completed-on better. */
 		if (g_strcmp0 (r1->value.string, "( (usertags LIKE '%completed-on 0%' AND usertags LIKE '%completed-on%') )") == 0)
 			r->value.string = g_strdup ("( (not (usertags LIKE '%completed-on 0%')) AND usertags LIKE '%completed-on%' )");
@@ -162,16 +162,16 @@ func_not(ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 
 /* this should support all arguments ...? */
 static ESExpResult *
-eval_eq(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (argc == 2) {
 		GString *str = g_string_new("( ");
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 
 		if (r1->type == ESEXP_RES_INT)
 			g_string_append_printf(str, "%d", r1->value.number);
@@ -197,17 +197,17 @@ eval_eq(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 				g_string_append_printf(str, "%ld", r2->value.time);
 			else if (r2->type == ESEXP_RES_STRING) {
 				gchar *tmp = g_strdup_printf("%c%s%c", ut ? '%':' ', r2->value.string, ut?'%':' ');
-				gchar *safe = get_db_safe_string(tmp);
+				gchar *safe = get_db_safe_string (tmp);
 				g_string_append_printf(str, "%s", safe);
-				g_free(safe);
-				g_free(tmp);
+				g_free (safe);
+				g_free (tmp);
 			}
 		}
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 		g_string_append (str, " )");
 		r->value.string = str->str;
-		g_string_free(str, FALSE);
+		g_string_free (str, FALSE);
 	} else {
 		r->value.string = g_strdup ("(0)");
 	}
@@ -215,16 +215,16 @@ eval_eq(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 }
 
 static ESExpResult *
-eval_lt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (argc == 2) {
 		GString *str = g_string_new("( ");
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 
 		if (r1->type == ESEXP_RES_INT)
 			g_string_append_printf(str, "%d", r1->value.number);
@@ -242,28 +242,28 @@ eval_lt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 			g_string_append_printf(str, "%ld", r2->value.time);
 		else if (r2->type == ESEXP_RES_STRING)
 			g_string_append_printf(str, "%s", r2->value.string);
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 		g_string_append (str, " )");
 
 		r->value.string = str->str;
-		g_string_free(str, FALSE);
+		g_string_free (str, FALSE);
 	}
 	return r;
 }
 
 /* this should support all arguments ...? */
 static ESExpResult *
-eval_gt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (argc == 2) {
 		GString *str = g_string_new("( ");
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 
 		if (r1->type == ESEXP_RES_INT)
 			g_string_append_printf(str, "%d", r1->value.number);
@@ -281,18 +281,18 @@ eval_gt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 			g_string_append_printf(str, "%ld", r2->value.time);
 		else if (r2->type == ESEXP_RES_STRING)
 			g_string_append_printf(str, "%s", r2->value.string);
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 		g_string_append (str, " )");
 
 		r->value.string = str->str;
-		g_string_free(str, FALSE);
+		g_string_free (str, FALSE);
 	}
 	return r;
 }
 
 static ESExpResult *
-match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+match_all (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	ESExpResult *r;
 
@@ -301,9 +301,9 @@ match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 		r = e_sexp_result_new (f, ESEXP_RES_STRING);
 		r->value.string = g_strdup ("1");
 	} else if (argv[0]->type != ESEXP_TERM_BOOL)
-		r = e_sexp_term_eval(f, argv[0]);
+		r = e_sexp_term_eval (f, argv[0]);
 	else {
-		r = e_sexp_result_new(f, ESEXP_RES_STRING);
+		r = e_sexp_result_new (f, ESEXP_RES_STRING);
 		r->value.string = g_strdup(argv[0]->value.boolean ? "1" : "0");
 	}
 
@@ -312,7 +312,7 @@ match_all(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 }
 
 static ESExpResult *
-match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+match_threads (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	ESExpResult *r;
 	gint i;
@@ -321,15 +321,15 @@ match_threads(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
 	d(printf("executing match-threads: %d", argc));
 
 	for (i=1;i<argc;i++) {
-		r = e_sexp_term_eval(f, argv[i]);
+		r = e_sexp_term_eval (f, argv[i]);
 		g_string_append_printf(str, "%s%s", r->value.string, ((argc>1) && (i != argc-1)) ?  " AND ":"");
-		e_sexp_result_free(f, r);
+		e_sexp_result_free (f, r);
 	}
 
 	g_string_append (str, " )");
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = str->str;
-	g_string_free(str, FALSE);
+	g_string_free (str, FALSE);
 
 	return r;
 }
@@ -374,33 +374,33 @@ check_header (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 					g_free (tstr);
 				}
 				str = g_strdup_printf("(%s IS NOT NULL AND %s LIKE %s)", headername, headername, value);
-				g_free(value);
+				g_free (value);
 			}
 		}
 		g_free (headername);
 	}
 	/* TODO: else, find all matches */
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = str;
 
 	return r;
 }
 
 static ESExpResult *
-header_contains(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	d(printf("executing header-contains: %d", argc));
 
-	return check_header(f, argc, argv, data, CAMEL_SEARCH_MATCH_CONTAINS);
+	return check_header (f, argc, argv, data, CAMEL_SEARCH_MATCH_CONTAINS);
 }
 
 static ESExpResult *
-header_matches(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+header_matches (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	d(printf("executing header-matches: %d", argc));
 
-	return check_header(f, argc, argv, data, CAMEL_SEARCH_MATCH_EXACT);
+	return check_header (f, argc, argv, data, CAMEL_SEARCH_MATCH_EXACT);
 }
 
 static ESExpResult *
@@ -408,7 +408,7 @@ header_starts_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpo
 {
 	d(printf("executing header-starts-with: %d", argc));
 
-	return check_header(f, argc, argv, data, CAMEL_SEARCH_MATCH_STARTS);
+	return check_header (f, argc, argv, data, CAMEL_SEARCH_MATCH_STARTS);
 }
 
 static ESExpResult *
@@ -416,7 +416,7 @@ header_ends_with (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
 {
 	d(printf("executing header-ends-with: %d", argc));
 
-	return check_header(f, argc, argv, data, CAMEL_SEARCH_MATCH_ENDS);
+	return check_header (f, argc, argv, data, CAMEL_SEARCH_MATCH_ENDS);
 }
 
 static ESExpResult *
@@ -428,20 +428,20 @@ header_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	d(printf("executing header-exists: %d", argc));
 
 	headername = camel_db_get_column_name (argv[0]->value.string);
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup_printf ("(%s NOTNULL)", headername);
 	g_free (headername);
 	return r;
 }
 
 static ESExpResult *
-user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+user_tag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 
 	d(printf("executing user-tag: %d", argc));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	/* Hacks no otherway to fix these really :( */
 	if (g_strcmp0 (argv[0]->value.string, "completed-on") == 0)
 		r->value.string = g_strdup_printf("(usertags LIKE '%ccompleted-on 0%c' AND usertags LIKE '%ccompleted-on%c')", '%', '%', '%', '%');
@@ -454,23 +454,23 @@ user_tag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 }
 
 static ESExpResult *
-user_flag(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+user_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 	gchar *tstr, *qstr;
 
 	d(printf("executing user-flag: %d", argc));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (argc != 1) {
 		r->value.string = g_strdup ("(0)");
 	} else {
 		tstr = g_strdup_printf("%s", argv[0]->value.string);
-		qstr = get_db_safe_string(tstr);
-		g_free(tstr);
+		qstr = get_db_safe_string (tstr);
+		g_free (tstr);
 		r->value.string = g_strdup_printf("(labels MATCH %s)", qstr);
-		g_free(qstr);
+		g_free (qstr);
 	}
 
 	return r;
@@ -484,53 +484,53 @@ system_flag (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d
 
 	d(printf("executing system-flag: %d", argc));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 
 	if (argc != 1) {
 		r->value.string = g_strdup ("(0)");
 	} else {
-		tstr = camel_db_get_column_name(argv[0]->value.string);
+		tstr = camel_db_get_column_name (argv[0]->value.string);
 		r->value.string = g_strdup_printf("(%s = 1)", tstr);
-		g_free(tstr);
+		g_free (tstr);
 	}
 
 	return r;
 }
 
 static ESExpResult *
-get_sent_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_sent_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 
 	d(printf("executing get-sent-date\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup("dsent");
 
 	return r;
 }
 
 static ESExpResult *
-get_received_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_received_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 
 	d(printf("executing get-received-date\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup("dreceived");
 
 	return r;
 }
 
 static ESExpResult *
-get_current_date(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+get_current_date (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	ESExpResult *r;
 
 	d(printf("executing get-current-date\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
+	r = e_sexp_result_new (f, ESEXP_RES_INT);
 	r->value.number = time (NULL);
 	return r;
 }
@@ -542,7 +542,7 @@ get_size (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data
 
 	d(printf("executing get-size\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	r->value.string = g_strdup("size");
 
 	return r;
@@ -557,7 +557,7 @@ sql_exp (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 
 	d(printf("executing sql-exp\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	for (i=0;i<argc;i++) {
 		if (argv[i]->type == ESEXP_RES_STRING && argv[i]->value.string)
 			g_string_append (str, argv[i]->value.string);
@@ -614,14 +614,14 @@ camel_sexp_to_sql_sexp (const gchar *sql)
 	gint i;
 	gchar *res;
 
-	sexp = e_sexp_new();
+	sexp = e_sexp_new ();
 
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].immediate)
-			e_sexp_add_ifunction(sexp, 0, symbols[i].name,
+			e_sexp_add_ifunction (sexp, 0, symbols[i].name,
 					     (ESExpIFunc *) symbols[i].func, NULL);
 		else
-			e_sexp_add_function(sexp, 0, symbols[i].name,
+			e_sexp_add_function (sexp, 0, symbols[i].name,
 					    symbols[i].func, NULL);
 	}
 
@@ -634,9 +634,9 @@ camel_sexp_to_sql_sexp (const gchar *sql)
 	if (r->type == ESEXP_RES_STRING) {
 		res = g_strdup (r->value.string);
 	} else
-		g_assert(0);
+		g_assert (0);
 
-	e_sexp_result_free(sexp, r);
+	e_sexp_result_free (sexp, r);
 	e_sexp_unref (sexp);
 	return res;
 }
@@ -756,7 +756,7 @@ gint main ()
 	"(and (match-all (and (not (system-flag \"deleted\")) (not (system-flag \"junk\")))) (and   (or  (match-all list-post.*zypp-devel)  ) ))"
 	};
 
-	for (i=0; i < G_N_ELEMENTS(txt); i++) {
+	for (i=0; i < G_N_ELEMENTS (txt); i++) {
 		gchar *sql = NULL;
 		printf("Q: %s\n\"%c\"\n", txt[i], 40);
 		sql = camel_sexp_to_sql_sexp (txt[i]);
diff --git a/camel/camel-search-sql.c b/camel/camel-search-sql.c
index af98344..1b41915 100644
--- a/camel/camel-search-sql.c
+++ b/camel/camel-search-sql.c
@@ -188,7 +188,7 @@ g_node_dump (GList *l)
 gchar *
 escape_values (gchar *str)
 {
-	gchar *sql = camel_db_sqlize_string (g_strstrip(str));
+	gchar *sql = camel_db_sqlize_string (g_strstrip (str));
 	 gchar *ret = g_strdup (sql);
 
 	 camel_db_free_sqlized_string (sql);
@@ -224,7 +224,7 @@ camel_sexp_to_sql (const gchar *txt)
 	if (!txt || !*txt)
 		return NULL;
 
-	g_scanner_input_text (scanner, txt, strlen(txt));
+	g_scanner_input_text (scanner, txt, strlen (txt));
 	while (!g_scanner_eof (scanner)) {
 		Node *mnode;
 		gint new_level = -1;
@@ -253,7 +253,7 @@ camel_sexp_to_sql (const gchar *txt)
 				gint i;
 				Node *node;
 
-				for (i=0; i < G_N_ELEMENTS(elements); i++) {
+				for (i=0; i < G_N_ELEMENTS (elements); i++) {
 					if (g_ascii_strcasecmp (elements[i].token, token) == 0) {
 
 						if (!*elements[i].exact_token) /* Skip match-all */ {
@@ -311,7 +311,7 @@ camel_sexp_to_sql (const gchar *txt)
 				}
 
 				/* These should be normal tokens */
-				if (i >= G_N_ELEMENTS(elements)) {
+				if (i >= G_N_ELEMENTS (elements)) {
 					Node *pnode = operands->data;
 
 					node = g_new0 (Node, 1);
@@ -368,7 +368,7 @@ camel_sexp_to_sql (const gchar *txt)
 				/* should be the date fns*/
 			/* Colloct all after '+' and append them to one token. Go till you find ')' */
 				token = g_scanner_get_next_token (scanner);
-				while (!g_scanner_eof(scanner) && lvl >=0 ) {
+				while (!g_scanner_eof (scanner) && lvl >=0 ) {
 					if (token == G_TOKEN_RIGHT_PAREN) {
 						d(printf(")\n"));
 						lvl--;
@@ -385,7 +385,7 @@ camel_sexp_to_sql (const gchar *txt)
 					} else {
 						d(printf("str %s\n", scanner->value.v_string));
 						if (g_ascii_strcasecmp (scanner->value.v_string, "get-current-date") == 0) {
-							lval = time(NULL); /* Make this 12:00 am */
+							lval = time (NULL); /* Make this 12:00 am */
 						} else
 							lval = atol (scanner->value.v_string);
 						d(printf("str %d\n", lval));
@@ -399,7 +399,7 @@ camel_sexp_to_sql (const gchar *txt)
 
 			node = g_new0 (Node, 1);
 			node->token = bstr;
-			node->exact_token = g_strdup(bstr);
+			node->exact_token = g_strdup (bstr);
 			node->nodes = pnode->nodes > 0 ? pnode->nodes - 1:0;
 			node->prefix = 0;
 			node->rval = ' ';
@@ -417,7 +417,7 @@ camel_sexp_to_sql (const gchar *txt)
 
 			/* Colloct all after '+' and append them to one token. Go till you find ')' */
 			token = g_scanner_get_next_token (scanner);
-			while (!g_scanner_eof(scanner) && lvl >=0 ) {
+			while (!g_scanner_eof (scanner) && lvl >=0 ) {
 				if (token == G_TOKEN_RIGHT_PAREN) {
 					lvl--;
 					token = g_scanner_get_next_token (scanner);
@@ -432,7 +432,7 @@ camel_sexp_to_sql (const gchar *txt)
 				} else {
 					d(printf("str %s\n", scanner->value.v_string));
 					if (g_ascii_strcasecmp (scanner->value.v_string, "get-current-date") == 0) {
-						lval = time(NULL); /* Make this 12:00 am */
+						lval = time (NULL); /* Make this 12:00 am */
 					} else
 						lval = atol (scanner->value.v_string);
 					d(printf("str %d\n", lval));
@@ -504,18 +504,18 @@ camel_sexp_to_sql (const gchar *txt)
 				n1=NULL; n2=NULL; n3=NULL;
 				tmp = operands;
 				n1 = operands->data;
-				operands = g_list_delete_link(operands, operands);
+				operands = g_list_delete_link (operands, operands);
 				all = g_list_delete_link (all, all);
 				tmp = operands;
 				n2 = operands->data;
-				operands = g_list_delete_link(operands, operands);
+				operands = g_list_delete_link (operands, operands);
 				all = g_list_delete_link (all, all);
 
 				/* If it is a sysnode, then it is double operand */
 				if (!n2->sys_node) {
 					/* This has to be a sysnode if not panic */
 					n3 = operands->data;
-					operands = g_list_delete_link(operands, operands);
+					operands = g_list_delete_link (operands, operands);
 					/* this is a triple operand */
 					len = 3;
 					all = g_list_delete_link (all, all);
@@ -541,8 +541,8 @@ camel_sexp_to_sql (const gchar *txt)
 
 					if (n3->prefix && g_ascii_strcasecmp (opnode->token, "=") == 0) {
 						/* see if '=' was a last operator. if so take care of it */
-						free_node(opnode);
-						free_node(opnode);
+						free_node (opnode);
+						free_node (opnode);
 						all = g_list_delete_link (all, all);
 						operators = g_list_delete_link (operators, operators);
 						opnode = operators->data;
@@ -563,7 +563,7 @@ camel_sexp_to_sql (const gchar *txt)
 							prefix="";
 						} else {
 							/* user tags like important */
-							g_free(n2->exact_token);
+							g_free (n2->exact_token);
 							n2->exact_token = n3->exact_token;
 							n3->exact_token = g_strdup("");
 							temp_op = "LIKE";
@@ -574,8 +574,8 @@ camel_sexp_to_sql (const gchar *txt)
 					}
 					if (n3->prefix && ((g_ascii_strcasecmp (opnode->token, ">") == 0) || (g_ascii_strcasecmp (opnode->token, ">") == 0) )) {
 						/* see if '=' was a last operator. if so take care of it */
-						free_node(opnode);
-						free_node(opnode);
+						free_node (opnode);
+						free_node (opnode);
 						all = g_list_delete_link (all, all);
 						operators = g_list_delete_link (operators, operators);
 						opnode = operators->data;
@@ -596,7 +596,7 @@ camel_sexp_to_sql (const gchar *txt)
 							prefix="";
 						} else {
 							/* user tags like important */
-							g_free(n2->exact_token);
+							g_free (n2->exact_token);
 							n2->exact_token = n3->exact_token;
 							n3->exact_token = g_strdup("");
 							temp_op = "LIKE";
@@ -609,15 +609,15 @@ camel_sexp_to_sql (const gchar *txt)
 					if (n3->prefix && g_ascii_strcasecmp (opnode->token, "not") == 0) {
 						if (!prefix)
 							prefix = "NOT ";
-						free_node(opnode);
-						free_node(opnode);
+						free_node (opnode);
+						free_node (opnode);
 						operators = g_list_delete_link (operators, operators);
 						all = g_list_delete_link (all, all);
 					}
 
 					/* n2 needs to be db specific */
 					sqstr = g_strdup_printf("%c%s%c", n3->pre_token, n1->exact_token, n3->post_token);
-					escstr = escape_values(sqstr);
+					escstr = escape_values (sqstr);
 					str = g_strdup_printf("(%s %s%s %s %s)", n3->ignore_lhs ? "":n2->exact_token, prefix ? prefix : " ", temp_op, n3->exact_token, escstr);
 					/* printf("str %s\n", str); */
 
@@ -630,8 +630,8 @@ camel_sexp_to_sql (const gchar *txt)
 					n3->nodes = (pnode ? pnode->nodes : 0 ) > 0 ? pnode->nodes -1 : 0;
 					n3->level = dyn_lvl;
 					operands = g_list_prepend (operands, n3);
-					free_node (n2); free_node(n1);
-					free_node (n2); free_node(n1);
+					free_node (n2); free_node (n1);
+					free_node (n2); free_node (n1);
 					d(printf("Pushed %s\n", n3->exact_token));
 					all = g_list_prepend (all, n3);
 				} else {
@@ -643,7 +643,7 @@ camel_sexp_to_sql (const gchar *txt)
 					if (n2->prefix && opnode && g_ascii_strcasecmp (opnode->token, "not") == 0) {
 						prefix = '!';
 						dyn_lvl = opnode->level;
-						free_node(opnode); free_node(opnode);
+						free_node (opnode); free_node (opnode);
 						operators = g_list_delete_link (operators, operators);
 						all = g_list_delete_link (all, all);
 						/* g_node_dump (operators); */
@@ -666,8 +666,8 @@ camel_sexp_to_sql (const gchar *txt)
 						str = g_strdup_printf("(%s %c%s %s)", n2->exact_token, prefix ? prefix : ' ', opnode->exact_token, n1->exact_token);
 
 						if (opnode) {
-							free_node(opnode);
-							free_node(opnode);
+							free_node (opnode);
+							free_node (opnode);
 						}
 						if (operators)
 							operators = g_list_delete_link (operators, operators);
@@ -682,10 +682,10 @@ camel_sexp_to_sql (const gchar *txt)
 							str = g_strdup_printf("(%s %c%s %c)", n1->exact_token, prefix ? prefix : ' ', n2->exact_token, n2->rval);
 						} else {
 							str = g_strdup_printf("%c%c%s%c", prefix ? prefix : ' ', n2->pre_token, n1->exact_token, n2->post_token);
-							estr = escape_values(str);
-							g_free(str);
+							estr = escape_values (str);
+							g_free (str);
 							str = g_strdup_printf("(%s %s %c)", n2->exact_token, estr, n2->rval ? n2->rval : ' ');
-							g_free(estr);
+							g_free (estr);
 						}
 					}
 					g_free (n2->exact_token);
@@ -696,8 +696,8 @@ camel_sexp_to_sql (const gchar *txt)
 					n2->level = dyn_lvl;
 					operands = g_list_prepend (operands, n2);
 					d(printf("Pushed %s\n", n2->exact_token));
-					free_node(n1);
-					free_node(n1);
+					free_node (n1);
+					free_node (n1);
 
 					all = g_list_prepend (all, n2);
 				}
@@ -708,24 +708,24 @@ camel_sexp_to_sql (const gchar *txt)
 	}
 
 	tmp = operands;
-	d(g_node_dump (operands));
+	d (g_node_dump (operands));
 	while (tmp) {
-		 free_node(tmp->data);
+		 free_node (tmp->data);
 		 tmp = tmp->next;
 	}
-	d(g_node_dump (operands));
+	d (g_node_dump (operands));
 
 	g_list_free (operands);
 	d(printf("\n\n\n"));
-	d(g_node_dump (operators));
+	d (g_node_dump (operators));
 	tmp = operators;
 	while (tmp) {
-		 free_node(tmp->data);
+		 free_node (tmp->data);
 		 tmp = tmp->next;
 	}
 	g_list_free (operators);
 	d(printf("\n\n\n"));
-	d(g_node_dump (all));
+	d (g_node_dump (all));
 	d(printf("\n\n\n"));
 
 	res=NULL;
@@ -738,9 +738,9 @@ camel_sexp_to_sql (const gchar *txt)
 		n1 = all->data;
 
 		sql = g_strdup (n1->exact_token);
-		free_node(n1);
+		free_node (n1);
 		g_list_free (all);
-		g_scanner_destroy(scanner);
+		g_scanner_destroy (scanner);
 		return sql;
 	}
 
@@ -824,13 +824,13 @@ camel_sexp_to_sql (const gchar *txt)
 				  res = g_list_prepend (res, n1); /* same or less level */
 			  else {
 				if (!preserve)
-					preserve = g_list_reverse(res);
+					preserve = g_list_reverse (res);
 				else {
 					GList *foo;
 					foo = preserve;
 					while (foo->next)
 						foo = foo->next;
-					foo->next = g_list_reverse(res);
+					foo->next = g_list_reverse (res);
 
 				}
 
@@ -868,7 +868,7 @@ camel_sexp_to_sql (const gchar *txt)
 	}
 	g_list_free (all);
 
-	g_scanner_destroy(scanner);
+	g_scanner_destroy (scanner);
 
 	return sql;
 }
@@ -979,7 +979,7 @@ gint main ()
 
 	};
 
-	for (i=0; i < G_N_ELEMENTS(txt); i++) {
+	for (i=0; i < G_N_ELEMENTS (txt); i++) {
 		gchar *sql;
 		printf("Q: %s\n\n", txt[i]);
 		sql = camel_sexp_to_sql (txt[i]);
diff --git a/camel/camel-seekable-stream.h b/camel/camel-seekable-stream.h
index ae49cc4..ad1cc5c 100644
--- a/camel/camel-seekable-stream.h
+++ b/camel/camel-seekable-stream.h
@@ -93,7 +93,7 @@ goffset		camel_seekable_stream_seek	(CamelSeekableStream *stream,
 						 CamelStreamSeekPolicy policy,
 						 GError **error);
 goffset		camel_seekable_stream_tell	(CamelSeekableStream *stream);
-gint		camel_seekable_stream_set_bounds(CamelSeekableStream *stream,
+gint		camel_seekable_stream_set_bounds (CamelSeekableStream *stream,
 						 goffset start,
 						 goffset end,
 						 GError **error);
diff --git a/camel/camel-seekable-substream.c b/camel/camel-seekable-substream.c
index 1bd7188..93685ef 100644
--- a/camel/camel-seekable-substream.c
+++ b/camel/camel-seekable-substream.c
@@ -106,8 +106,8 @@ seekable_substream_write (CamelStream *stream,
                           GError **error)
 {
 	CamelSeekableStream *parent;
-	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM(stream);
-	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM(stream);
+	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
+	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (stream);
 	gssize v;
 
 	if (n == 0)
@@ -160,8 +160,8 @@ seekable_substream_close (CamelStream *stream,
 static gboolean
 seekable_substream_eos (CamelStream *stream)
 {
-	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM(stream);
-	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM(stream);
+	CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (stream);
+	CamelSeekableStream *seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
 	CamelSeekableStream *parent;
 	gboolean eos;
 
@@ -276,7 +276,7 @@ camel_seekable_substream_init (CamelSeekableSubstream *seekable_substream)
  * Returns: the substream
  **/
 CamelStream *
-camel_seekable_substream_new(CamelSeekableStream *parent_stream, goffset start, goffset end)
+camel_seekable_substream_new (CamelSeekableStream *parent_stream, goffset start, goffset end)
 {
 	CamelSeekableSubstream *seekable_substream;
 
diff --git a/camel/camel-seekable-substream.h b/camel/camel-seekable-substream.h
index 3e6e31a..94ad41c 100644
--- a/camel/camel-seekable-substream.h
+++ b/camel/camel-seekable-substream.h
@@ -71,7 +71,7 @@ GType camel_seekable_substream_get_type (void);
 /* public methods */
 
 /* obtain a new seekable substream */
-CamelStream *camel_seekable_substream_new(CamelSeekableStream *parent_stream, goffset start, goffset end);
+CamelStream *camel_seekable_substream_new (CamelSeekableStream *parent_stream, goffset start, goffset end);
 
 G_END_DECLS
 
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 3ccd95d..03d1f2d 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -98,7 +98,7 @@ service_construct (CamelService *service,
 	}
 
 	service->provider = provider;
-	service->url = camel_url_copy(url);
+	service->url = camel_url_copy (url);
 	service->session = g_object_ref (session);
 
 	service->status = CAMEL_SERVICE_DISCONNECTED;
@@ -106,12 +106,12 @@ service_construct (CamelService *service,
 	return TRUE;
 
 fail:
-	url_string = camel_url_to_string(url, CAMEL_URL_HIDE_PASSWORD);
+	url_string = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD);
 	g_set_error (
 		error, CAMEL_SERVICE_ERROR,
 		CAMEL_SERVICE_ERROR_URL_INVALID,
 		err, url_string);
-	g_free(url_string);
+	g_free (url_string);
 
 	return FALSE;
 }
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 16a19ee..47f570e 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -199,7 +199,7 @@ session_get_service (CamelSession *session,
 
 	/* We need to look up the provider so we can then lookup
 	   the service in the provider's cache */
-	provider = camel_provider_get(url->protocol, error);
+	provider = camel_provider_get (url->protocol, error);
 	if (provider && !provider->object_types[type]) {
 		g_set_error (
 			error, CAMEL_SERVICE_ERROR,
@@ -221,15 +221,15 @@ session_get_service (CamelSession *session,
 		camel_url_set_path (url, NULL);
 
 	/* Now look up the service in the provider's cache */
-	service = camel_object_bag_reserve(provider->service_cache[type], url);
+	service = camel_object_bag_reserve (provider->service_cache[type], url);
 	if (service == NULL) {
 		service = g_object_new (provider->object_types[type], NULL);
 		if (!camel_service_construct (service, session, provider, url, error)) {
 			g_object_unref (service);
 			service = NULL;
-			camel_object_bag_abort(provider->service_cache[type], url);
+			camel_object_bag_abort (provider->service_cache[type], url);
 		} else {
-			camel_object_bag_add(provider->service_cache[type], url, service);
+			camel_object_bag_add (provider->service_cache[type], url, service);
 		}
 	}
 
@@ -274,13 +274,13 @@ session_thread_msg_new (CamelSession *session,
 {
 	CamelSessionThreadMsg *m;
 
-	m = g_malloc0(size);
+	m = g_malloc0 (size);
 	m->ops = ops;
 	m->session = g_object_ref (session);
-	m->op = camel_operation_new(cs_thread_status, m);
+	m->op = camel_operation_new (cs_thread_status, m);
 	camel_session_lock (session, CAMEL_SESSION_THREAD_LOCK);
 	m->id = session->priv->thread_id++;
-	g_hash_table_insert(session->priv->thread_active, GINT_TO_POINTER(m->id), m);
+	g_hash_table_insert (session->priv->thread_active, GINT_TO_POINTER (m->id), m);
 	camel_session_unlock (session, CAMEL_SESSION_THREAD_LOCK);
 
 	return m;
@@ -296,18 +296,18 @@ session_thread_msg_free (CamelSession *session,
 	d(printf("free message %p session %p\n", msg, session));
 
 	camel_session_lock (session, CAMEL_SESSION_THREAD_LOCK);
-	g_hash_table_remove(session->priv->thread_active, GINT_TO_POINTER(msg->id));
+	g_hash_table_remove (session->priv->thread_active, GINT_TO_POINTER (msg->id));
 	camel_session_unlock (session, CAMEL_SESSION_THREAD_LOCK);
 
 	d(printf("free msg, ops->free = %p\n", msg->ops->free));
 
 	if (msg->ops->free)
-		msg->ops->free(session, msg);
+		msg->ops->free (session, msg);
 	if (msg->op)
-		camel_operation_unref(msg->op);
+		camel_operation_unref (msg->op);
 	g_clear_error (&msg->error);
 	g_object_unref (msg->session);
-	g_free(msg);
+	g_free (msg);
 }
 
 static void
@@ -317,12 +317,12 @@ session_thread_proxy (CamelSessionThreadMsg *msg,
 	if (msg->ops->receive) {
 		CamelOperation *oldop;
 
-		oldop = camel_operation_register(msg->op);
-		msg->ops->receive(session, msg);
-		camel_operation_register(oldop);
+		oldop = camel_operation_register (msg->op);
+		msg->ops->receive (session, msg);
+		camel_operation_register (oldop);
 	}
 
-	camel_session_thread_msg_free(session, msg);
+	camel_session_thread_msg_free (session, msg);
 }
 
 static gint
@@ -344,7 +344,7 @@ session_thread_queue (CamelSession *session,
 	camel_session_unlock (session, CAMEL_SESSION_THREAD_LOCK);
 
 	id = msg->id;
-	g_thread_pool_push(thread_pool, msg, NULL);
+	g_thread_pool_push (thread_pool, msg, NULL);
 
 	return id;
 }
@@ -358,10 +358,10 @@ session_thread_wait (CamelSession *session,
 	/* we just busy wait, only other alternative is to setup a reply port? */
 	do {
 		camel_session_lock (session, CAMEL_SESSION_THREAD_LOCK);
-		wait = g_hash_table_lookup(session->priv->thread_active, GINT_TO_POINTER(id)) != NULL;
+		wait = g_hash_table_lookup (session->priv->thread_active, GINT_TO_POINTER (id)) != NULL;
 		camel_session_unlock (session, CAMEL_SESSION_THREAD_LOCK);
 		if (wait) {
-			g_usleep(20000);
+			g_usleep (20000);
 		}
 	} while (wait);
 }
@@ -433,10 +433,10 @@ camel_session_init (CamelSession *session)
 {
 	session->priv = CAMEL_SESSION_GET_PRIVATE (session);
 
-	session->priv->lock = g_mutex_new();
-	session->priv->thread_lock = g_mutex_new();
+	session->priv->lock = g_mutex_new ();
+	session->priv->thread_lock = g_mutex_new ();
 	session->priv->thread_id = 1;
-	session->priv->thread_active = g_hash_table_new(NULL, NULL);
+	session->priv->thread_active = g_hash_table_new (NULL, NULL);
 	session->priv->thread_pool = NULL;
 	session->priv->junk_headers = NULL;
 }
@@ -1019,7 +1019,7 @@ camel_session_set_junk_headers (CamelSession *session,
 	session->priv->junk_headers = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
 	for (i=0; i<len; i++) {
-		g_hash_table_insert (session->priv->junk_headers, g_strdup (headers[i]), g_strdup(values[i]));
+		g_hash_table_insert (session->priv->junk_headers, g_strdup (headers[i]), g_strdup (values[i]));
 	}
 }
 
diff --git a/camel/camel-session.h b/camel/camel-session.h
index f5b4617..5b4c032 100644
--- a/camel/camel-session.h
+++ b/camel/camel-session.h
@@ -256,7 +256,7 @@ void		camel_session_set_junk_headers	(CamelSession *session,
 						 const gchar **headers,
 						 const gchar **values,
 						 gint len);
-gboolean	camel_session_lookup_addressbook(CamelSession *session,
+gboolean	camel_session_lookup_addressbook (CamelSession *session,
 						 const gchar *name);
 gboolean	camel_session_forward_to	(CamelSession *session,
 						 CamelFolder *folder,
diff --git a/camel/camel-smime-context.h b/camel/camel-smime-context.h
index 4aed11b..058d48b 100644
--- a/camel/camel-smime-context.h
+++ b/camel/camel-smime-context.h
@@ -32,7 +32,7 @@
 
 /* Standard GObject macros */
 #define CAMEL_TYPE_SMIME_CONTEXT \
-	(camel_smime_context_get_type())
+	(camel_smime_context_get_type ())
 #define CAMEL_SMIME_CONTEXT(obj) \
 	(G_TYPE_CHECK_INSTANCE_CAST \
 	((obj), CAMEL_TYPE_SMIME_CONTEXT, CamelSMIMEContext))
@@ -76,16 +76,16 @@ struct _CamelSMIMEContextClass {
 	CamelCipherContextClass parent_class;
 };
 
-GType camel_smime_context_get_type(void);
+GType camel_smime_context_get_type (void);
 
-CamelCipherContext *camel_smime_context_new(CamelSession *session);
+CamelCipherContext *camel_smime_context_new (CamelSession *session);
 
 /* nick to use for SMIMEEncKeyPrefs attribute for signed data */
-void camel_smime_context_set_encrypt_key(CamelSMIMEContext *context, gboolean use, const gchar *key);
+void camel_smime_context_set_encrypt_key (CamelSMIMEContext *context, gboolean use, const gchar *key);
 /* set signing mode, clearsigned multipart/signed or enveloped */
-void camel_smime_context_set_sign_mode(CamelSMIMEContext *context, camel_smime_sign_t type);
+void camel_smime_context_set_sign_mode (CamelSMIMEContext *context, camel_smime_sign_t type);
 
-guint32 camel_smime_context_describe_part(CamelSMIMEContext *, struct _CamelMimePart *);
+guint32 camel_smime_context_describe_part (CamelSMIMEContext *, struct _CamelMimePart *);
 
 G_END_DECLS
 
diff --git a/camel/camel-store-summary.h b/camel/camel-store-summary.h
index e843ae7..4d9486c 100644
--- a/camel/camel-store-summary.h
+++ b/camel/camel-store-summary.h
@@ -157,49 +157,49 @@ struct _CamelStoreSummaryClass {
 GType			 camel_store_summary_get_type	(void);
 CamelStoreSummary      *camel_store_summary_new	(void);
 
-void camel_store_summary_set_filename(CamelStoreSummary *summary, const gchar *filename);
-void camel_store_summary_set_uri_base(CamelStoreSummary *summary, CamelURL *base);
+void camel_store_summary_set_filename (CamelStoreSummary *summary, const gchar *filename);
+void camel_store_summary_set_uri_base (CamelStoreSummary *summary, CamelURL *base);
 
 /* load/save the summary in its entirety */
-gint camel_store_summary_load(CamelStoreSummary *summary);
-gint camel_store_summary_save(CamelStoreSummary *summary);
+gint camel_store_summary_load (CamelStoreSummary *summary);
+gint camel_store_summary_save (CamelStoreSummary *summary);
 
 /* only load the header */
-gint camel_store_summary_header_load(CamelStoreSummary *summary);
+gint camel_store_summary_header_load (CamelStoreSummary *summary);
 
 /* set the dirty bit on the summary */
-void camel_store_summary_touch(CamelStoreSummary *summary);
+void camel_store_summary_touch (CamelStoreSummary *summary);
 
 /* add a new raw summary item */
-void camel_store_summary_add(CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_add (CamelStoreSummary *summary, CamelStoreInfo *info);
 
 /* build/add raw summary items */
-CamelStoreInfo *camel_store_summary_add_from_path(CamelStoreSummary *summary, const gchar *path);
+CamelStoreInfo *camel_store_summary_add_from_path (CamelStoreSummary *summary, const gchar *path);
 
 /* Just build raw summary items */
-CamelStoreInfo *camel_store_summary_info_new(CamelStoreSummary *summary);
-CamelStoreInfo *camel_store_summary_info_new_from_path(CamelStoreSummary *summary, const gchar *path);
+CamelStoreInfo *camel_store_summary_info_new (CamelStoreSummary *summary);
+CamelStoreInfo *camel_store_summary_info_new_from_path (CamelStoreSummary *summary, const gchar *path);
 
-void camel_store_summary_info_ref(CamelStoreSummary *summary, CamelStoreInfo *info);
-void camel_store_summary_info_free(CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_info_ref (CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_info_free (CamelStoreSummary *summary, CamelStoreInfo *info);
 
 /* removes a summary item */
-void camel_store_summary_remove(CamelStoreSummary *summary, CamelStoreInfo *info);
-void camel_store_summary_remove_path(CamelStoreSummary *summary, const gchar *path);
-void camel_store_summary_remove_index(CamelStoreSummary *summary, gint index);
+void camel_store_summary_remove (CamelStoreSummary *summary, CamelStoreInfo *info);
+void camel_store_summary_remove_path (CamelStoreSummary *summary, const gchar *path);
+void camel_store_summary_remove_index (CamelStoreSummary *summary, gint index);
 
 /* remove all items */
-void camel_store_summary_clear(CamelStoreSummary *summary);
+void camel_store_summary_clear (CamelStoreSummary *summary);
 
 /* lookup functions */
-gint camel_store_summary_count(CamelStoreSummary *summary);
-CamelStoreInfo *camel_store_summary_index(CamelStoreSummary *summary, gint index);
-CamelStoreInfo *camel_store_summary_path(CamelStoreSummary *summary, const gchar *path);
-GPtrArray *camel_store_summary_array(CamelStoreSummary *summary);
-void camel_store_summary_array_free(CamelStoreSummary *summary, GPtrArray *array);
-
-const gchar *camel_store_info_string(CamelStoreSummary *summary, const CamelStoreInfo *info, gint type);
-void camel_store_info_set_string(CamelStoreSummary *summary, CamelStoreInfo *info, gint type, const gchar *value);
+gint camel_store_summary_count (CamelStoreSummary *summary);
+CamelStoreInfo *camel_store_summary_index (CamelStoreSummary *summary, gint index);
+CamelStoreInfo *camel_store_summary_path (CamelStoreSummary *summary, const gchar *path);
+GPtrArray *camel_store_summary_array (CamelStoreSummary *summary);
+void camel_store_summary_array_free (CamelStoreSummary *summary, GPtrArray *array);
+
+const gchar *camel_store_info_string (CamelStoreSummary *summary, const CamelStoreInfo *info, gint type);
+void camel_store_info_set_string (CamelStoreSummary *summary, CamelStoreInfo *info, gint type, const gchar *value);
 
 /* helper macro's */
 #define camel_store_info_path(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_PATH))
diff --git a/camel/camel-store.c b/camel/camel-store.c
index c9c5e73..8faf761 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -88,14 +88,14 @@ store_get_special (CamelStore *store,
 	GPtrArray *folders;
 	gint i;
 
-	folder = camel_vtrash_folder_new(store, type);
-	folders = camel_object_bag_list(store->folders);
+	folder = camel_vtrash_folder_new (store, type);
+	folders = camel_object_bag_list (store->folders);
 	for (i=0;i<folders->len;i++) {
-		if (!CAMEL_IS_VTRASH_FOLDER(folders->pdata[i]))
-			camel_vee_folder_add_folder((CamelVeeFolder *)folder, (CamelFolder *)folders->pdata[i]);
+		if (!CAMEL_IS_VTRASH_FOLDER (folders->pdata[i]))
+			camel_vee_folder_add_folder ((CamelVeeFolder *)folder, (CamelFolder *)folders->pdata[i]);
 		g_object_unref (folders->pdata[i]);
 	}
-	g_ptr_array_free(folders, TRUE);
+	g_ptr_array_free (folders, TRUE);
 
 	return folder;
 }
@@ -150,7 +150,7 @@ store_construct (CamelService *service,
                  GError **error)
 {
 	CamelServiceClass *service_class;
-	CamelStore *store = CAMEL_STORE(service);
+	CamelStore *store = CAMEL_STORE (service);
 	gchar *store_db_path, *store_path = NULL;
 
 	/* Chain up to parent's construct() method. */
@@ -192,7 +192,7 @@ store_construct (CamelService *service,
 		store->cdb_r = camel_db_open (store_db_path, NULL);
 		if (store->cdb_r == NULL) {
 			g_print("Retry with %s failed\n", store_db_path);
-			g_free(store_db_path);
+			g_free (store_db_path);
 			return FALSE;
 		}
 	}
@@ -258,15 +258,15 @@ store_sync (CamelStore *store,
 	/* We don't sync any vFolders, that is used to update certain
 	 * vfolder queries mainly, and we're really only interested in
 	 * storing/expunging the physical mails. */
-	folders = camel_object_bag_list(store->folders);
+	folders = camel_object_bag_list (store->folders);
 	for (i=0;i<folders->len;i++) {
 		folder = folders->pdata[i];
-		if (!CAMEL_IS_VEE_FOLDER(folder)
+		if (!CAMEL_IS_VEE_FOLDER (folder)
 		    && local_error == NULL) {
-			camel_folder_sync(folder, expunge, &local_error);
+			camel_folder_sync (folder, expunge, &local_error);
 			ignore_no_such_table_exception (&local_error);
-		} else if (CAMEL_IS_VEE_FOLDER(folder))
-			camel_vee_folder_sync_headers(folder, NULL); /* Literally don't care of vfolder exceptions */
+		} else if (CAMEL_IS_VEE_FOLDER (folder))
+			camel_vee_folder_sync_headers (folder, NULL); /* Literally don't care of vfolder exceptions */
 		g_object_unref (folder);
 	}
 
@@ -437,7 +437,7 @@ camel_store_get_folder (CamelStore *store,
 
 	if (store->folders) {
 		/* Try cache first. */
-		folder = camel_object_bag_reserve(store->folders, folder_name);
+		folder = camel_object_bag_reserve (store->folders, folder_name);
 		if (folder && (flags & CAMEL_STORE_FOLDER_EXCL)) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -452,41 +452,41 @@ camel_store_get_folder (CamelStore *store,
 	if (!folder) {
 
 		if (flags & CAMEL_STORE_IS_MIGRATING) {
-				if ((store->flags & CAMEL_STORE_VTRASH) && strcmp(folder_name, CAMEL_VTRASH_NAME) == 0) {
+				if ((store->flags & CAMEL_STORE_VTRASH) && strcmp (folder_name, CAMEL_VTRASH_NAME) == 0) {
 						if (store->folders)
-								camel_object_bag_abort(store->folders, folder_name);
+								camel_object_bag_abort (store->folders, folder_name);
 						return NULL;
 				}
 
-				if ((store->flags & CAMEL_STORE_VJUNK) && strcmp(folder_name, CAMEL_VJUNK_NAME) == 0) {
+				if ((store->flags & CAMEL_STORE_VJUNK) && strcmp (folder_name, CAMEL_VJUNK_NAME) == 0) {
 						if (store->folders)
-								camel_object_bag_abort(store->folders, folder_name);
+								camel_object_bag_abort (store->folders, folder_name);
 						return NULL;
 				}
 		}
 
-		if ((store->flags & CAMEL_STORE_VTRASH) && strcmp(folder_name, CAMEL_VTRASH_NAME) == 0) {
-			folder = class->get_trash(store, error);
+		if ((store->flags & CAMEL_STORE_VTRASH) && strcmp (folder_name, CAMEL_VTRASH_NAME) == 0) {
+			folder = class->get_trash (store, error);
 			CAMEL_CHECK_GERROR (store, get_trash, folder != NULL, error);
-		} else if ((store->flags & CAMEL_STORE_VJUNK) && strcmp(folder_name, CAMEL_VJUNK_NAME) == 0) {
-			folder = class->get_junk(store, error);
+		} else if ((store->flags & CAMEL_STORE_VJUNK) && strcmp (folder_name, CAMEL_VJUNK_NAME) == 0) {
+			folder = class->get_junk (store, error);
 			CAMEL_CHECK_GERROR (store, get_junk, folder != NULL, error);
 		} else {
-			folder = class->get_folder(store, folder_name, flags, error);
+			folder = class->get_folder (store, folder_name, flags, error);
 			CAMEL_CHECK_GERROR (store, get_folder, folder != NULL, error);
 
 			if (folder) {
 				CamelVeeFolder *vfolder;
 
 				if ((store->flags & CAMEL_STORE_VTRASH)
-				    && (vfolder = camel_object_bag_get(store->folders, CAMEL_VTRASH_NAME))) {
-					camel_vee_folder_add_folder(vfolder, folder);
+				    && (vfolder = camel_object_bag_get (store->folders, CAMEL_VTRASH_NAME))) {
+					camel_vee_folder_add_folder (vfolder, folder);
 					g_object_unref (vfolder);
 				}
 
 				if ((store->flags & CAMEL_STORE_VJUNK)
-				    && (vfolder = camel_object_bag_get(store->folders, CAMEL_VJUNK_NAME))) {
-					camel_vee_folder_add_folder(vfolder, folder);
+				    && (vfolder = camel_object_bag_get (store->folders, CAMEL_VJUNK_NAME))) {
+					camel_vee_folder_add_folder (vfolder, folder);
 					g_object_unref (vfolder);
 				}
 			}
@@ -494,9 +494,9 @@ camel_store_get_folder (CamelStore *store,
 
 		if (store->folders) {
 			if (folder)
-				camel_object_bag_add(store->folders, folder_name, folder);
+				camel_object_bag_add (store->folders, folder_name, folder);
 			else
-				camel_object_bag_abort(store->folders, folder_name);
+				camel_object_bag_abort (store->folders, folder_name);
 		}
 
 		if (folder)
@@ -535,8 +535,8 @@ camel_store_create_folder (CamelStore *store,
 	g_return_val_if_fail (class->create_folder != NULL, NULL);
 
 	if ((parent_name == NULL || parent_name[0] == 0)
-	    && (((store->flags & CAMEL_STORE_VTRASH) && strcmp(folder_name, CAMEL_VTRASH_NAME) == 0)
-		|| ((store->flags & CAMEL_STORE_VJUNK) && strcmp(folder_name, CAMEL_VJUNK_NAME) == 0))) {
+	    && (((store->flags & CAMEL_STORE_VTRASH) && strcmp (folder_name, CAMEL_VTRASH_NAME) == 0)
+		|| ((store->flags & CAMEL_STORE_VJUNK) && strcmp (folder_name, CAMEL_VJUNK_NAME) == 0))) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_INVALID,
@@ -555,29 +555,29 @@ camel_store_create_folder (CamelStore *store,
 
 /* deletes folder/removes it from the folder cache, if it's there */
 static void
-cs_delete_cached_folder(CamelStore *store, const gchar *folder_name)
+cs_delete_cached_folder (CamelStore *store, const gchar *folder_name)
 {
 	CamelFolder *folder;
 
 	if (store->folders
-	    && (folder = camel_object_bag_get(store->folders, folder_name))) {
+	    && (folder = camel_object_bag_get (store->folders, folder_name))) {
 		CamelVeeFolder *vfolder;
 
 		if ((store->flags & CAMEL_STORE_VTRASH)
-		    && (vfolder = camel_object_bag_get(store->folders, CAMEL_VTRASH_NAME))) {
-			camel_vee_folder_remove_folder(vfolder, folder);
+		    && (vfolder = camel_object_bag_get (store->folders, CAMEL_VTRASH_NAME))) {
+			camel_vee_folder_remove_folder (vfolder, folder);
 			g_object_unref (vfolder);
 		}
 
 		if ((store->flags & CAMEL_STORE_VJUNK)
-		    && (vfolder = camel_object_bag_get(store->folders, CAMEL_VJUNK_NAME))) {
-			camel_vee_folder_remove_folder(vfolder, folder);
+		    && (vfolder = camel_object_bag_get (store->folders, CAMEL_VJUNK_NAME))) {
+			camel_vee_folder_remove_folder (vfolder, folder);
 			g_object_unref (vfolder);
 		}
 
-		camel_folder_delete(folder);
+		camel_folder_delete (folder);
 
-		camel_object_bag_remove(store->folders, folder);
+		camel_object_bag_remove (store->folders, folder);
 		g_object_unref (folder);
 	}
 }
@@ -608,8 +608,8 @@ camel_store_delete_folder (CamelStore *store,
 	g_return_val_if_fail (class->delete_folder != NULL, FALSE);
 
 	/* TODO: should probably be a parameter/bit on the storeinfo */
-	if (((store->flags & CAMEL_STORE_VTRASH) && strcmp(folder_name, CAMEL_VTRASH_NAME) == 0)
-	    || ((store->flags & CAMEL_STORE_VJUNK) && strcmp(folder_name, CAMEL_VJUNK_NAME) == 0)) {
+	if (((store->flags & CAMEL_STORE_VTRASH) && strcmp (folder_name, CAMEL_VTRASH_NAME) == 0)
+	    || ((store->flags & CAMEL_STORE_VJUNK) && strcmp (folder_name, CAMEL_VJUNK_NAME) == 0)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -629,7 +629,7 @@ camel_store_delete_folder (CamelStore *store,
 		g_clear_error (&local_error);
 
 	if (local_error == NULL)
-		cs_delete_cached_folder(store, folder_name);
+		cs_delete_cached_folder (store, folder_name);
 	else
 		g_propagate_error (error, local_error);
 
@@ -669,11 +669,11 @@ camel_store_rename_folder (CamelStore *store,
 	class = CAMEL_STORE_GET_CLASS (store);
 	g_return_val_if_fail (class->rename_folder != NULL, FALSE);
 
-	if (strcmp(old_namein, new_name) == 0)
+	if (strcmp (old_namein, new_name) == 0)
 		return TRUE;
 
-	if (((store->flags & CAMEL_STORE_VTRASH) && strcmp(old_namein, CAMEL_VTRASH_NAME) == 0)
-	    || ((store->flags & CAMEL_STORE_VJUNK) && strcmp(old_namein, CAMEL_VJUNK_NAME) == 0)) {
+	if (((store->flags & CAMEL_STORE_VTRASH) && strcmp (old_namein, CAMEL_VTRASH_NAME) == 0)
+	    || ((store->flags & CAMEL_STORE_VJUNK) && strcmp (old_namein, CAMEL_VJUNK_NAME) == 0)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -683,15 +683,15 @@ camel_store_rename_folder (CamelStore *store,
 	}
 
 	/* need to save this, since old_namein might be folder->full_name, which could go away */
-	old_name = g_strdup(old_namein);
-	oldlen = strlen(old_name);
+	old_name = g_strdup (old_namein);
+	oldlen = strlen (old_name);
 
 	camel_store_lock (store, CAMEL_STORE_FOLDER_LOCK);
 
 	/* If the folder is open (or any subfolders of the open folder)
 	   We need to rename them atomically with renaming the actual folder path */
 	if (store->folders) {
-		folders = camel_object_bag_list(store->folders);
+		folders = camel_object_bag_list (store->folders);
 		for (i=0;i<folders->len;i++) {
 			const gchar *full_name;
 
@@ -706,7 +706,7 @@ camel_store_rename_folder (CamelStore *store,
 				&& full_name[oldlen] == '/')) {
 				camel_folder_lock (folder, CAMEL_FOLDER_REC_LOCK);
 			} else {
-				g_ptr_array_remove_index_fast(folders, i);
+				g_ptr_array_remove_index_fast (folders, i);
 				i--;
 				g_object_unref (folder);
 			}
@@ -731,9 +731,9 @@ camel_store_rename_folder (CamelStore *store,
 				full_name = camel_folder_get_full_name (folder);
 
 				new = g_strdup_printf("%s%s", new_name, full_name + strlen(old_name));
-				camel_object_bag_rekey(store->folders, folder, new);
-				camel_folder_rename(folder, new);
-				g_free(new);
+				camel_object_bag_rekey (store->folders, folder, new);
+				camel_folder_rename (folder, new);
+				g_free (new);
 
 				camel_folder_unlock (folder, CAMEL_FOLDER_REC_LOCK);
 				g_object_unref (folder);
@@ -743,7 +743,7 @@ camel_store_rename_folder (CamelStore *store,
 			if (store->flags & CAMEL_STORE_SUBSCRIPTIONS)
 				flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
 
-			folder_info = class->get_folder_info(store, new_name, flags, error);
+			folder_info = class->get_folder_info (store, new_name, flags, error);
 			CAMEL_CHECK_GERROR (store, get_folder_info, folder_info != NULL, error);
 
 			if (folder_info != NULL) {
@@ -762,8 +762,8 @@ camel_store_rename_folder (CamelStore *store,
 
 	camel_store_unlock (store, CAMEL_STORE_FOLDER_LOCK);
 
-	g_ptr_array_free(folders, TRUE);
-	g_free(old_name);
+	g_ptr_array_free (folders, TRUE);
+	g_free (old_name);
 
 	return success;
 }
@@ -1040,7 +1040,7 @@ add_special_info (CamelStore *store,
 		/* There wasn't a Trash/Junk folder so create a new folder entry */
 		vinfo = camel_folder_info_new ();
 
-		g_assert(parent != NULL);
+		g_assert (parent != NULL);
 
 		vinfo->flags |= CAMEL_FOLDER_NOINFERIORS | CAMEL_FOLDER_SUBSCRIBED;
 
@@ -1063,15 +1063,15 @@ dump_fi (CamelFolderInfo *fi, gint depth)
 {
 	gchar *s;
 
-	s = g_alloca(depth+1);
-	memset(s, ' ', depth);
+	s = g_alloca (depth+1);
+	memset (s, ' ', depth);
 	s[depth] = 0;
 
 	while (fi) {
 		printf("%suri: %s\n", s, fi->uri);
 		printf("%sfull_name: %s\n", s, fi->full_name);
 		printf("%sflags: %08x\n", s, fi->flags);
-		dump_fi(fi->child, depth+2);
+		dump_fi (fi->child, depth+2);
 		fi = fi->next;
 	}
 }
@@ -1133,11 +1133,11 @@ camel_store_get_folder_info (CamelStore *store,
 	}
 
 	if (camel_debug_start("store:folder_info")) {
-		gchar *url = camel_url_to_string(((CamelService *)store)->url, CAMEL_URL_HIDE_ALL);
+		gchar *url = camel_url_to_string (((CamelService *)store)->url, CAMEL_URL_HIDE_ALL);
 		printf("Get folder info(%p:%s, '%s') =\n", (gpointer) store, url, top?top:"<null>");
-		g_free(url);
-		dump_fi(info, 2);
-		camel_debug_end();
+		g_free (url);
+		dump_fi (info, 2);
+		camel_debug_end ();
 	}
 
 	return info;
@@ -1288,9 +1288,9 @@ camel_folder_info_build (GPtrArray *folders,
 	for (i = 0; i < folders->len; i++) {
 		fi = folders->pdata[i];
 		if (!strncmp (namespace, fi->full_name, nlen)
-		    && (p = strrchr(fi->full_name+nlen, separator))) {
-			pname = g_strndup(fi->full_name, p - fi->full_name);
-			pfi = g_hash_table_lookup(hash, pname);
+		    && (p = strrchr (fi->full_name+nlen, separator))) {
+			pname = g_strndup (fi->full_name, p - fi->full_name);
+			pfi = g_hash_table_lookup (hash, pname);
 			if (pfi) {
 				g_free (pname);
 			} else {
@@ -1373,19 +1373,19 @@ folder_info_clone_rec (CamelFolderInfo *fi,
 
 	info = camel_folder_info_new ();
 	info->parent = parent;
-	info->uri = g_strdup(fi->uri);
-	info->name = g_strdup(fi->name);
-	info->full_name = g_strdup(fi->full_name);
+	info->uri = g_strdup (fi->uri);
+	info->name = g_strdup (fi->name);
+	info->full_name = g_strdup (fi->full_name);
 	info->unread = fi->unread;
 	info->flags = fi->flags;
 
 	if (fi->next)
-		info->next = folder_info_clone_rec(fi->next, parent);
+		info->next = folder_info_clone_rec (fi->next, parent);
 	else
 		info->next = NULL;
 
 	if (fi->child)
-		info->child = folder_info_clone_rec(fi->child, info);
+		info->child = folder_info_clone_rec (fi->child, info);
 	else
 		info->child = NULL;
 
@@ -1406,7 +1406,7 @@ camel_folder_info_clone (CamelFolderInfo *fi)
 	if (fi == NULL)
 		return NULL;
 
-	return folder_info_clone_rec(fi, NULL);
+	return folder_info_clone_rec (fi, NULL);
 }
 
 /**
diff --git a/camel/camel-store.h b/camel/camel-store.h
index 5f56e2b..2ad2c9d 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -331,7 +331,7 @@ void		camel_store_free_folder_info	(CamelStore *store,
 void		camel_store_free_folder_info_full
 						(CamelStore *store,
 						 CamelFolderInfo *fi);
-void		camel_store_free_folder_info_nop(CamelStore *store,
+void		camel_store_free_folder_info_nop (CamelStore *store,
 						 CamelFolderInfo *fi);
 CamelFolderInfo *
 		camel_folder_info_new		(void);
@@ -347,7 +347,7 @@ CamelFolderInfo *
 		camel_folder_info_clone		(CamelFolderInfo *fi);
 gboolean	camel_store_supports_subscriptions
 						(CamelStore *store);
-gboolean	camel_store_folder_is_subscribed(CamelStore *store,
+gboolean	camel_store_folder_is_subscribed (CamelStore *store,
 						 const gchar *folder_name);
 gboolean	camel_store_subscribe_folder	(CamelStore *store,
 						 const gchar *folder_name,
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
index c33ab03..7448fe4 100644
--- a/camel/camel-stream-buffer.c
+++ b/camel/camel-stream-buffer.c
@@ -160,7 +160,7 @@ stream_buffer_read (CamelStream *stream,
 		bytes_left = priv->end - priv->ptr;
 		if (bytes_left < n) {
 			if (bytes_left > 0) {
-				memcpy(bptr, priv->ptr, bytes_left);
+				memcpy (bptr, priv->ptr, bytes_left);
 				n -= bytes_left;
 				bptr += bytes_left;
 				priv->ptr += bytes_left;
@@ -181,14 +181,14 @@ stream_buffer_read (CamelStream *stream,
 					gsize bytes_used = bytes_read > n ? n : bytes_read;
 					priv->ptr = priv->buf;
 					priv->end = priv->buf+bytes_read;
-					memcpy(bptr, priv->ptr, bytes_used);
+					memcpy (bptr, priv->ptr, bytes_used);
 					priv->ptr += bytes_used;
 					bptr += bytes_used;
 					n -= bytes_used;
 				}
 			}
 		} else {
-			memcpy(bptr, priv->ptr, n);
+			memcpy (bptr, priv->ptr, n);
 			priv->ptr += n;
 			bptr += n;
 			n = 0;
@@ -228,9 +228,9 @@ stream_buffer_write (CamelStream *stream,
 
 	/* first, copy as much as we can */
 	left = priv->size - (priv->ptr - priv->buf);
-	todo = MIN(left, n);
+	todo = MIN (left, n);
 
-	memcpy(priv->ptr, buffer, todo);
+	memcpy (priv->ptr, buffer, todo);
 	n -= todo;
 	buffer += todo;
 	priv->ptr += todo;
@@ -252,7 +252,7 @@ stream_buffer_write (CamelStream *stream,
 				priv->stream, buffer, n, error) == -1)
 				return -1;
 		} else {
-			memcpy(priv->ptr, buffer, n);
+			memcpy (priv->ptr, buffer, n);
 			priv->ptr += n;
 		}
 	}
@@ -304,7 +304,7 @@ stream_buffer_eos (CamelStream *stream)
 
 	priv = CAMEL_STREAM_BUFFER_GET_PRIVATE (stream);
 
-	return camel_stream_eos(priv->stream) && priv->ptr == priv->end;
+	return camel_stream_eos (priv->stream) && priv->ptr == priv->end;
 }
 
 static void
@@ -364,7 +364,7 @@ camel_stream_buffer_init (CamelStreamBuffer *stream)
 
 	stream->priv->flags = 0;
 	stream->priv->size = BUF_SIZE;
-	stream->priv->buf = g_malloc(BUF_SIZE);
+	stream->priv->buf = g_malloc (BUF_SIZE);
 	stream->priv->ptr = stream->priv->buf;
 	stream->priv->end = stream->priv->buf;
 	stream->priv->mode =
diff --git a/camel/camel-stream-filter.c b/camel/camel-stream-filter.c
index ca8e59f..e282323 100644
--- a/camel/camel-stream-filter.c
+++ b/camel/camel-stream-filter.c
@@ -102,7 +102,7 @@ stream_filter_read (CamelStream *stream,
 
 	priv->last_was_read = TRUE;
 
-	g_check(priv->realbuffer);
+	g_check (priv->realbuffer);
 
 	if (priv->filteredlen<=0) {
 		gsize presize = READ_PAD;
@@ -111,7 +111,7 @@ stream_filter_read (CamelStream *stream,
 			priv->source, priv->buffer, READ_SIZE, error);
 		if (size <= 0) {
 			/* this is somewhat untested */
-			if (camel_stream_eos(priv->source)) {
+			if (camel_stream_eos (priv->source)) {
 				f = priv->filters;
 				priv->filtered = priv->buffer;
 				priv->filteredlen = 0;
@@ -119,7 +119,7 @@ stream_filter_read (CamelStream *stream,
 					camel_mime_filter_complete (
 						f->filter, priv->filtered, priv->filteredlen,
 						presize, &priv->filtered, &priv->filteredlen, &presize);
-					g_check(priv->realbuffer);
+					g_check (priv->realbuffer);
 					f = f->next;
 				}
 				size = priv->filteredlen;
@@ -133,17 +133,17 @@ stream_filter_read (CamelStream *stream,
 			priv->filteredlen = size;
 
 			d(printf ("\n\nOriginal content (%s): '", ((CamelObject *)priv->source)->class->name));
-			d(fwrite(priv->filtered, sizeof(gchar), priv->filteredlen, stdout));
+			d (fwrite (priv->filtered, sizeof (gchar), priv->filteredlen, stdout));
 			d(printf("'\n"));
 
 			while (f) {
 				camel_mime_filter_filter (
 					f->filter, priv->filtered, priv->filteredlen, presize,
 					&priv->filtered, &priv->filteredlen, &presize);
-				g_check(priv->realbuffer);
+				g_check (priv->realbuffer);
 
 				d(printf ("Filtered content (%s): '", ((CamelObject *)f->filter)->class->name));
-				d(fwrite(priv->filtered, sizeof(gchar), priv->filteredlen, stdout));
+				d (fwrite (priv->filtered, sizeof (gchar), priv->filteredlen, stdout));
 				d(printf("'\n"));
 
 				f = f->next;
@@ -151,12 +151,12 @@ stream_filter_read (CamelStream *stream,
 		}
 	}
 
-	size = MIN(n, priv->filteredlen);
-	memcpy(buffer, priv->filtered, size);
+	size = MIN (n, priv->filteredlen);
+	memcpy (buffer, priv->filtered, size);
 	priv->filteredlen -= size;
 	priv->filtered += size;
 
-	g_check(priv->realbuffer);
+	g_check (priv->realbuffer);
 
 	return size;
 }
@@ -180,28 +180,28 @@ stream_filter_write (CamelStream *stream,
 	priv->last_was_read = FALSE;
 
 	d(printf ("\n\nWriting: Original content (%s): '", ((CamelObject *)priv->source)->class->name));
-	d(fwrite(buf, sizeof(gchar), n, stdout));
+	d (fwrite (buf, sizeof (gchar), n, stdout));
 	d(printf("'\n"));
 
-	g_check(priv->realbuffer);
+	g_check (priv->realbuffer);
 
 	while (left) {
 		/* Sigh, since filters expect non const args, copy the input first, we do this in handy sized chunks */
-		len = MIN(READ_SIZE, left);
+		len = MIN (READ_SIZE, left);
 		buffer = realbuffer + READ_PAD;
-		memcpy(buffer, buf, len);
+		memcpy (buffer, buf, len);
 		buf += len;
 		left -= len;
 
 		f = priv->filters;
 		presize = READ_PAD;
 		while (f) {
-			camel_mime_filter_filter(f->filter, buffer, len, presize, &buffer, &len, &presize);
+			camel_mime_filter_filter (f->filter, buffer, len, presize, &buffer, &len, &presize);
 
-			g_check(priv->realbuffer);
+			g_check (priv->realbuffer);
 
 			d(printf ("Filtered content (%s): '", ((CamelObject *)f->filter)->class->name));
-			d(fwrite(buffer, sizeof(gchar), len, stdout));
+			d (fwrite (buffer, sizeof (gchar), len, stdout));
 			d(printf("'\n"));
 
 			f = f->next;
@@ -211,7 +211,7 @@ stream_filter_write (CamelStream *stream,
 			return -1;
 	}
 
-	g_check(priv->realbuffer);
+	g_check (priv->realbuffer);
 
 	return n;
 }
@@ -237,14 +237,14 @@ stream_filter_flush (CamelStream *stream,
 	f = priv->filters;
 
 	d(printf ("\n\nFlushing: Original content (%s): '", ((CamelObject *)priv->source)->class->name));
-	d(fwrite(buffer, sizeof(gchar), len, stdout));
+	d (fwrite (buffer, sizeof (gchar), len, stdout));
 	d(printf("'\n"));
 
 	while (f) {
-		camel_mime_filter_complete(f->filter, buffer, len, presize, &buffer, &len, &presize);
+		camel_mime_filter_complete (f->filter, buffer, len, presize, &buffer, &len, &presize);
 
 		d(printf ("Filtered content (%s): '", ((CamelObject *)f->filter)->class->name));
-		d(fwrite(buffer, sizeof(gchar), len, stdout));
+		d (fwrite (buffer, sizeof (gchar), len, stdout));
 		d(printf("'\n"));
 
 		f = f->next;
@@ -334,7 +334,7 @@ camel_stream_filter_init (CamelStreamFilter *stream)
 {
 	stream->priv = CAMEL_STREAM_FILTER_GET_PRIVATE (stream);
 
-	stream->priv->realbuffer = g_malloc(READ_SIZE + READ_PAD);
+	stream->priv->realbuffer = g_malloc (READ_SIZE + READ_PAD);
 	stream->priv->buffer = stream->priv->realbuffer + READ_PAD;
 	stream->priv->last_was_read = TRUE;
 	stream->priv->flushed = FALSE;
@@ -404,7 +404,7 @@ camel_stream_filter_add (CamelStreamFilter *stream,
 
 	priv = CAMEL_STREAM_FILTER_GET_PRIVATE (stream);
 
-	fn = g_malloc(sizeof(*fn));
+	fn = g_malloc (sizeof (*fn));
 	fn->id = priv->filterid++;
 	fn->filter = g_object_ref (filter);
 
@@ -441,7 +441,7 @@ camel_stream_filter_remove (CamelStreamFilter *stream,
 		if (fn->id == id) {
 			f->next = fn->next;
 			g_object_unref (fn->filter);
-			g_free(fn);
+			g_free (fn);
 		}
 		f = f->next;
 	}
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index 91e0c05..cea4758 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -169,7 +169,7 @@ stream_fs_seek (CamelSeekableStream *stream,
 		break;
 	case CAMEL_STREAM_END:
 		if (stream->bound_end == CAMEL_STREAM_UNBOUND) {
-			real = lseek(priv->fd, offset, SEEK_END);
+			real = lseek (priv->fd, offset, SEEK_END);
 			if (real != -1) {
 				if (real<stream->bound_start)
 					real = stream->bound_start;
@@ -189,7 +189,7 @@ stream_fs_seek (CamelSeekableStream *stream,
 		real = MIN (real, stream->bound_end);
 	real = MAX (real, stream->bound_start);
 
-	real = lseek(priv->fd, real, SEEK_SET);
+	real = lseek (priv->fd, real, SEEK_SET);
 	if (real == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
diff --git a/camel/camel-stream-mem.c b/camel/camel-stream-mem.c
index 5f2960a..1649fe4 100644
--- a/camel/camel-stream-mem.c
+++ b/camel/camel-stream-mem.c
@@ -63,7 +63,7 @@ clear_mem (gpointer p, gsize len)
 		len -= 4;
 	}
 
-	memset(s, 0xbf, len);
+	memset (s, 0xbf, len);
 }
 
 static void
@@ -98,7 +98,7 @@ stream_mem_read (CamelStream *stream,
 	priv = CAMEL_STREAM_MEM_GET_PRIVATE (stream);
 
 	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		n = MIN(seekable->bound_end - seekable->position, n);
+		n = MIN (seekable->bound_end - seekable->position, n);
 
 	nread = MIN (n, priv->buffer->len - seekable->position);
 	if (nread > 0) {
@@ -123,7 +123,7 @@ stream_mem_write (CamelStream *stream,
 	priv = CAMEL_STREAM_MEM_GET_PRIVATE (stream);
 
 	if (seekable->bound_end != CAMEL_STREAM_UNBOUND)
-		nwrite = MIN(seekable->bound_end - seekable->position, n);
+		nwrite = MIN (seekable->bound_end - seekable->position, n);
 
 	/* FIXME: we shouldn't use g_byte_arrays or g_malloc perhaps? */
 	if (seekable->position == priv->buffer->len) {
@@ -297,7 +297,7 @@ camel_stream_mem_new_with_byte_array (GByteArray *buffer)
  * This only applies to buffers owned by the stream.
  **/
 void
-camel_stream_mem_set_secure(CamelStreamMem *mem)
+camel_stream_mem_set_secure (CamelStreamMem *mem)
 {
 	g_return_if_fail (CAMEL_IS_STREAM_MEM (mem));
 
@@ -370,7 +370,7 @@ camel_stream_mem_set_buffer (CamelStreamMem *mem,
 	g_return_if_fail (buffer != NULL);
 
 	ba = g_byte_array_new ();
-	g_byte_array_append(ba, (const guint8 *)buffer, len);
-	camel_stream_mem_set_byte_array(mem, ba);
+	g_byte_array_append (ba, (const guint8 *)buffer, len);
+	camel_stream_mem_set_byte_array (mem, ba);
 	mem->priv->owner = TRUE;
 }
diff --git a/camel/camel-stream-mem.h b/camel/camel-stream-mem.h
index 77a01c6..d66c8e6 100644
--- a/camel/camel-stream-mem.h
+++ b/camel/camel-stream-mem.h
@@ -70,7 +70,7 @@ GType		camel_stream_mem_get_type	(void);
 CamelStream *	camel_stream_mem_new		(void);
 CamelStream *	camel_stream_mem_new_with_byte_array
 						(GByteArray *buffer);
-CamelStream *	camel_stream_mem_new_with_buffer(const gchar *buffer,
+CamelStream *	camel_stream_mem_new_with_buffer (const gchar *buffer,
 						 gsize len);
 void		camel_stream_mem_set_secure	(CamelStreamMem *mem);
 GByteArray *	camel_stream_mem_get_byte_array	(CamelStreamMem *mem);
diff --git a/camel/camel-stream-null.c b/camel/camel-stream-null.c
index d94f921..0050744 100644
--- a/camel/camel-stream-null.c
+++ b/camel/camel-stream-null.c
@@ -81,7 +81,7 @@ camel_stream_null_init (CamelStreamNull *stream_null)
  * Returns: a new #CamelStreamNull
  **/
 CamelStream *
-camel_stream_null_new(void)
+camel_stream_null_new (void)
 {
 	return g_object_new (CAMEL_TYPE_STREAM_NULL, NULL);
 }
diff --git a/camel/camel-stream-process.c b/camel/camel-stream-process.c
index f550440..b4880ba 100644
--- a/camel/camel-stream-process.c
+++ b/camel/camel-stream-process.c
@@ -207,7 +207,7 @@ do_exec_command (gint fd, const gchar *command, gchar **env)
 	/* Set up child's environment. We _add_ to it, don't use execle,
 	   because otherwise we'd destroy stuff like SSH_AUTH_SOCK etc. */
 	for (; env && *env; env++)
-		putenv(*env);
+		putenv (*env);
 
 	execl ("/bin/sh", "/bin/sh", "-c", command, NULL);
 
diff --git a/camel/camel-string-utils.c b/camel/camel-string-utils.c
index 0f0f11e..7416c71 100644
--- a/camel/camel-string-utils.c
+++ b/camel/camel-string-utils.c
@@ -113,7 +113,7 @@ camel_strdown (gchar *str)
  *
  * Returns:
  **/
-gchar camel_tolower(gchar c)
+gchar camel_tolower (gchar c)
 {
 	if (c >= 'A' && c <= 'Z')
 		c |= 0x20;
@@ -129,7 +129,7 @@ gchar camel_tolower(gchar c)
  *
  * Returns:
  **/
-gchar camel_toupper(gchar c)
+gchar camel_toupper (gchar c)
 {
 	if (c >= 'a' && c <= 'z')
 		c &= ~0x20;
@@ -256,7 +256,7 @@ camel_pstring_strdup (const gchar *s)
  * NULL and the empty string are special cased.
  **/
 void
-camel_pstring_free(const gchar *s)
+camel_pstring_free (const gchar *s)
 {
 	gchar *p;
 	gpointer pcount;
@@ -268,17 +268,17 @@ camel_pstring_free(const gchar *s)
 		return;
 
 	g_static_mutex_lock (&pstring_lock);
-	if (g_hash_table_lookup_extended(pstring_table, s, (gpointer *)&p, &pcount)) {
-		count = GPOINTER_TO_INT(pcount)-1;
+	if (g_hash_table_lookup_extended (pstring_table, s, (gpointer *)&p, &pcount)) {
+		count = GPOINTER_TO_INT (pcount)-1;
 		if (count == 0) {
-			g_hash_table_remove(pstring_table, p);
-			g_free(p);
+			g_hash_table_remove (pstring_table, p);
+			g_free (p);
 			if (g_getenv("CDS_DEBUG")) {
 				if (p != s) /* Only for debugging purposes */
-					g_assert(0);
+					g_assert (0);
 			}
 		} else {
-			g_hash_table_insert(pstring_table, p, GINT_TO_POINTER(count));
+			g_hash_table_insert (pstring_table, p, GINT_TO_POINTER (count));
 		}
 	} else {
 		if (g_getenv("CDS_DEBUG")) {
diff --git a/camel/camel-string-utils.h b/camel/camel-string-utils.h
index c32c4bd..c84ca38 100644
--- a/camel/camel-string-utils.h
+++ b/camel/camel-string-utils.h
@@ -39,12 +39,12 @@ void camel_string_list_free (GList *string_list);
 gchar *camel_strstrcase (const gchar *haystack, const gchar *needle);
 
 const gchar *camel_strdown (gchar *str);
-gchar camel_tolower(gchar c);
-gchar camel_toupper(gchar c);
+gchar camel_tolower (gchar c);
+gchar camel_toupper (gchar c);
 
 const gchar *camel_pstring_add (gchar *str, gboolean own);
-const gchar *camel_pstring_strdup(const gchar *s);
-void camel_pstring_free(const gchar *s);
+const gchar *camel_pstring_strdup (const gchar *s);
+void camel_pstring_free (const gchar *s);
 const gchar * camel_pstring_peek (const gchar *str);
 
 G_END_DECLS
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index 5695f62..4b97cf3 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -307,9 +307,9 @@ read_from_prfd (PRFileDesc *fd, gchar *buffer, gsize n, GError **error)
 			pollfds[1].out_flags = 0;
 			nread = -1;
 
-			res = PR_Poll(pollfds, 2, IO_TIMEOUT);
+			res = PR_Poll (pollfds, 2, IO_TIMEOUT);
 			if (res == -1)
-				_set_errno_from_pr_error (PR_GetError());
+				_set_errno_from_pr_error (PR_GetError ());
 			else if (res == 0) {
 #ifdef ETIMEDOUT
 				errno = ETIMEDOUT;
@@ -412,7 +412,7 @@ write_to_prfd (PRFileDesc *fd, const gchar *buffer, gsize n, GError **error)
 
 			res = PR_Poll (pollfds, 2, IO_TIMEOUT);
 			if (res == -1) {
-				_set_errno_from_pr_error (PR_GetError());
+				_set_errno_from_pr_error (PR_GetError ());
 				if (PR_GetError () == PR_PENDING_INTERRUPT_ERROR)
 					w = 0;
 			} else if (res == 0) {
@@ -496,7 +496,7 @@ tcp_stream_raw_close (CamelStream *stream,
 		priv->sockfd = NULL;
 
 		if (err)
-			_set_errno_from_pr_error (PR_GetError());
+			_set_errno_from_pr_error (PR_GetError ());
 		else
 			return 0;
 	}
@@ -511,17 +511,17 @@ sockaddr_to_praddr (struct sockaddr *s, gint len, PRNetAddr *addr)
 	/* We assume the ip addresses are the same size - they have to be anyway.
 	   We could probably just use memcpy *shrug* */
 
-	memset(addr, 0, sizeof(*addr));
+	memset (addr, 0, sizeof (*addr));
 
 	if (s->sa_family == AF_INET) {
 		struct sockaddr_in *sin = (struct sockaddr_in *)s;
 
-		if (len < sizeof(*sin))
+		if (len < sizeof (*sin))
 			return -1;
 
 		addr->inet.family = PR_AF_INET;
 		addr->inet.port = sin->sin_port;
-		memcpy(&addr->inet.ip, &sin->sin_addr, sizeof(addr->inet.ip));
+		memcpy (&addr->inet.ip, &sin->sin_addr, sizeof (addr->inet.ip));
 
 		return 0;
 	}
@@ -529,13 +529,13 @@ sockaddr_to_praddr (struct sockaddr *s, gint len, PRNetAddr *addr)
 	else if (s->sa_family == PR_AF_INET6) {
 		struct sockaddr_in6 *sin = (struct sockaddr_in6 *)s;
 
-		if (len < sizeof(*sin))
+		if (len < sizeof (*sin))
 			return -1;
 
 		addr->ipv6.family = PR_AF_INET6;
 		addr->ipv6.port = sin->sin6_port;
 		addr->ipv6.flowinfo = sin->sin6_flowinfo;
-		memcpy(&addr->ipv6.ip, &sin->sin6_addr, sizeof(addr->ipv6.ip));
+		memcpy (&addr->ipv6.ip, &sin->sin6_addr, sizeof (addr->ipv6.ip));
 		addr->ipv6.scope_id = sin->sin6_scope_id;
 
 		return 0;
@@ -551,20 +551,20 @@ socket_connect (struct addrinfo *host, GError **error)
 	PRNetAddr netaddr;
 	PRFileDesc *fd, *cancel_fd;
 
-	if (sockaddr_to_praddr(host->ai_addr, host->ai_addrlen, &netaddr) != 0) {
+	if (sockaddr_to_praddr (host->ai_addr, host->ai_addrlen, &netaddr) != 0) {
 		errno = EINVAL;
 		_set_g_error_from_errno (error, FALSE);
 		return NULL;
 	}
 
-	fd = PR_OpenTCPSocket(netaddr.raw.family);
+	fd = PR_OpenTCPSocket (netaddr.raw.family);
 	if (fd == NULL) {
 		_set_errno_from_pr_error (PR_GetError ());
 		_set_g_error_from_errno (error, FALSE);
 		return NULL;
 	}
 
-	cancel_fd = camel_operation_cancel_prfd(NULL);
+	cancel_fd = camel_operation_cancel_prfd (NULL);
 
 	if (PR_Connect (fd, &netaddr, cancel_fd?0:CONNECT_TIMEOUT) == PR_FAILURE) {
 		gint errnosave;
@@ -595,7 +595,7 @@ socket_connect (struct addrinfo *host, GError **error)
 					goto exception;
 				}
 
-				if (PR_ConnectContinue(fd, poll[0].out_flags) == PR_FAILURE) {
+				if (PR_ConnectContinue (fd, poll[0].out_flags) == PR_FAILURE) {
 					_set_errno_from_pr_error (PR_GetError ());
 					if (PR_GetError () != PR_IN_PROGRESS_ERROR)
 						goto exception;
@@ -1119,28 +1119,28 @@ tcp_stream_raw_setsockopt (CamelTcpStream *stream,
 }
 
 static struct sockaddr *
-sockaddr_from_praddr(PRNetAddr *addr, socklen_t *len)
+sockaddr_from_praddr (PRNetAddr *addr, socklen_t *len)
 {
 	/* We assume the ip addresses are the same size - they have to be anyway */
 
 	if (addr->raw.family == PR_AF_INET) {
-		struct sockaddr_in *sin = g_malloc0(sizeof(*sin));
+		struct sockaddr_in *sin = g_malloc0 (sizeof (*sin));
 
 		sin->sin_family = AF_INET;
 		sin->sin_port = addr->inet.port;
-		memcpy(&sin->sin_addr, &addr->inet.ip, sizeof(sin->sin_addr));
+		memcpy (&sin->sin_addr, &addr->inet.ip, sizeof (sin->sin_addr));
 		*len = sizeof(*sin);
 
 		return (struct sockaddr *)sin;
 	}
 #ifdef ENABLE_IPv6
 	else if (addr->raw.family == PR_AF_INET6) {
-		struct sockaddr_in6 *sin = g_malloc0(sizeof(*sin));
+		struct sockaddr_in6 *sin = g_malloc0 (sizeof (*sin));
 
 		sin->sin6_family = AF_INET6;
 		sin->sin6_port = addr->ipv6.port;
 		sin->sin6_flowinfo = addr->ipv6.flowinfo;
-		memcpy(&sin->sin6_addr, &addr->ipv6.ip, sizeof(sin->sin6_addr));
+		memcpy (&sin->sin6_addr, &addr->ipv6.ip, sizeof (sin->sin6_addr));
 		sin->sin6_scope_id = addr->ipv6.scope_id;
 		*len = sizeof(*sin);
 
@@ -1159,10 +1159,10 @@ tcp_stream_raw_get_local_address (CamelTcpStream *stream,
 	CamelTcpStreamRawPrivate *priv = raw->priv;
 	PRNetAddr addr;
 
-	if (PR_GetSockName(priv->sockfd, &addr) != PR_SUCCESS)
+	if (PR_GetSockName (priv->sockfd, &addr) != PR_SUCCESS)
 		return NULL;
 
-	return sockaddr_from_praddr(&addr, len);
+	return sockaddr_from_praddr (&addr, len);
 }
 
 static struct sockaddr *
@@ -1173,10 +1173,10 @@ tcp_stream_raw_get_remote_address (CamelTcpStream *stream,
 	CamelTcpStreamRawPrivate *priv = raw->priv;
 	PRNetAddr addr;
 
-	if (PR_GetPeerName(priv->sockfd, &addr) != PR_SUCCESS)
+	if (PR_GetPeerName (priv->sockfd, &addr) != PR_SUCCESS)
 		return NULL;
 
-	return sockaddr_from_praddr(&addr, len);
+	return sockaddr_from_praddr (&addr, len);
 }
 
 static PRFileDesc *
diff --git a/camel/camel-tcp-stream-ssl.c b/camel/camel-tcp-stream-ssl.c
index 11b5b8b..02c7db8 100644
--- a/camel/camel-tcp-stream-ssl.c
+++ b/camel/camel-tcp-stream-ssl.c
@@ -224,12 +224,12 @@ ssl_auth_cert (gpointer data, PRFileDesc *sockfd, PRBool checksig, PRBool is_ser
 }
 #endif
 
-CamelCert *camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert);
-CamelCert *camel_certdb_nss_cert_add(CamelCertDB *certdb, CERTCertificate *cert);
-void camel_certdb_nss_cert_set(CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert);
+CamelCert *camel_certdb_nss_cert_get (CamelCertDB *certdb, CERTCertificate *cert);
+CamelCert *camel_certdb_nss_cert_add (CamelCertDB *certdb, CERTCertificate *cert);
+void camel_certdb_nss_cert_set (CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert);
 
 static gchar *
-cert_fingerprint(CERTCertificate *cert)
+cert_fingerprint (CERTCertificate *cert)
 {
 	GChecksum *checksum;
 	guint8 *digest;
@@ -263,12 +263,12 @@ cert_fingerprint(CERTCertificate *cert)
 
 	fingerprint[47] = 0;
 
-	return g_strdup((gchar *) fingerprint);
+	return g_strdup ((gchar *) fingerprint);
 }
 
 /* lookup a cert uses fingerprint to index an on-disk file */
 CamelCert *
-camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert)
+camel_certdb_nss_cert_get (CamelCertDB *certdb, CERTCertificate *cert)
 {
 	gchar *fingerprint;
 	CamelCert *ccert;
@@ -313,12 +313,12 @@ camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert)
 		ccert->rawcert = array;
 	}
 
-	g_free(fingerprint);
+	g_free (fingerprint);
 	if (ccert->rawcert->len != cert->derCert.len
-	    || memcmp(ccert->rawcert->data, cert->derCert.data, cert->derCert.len) != 0) {
+	    || memcmp (ccert->rawcert->data, cert->derCert.data, cert->derCert.len) != 0) {
 		g_warning("rawcert != derCer");
-		camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
-		camel_certdb_touch(certdb);
+		camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
+		camel_certdb_touch (certdb);
 	}
 
 	return ccert;
@@ -326,32 +326,32 @@ camel_certdb_nss_cert_get(CamelCertDB *certdb, CERTCertificate *cert)
 
 /* add a cert to the certdb */
 CamelCert *
-camel_certdb_nss_cert_add(CamelCertDB *certdb, CERTCertificate *cert)
+camel_certdb_nss_cert_add (CamelCertDB *certdb, CERTCertificate *cert)
 {
 	CamelCert *ccert;
 	gchar *fingerprint;
 
-	fingerprint = cert_fingerprint(cert);
+	fingerprint = cert_fingerprint (cert);
 
-	ccert = camel_certdb_cert_new(certdb);
-	camel_cert_set_issuer(certdb, ccert, CERT_NameToAscii(&cert->issuer));
-	camel_cert_set_subject(certdb, ccert, CERT_NameToAscii(&cert->subject));
+	ccert = camel_certdb_cert_new (certdb);
+	camel_cert_set_issuer (certdb, ccert, CERT_NameToAscii (&cert->issuer));
+	camel_cert_set_subject (certdb, ccert, CERT_NameToAscii (&cert->subject));
 	/* hostname is set in caller */
 	/*camel_cert_set_hostname(certdb, ccert, ssl->priv->expected_host);*/
-	camel_cert_set_fingerprint(certdb, ccert, fingerprint);
-	camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
-	g_free(fingerprint);
+	camel_cert_set_fingerprint (certdb, ccert, fingerprint);
+	camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_UNKNOWN);
+	g_free (fingerprint);
 
-	camel_certdb_nss_cert_set(certdb, ccert, cert);
+	camel_certdb_nss_cert_set (certdb, ccert, cert);
 
-	camel_certdb_add(certdb, ccert);
+	camel_certdb_add (certdb, ccert);
 
 	return ccert;
 }
 
 /* set the 'raw' cert (& save it) */
 void
-camel_certdb_nss_cert_set(CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert)
+camel_certdb_nss_cert_set (CamelCertDB *certdb, CamelCert *ccert, CERTCertificate *cert)
 {
 	gchar *dir, *path, *fingerprint;
 	CamelStream *stream;
@@ -400,24 +400,24 @@ camel_certdb_nss_cert_set(CamelCertDB *certdb, CamelCert *ccert, CERTCertificate
 #if 0
 /* used by the mozilla-like code below */
 static gchar *
-get_nickname(CERTCertificate *cert)
+get_nickname (CERTCertificate *cert)
 {
 	gchar *server, *nick = NULL;
 	gint i;
 	PRBool status = PR_TRUE;
 
-	server = CERT_GetCommonName(&cert->subject);
+	server = CERT_GetCommonName (&cert->subject);
 	if (server == NULL)
 		return NULL;
 
 	for (i=1;status == PR_TRUE;i++) {
 		if (nick) {
-			g_free(nick);
+			g_free (nick);
 			nick = g_strdup_printf("%s #%d", server, i);
 		} else {
-			nick = g_strdup(server);
+			nick = g_strdup (server);
 		}
-		status = SEC_CertNicknameConflict(server, &cert->derSubject, cert->dbhandle);
+		status = SEC_CertNicknameConflict (server, &cert->derSubject, cert->dbhandle);
 	}
 
 	return nick;
@@ -444,16 +444,16 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 	if (cert == NULL)
 		return SECFailure;
 
-	certdb = camel_certdb_get_default();
-	ccert = camel_certdb_nss_cert_get(certdb, cert);
+	certdb = camel_certdb_get_default ();
+	ccert = camel_certdb_nss_cert_get (certdb, cert);
 	if (ccert == NULL) {
-		ccert = camel_certdb_nss_cert_add(certdb, cert);
-		camel_cert_set_hostname(certdb, ccert, ssl->priv->expected_host);
+		ccert = camel_certdb_nss_cert_add (certdb, cert);
+		camel_cert_set_hostname (certdb, ccert, ssl->priv->expected_host);
 	}
 
 	if (ccert->trust == CAMEL_CERT_TRUST_UNKNOWN) {
-		status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
-		fingerprint = cert_fingerprint(cert);
+		status = CERT_VerifyCertNow (cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
+		fingerprint = cert_fingerprint (cert);
 		cert_str = g_strdup_printf (_("Issuer:            %s\n"
 					      "Subject:           %s\n"
 					      "Fingerprint:       %s\n"
@@ -461,7 +461,7 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 					    CERT_NameToAscii (&cert->issuer),
 					    CERT_NameToAscii (&cert->subject),
 					    fingerprint, status == SECSuccess?_("GOOD"):_("BAD"));
-		g_free(fingerprint);
+		g_free (fingerprint);
 
 		/* construct our user prompt */
 		prompt = g_strdup_printf (_("SSL Certificate check for %s:\n\n%s\n\nDo you wish to accept?"),
@@ -470,17 +470,17 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 
 		/* query the user to find out if we want to accept this certificate */
 		accept = camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE);
-		g_free(prompt);
+		g_free (prompt);
 		if (accept) {
-			camel_certdb_nss_cert_set(certdb, ccert, cert);
-			camel_cert_set_trust(certdb, ccert, CAMEL_CERT_TRUST_FULLY);
-			camel_certdb_touch(certdb);
+			camel_certdb_nss_cert_set (certdb, ccert, cert);
+			camel_cert_set_trust (certdb, ccert, CAMEL_CERT_TRUST_FULLY);
+			camel_certdb_touch (certdb);
 		}
 	} else {
 		accept = ccert->trust != CAMEL_CERT_TRUST_NEVER;
 	}
 
-	camel_certdb_cert_unref(certdb, ccert);
+	camel_certdb_cert_unref (certdb, ccert);
 	g_object_unref (certdb);
 
 	return accept ? SECSuccess : SECFailure;
@@ -492,7 +492,7 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 	gint go = 1;
 	gchar *host, *nick;
 
-	error = PR_GetError();
+	error = PR_GetError ();
 
 	/* This code is basically what mozilla does - however it doesn't seem to work here
 	   very reliably :-/ */
@@ -510,11 +510,11 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 			printf("unknown issuer, adding ... \n");
 			prompt = g_strdup_printf(_("Certificate problem: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
 
-			if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
+			if (camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
 
-				nick = get_nickname(cert);
+				nick = get_nickname (cert);
 				if (NULL == nick) {
-					g_free(prompt);
+					g_free (prompt);
 					status = SECFailure;
 					break;
 				}
@@ -522,31 +522,31 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 				printf("adding cert '%s'\n", nick);
 
 				if (!cert->trust) {
-					cert->trust = (CERTCertTrust*)PORT_ArenaZAlloc(cert->arena, sizeof(CERTCertTrust));
+					cert->trust = (CERTCertTrust*)PORT_ArenaZAlloc (cert->arena, sizeof (CERTCertTrust));
 					CERT_DecodeTrustString(cert->trust, "P");
 				}
 
 				certs[0] = &cert->derCert;
 				/*CERT_ImportCerts (cert->dbhandle, certUsageSSLServer, 1, certs, NULL, TRUE, FALSE, nick);*/
-				CERT_ImportCerts(cert->dbhandle, certUsageUserCertImport, 1, certs, NULL, TRUE, FALSE, nick);
-				g_free(nick);
+				CERT_ImportCerts (cert->dbhandle, certUsageUserCertImport, 1, certs, NULL, TRUE, FALSE, nick);
+				g_free (nick);
 
 				printf(" cert type %08x\n", cert->nsCertType);
 
-				memset((gpointer)&trust, 0, sizeof(trust));
-				if (CERT_GetCertTrust(cert, &trust) != SECSuccess) {
+				memset ((gpointer)&trust, 0, sizeof (trust));
+				if (CERT_GetCertTrust (cert, &trust) != SECSuccess) {
 					CERT_DecodeTrustString(&trust, "P");
 				}
 				trust.sslFlags |= CERTDB_VALID_PEER | CERTDB_TRUSTED;
-				if (CERT_ChangeCertTrust(cert->dbhandle, cert, &trust) != SECSuccess) {
+				if (CERT_ChangeCertTrust (cert->dbhandle, cert, &trust) != SECSuccess) {
 					printf("couldn't change cert trust?\n");
 				}
 
 				/*status = SECSuccess;*/
 #if 1
 				/* re-verify? */
-				status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLServer, NULL);
-				error = PR_GetError();
+				status = CERT_VerifyCertNow (cert->dbhandle, cert, TRUE, certUsageSSLServer, NULL);
+				error = PR_GetError ();
 				printf("re-verify status %d, error %d\n", status, error);
 #endif
 
@@ -563,10 +563,10 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 			prompt = g_strdup_printf(_("Bad certificate domain: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
 
 			if (camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
-				host = SSL_RevealURL(sockfd);
-				status = CERT_AddOKDomainName(cert, host);
+				host = SSL_RevealURL (sockfd);
+				status = CERT_AddOKDomainName (cert, host);
 				printf("add ok domain name : %s\n", status == SECFailure?"fail":"ok");
-				error = PR_GetError();
+				error = PR_GetError ();
 				if (status == SECFailure)
 					go = 0;
 			} else {
@@ -580,10 +580,10 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 
 			prompt = g_strdup_printf(_("Certificate expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
 
-			if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
+			if (camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
 				cert->timeOK = PR_TRUE;
-				status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
-				error = PR_GetError();
+				status = CERT_VerifyCertNow (cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL);
+				error = PR_GetError ();
 				if (status == SECFailure)
 					go = 0;
 			} else {
@@ -597,9 +597,9 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 
 			prompt = g_strdup_printf(_("Certificate revocation list expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName);
 
-			if (camel_session_alert_user(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
-				host = SSL_RevealURL(sockfd);
-				status = CERT_AddOKDomainName(cert, host);
+			if (camel_session_alert_user (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, prompt, TRUE)) {
+				host = SSL_RevealURL (sockfd);
+				status = CERT_AddOKDomainName (cert, host);
 			}
 
 			go = 0;
@@ -611,10 +611,10 @@ ssl_bad_cert (gpointer data, PRFileDesc *sockfd)
 			break;
 		}
 
-		g_free(prompt);
+		g_free (prompt);
 	}
 
-	CERT_DestroyCertificate(cert);
+	CERT_DestroyCertificate (cert);
 
 	return status;
 #endif
@@ -782,7 +782,7 @@ camel_tcp_stream_ssl_new (CamelSession *session, const gchar *expected_host, gui
 {
 	CamelTcpStreamSSL *stream;
 
-	g_assert(CAMEL_IS_SESSION(session));
+	g_assert (CAMEL_IS_SESSION (session));
 
 	stream = g_object_new (CAMEL_TYPE_TCP_STREAM_SSL, NULL);
 
@@ -814,7 +814,7 @@ camel_tcp_stream_ssl_new_raw (CamelSession *session, const gchar *expected_host,
 {
 	CamelTcpStreamSSL *stream;
 
-	g_assert(CAMEL_IS_SESSION(session));
+	g_assert (CAMEL_IS_SESSION (session));
 
 	stream = g_object_new (CAMEL_TYPE_TCP_STREAM_SSL, NULL);
 
diff --git a/camel/camel-tcp-stream.h b/camel/camel-tcp-stream.h
index 4054f21..217dc88 100644
--- a/camel/camel-tcp-stream.h
+++ b/camel/camel-tcp-stream.h
@@ -196,7 +196,7 @@ PRFileDesc  *   camel_tcp_stream_get_file_desc  (CamelTcpStream *stream);
  * support SOCKS4a/SOCKS5 proxies should be well-contained within Camel,
  * with no extra changes required in Evolution.
  */
-void		camel_tcp_stream_set_socks_proxy(CamelTcpStream *stream,
+void		camel_tcp_stream_set_socks_proxy (CamelTcpStream *stream,
 						 const gchar *socks_host,
 						 gint socks_port);
 void		camel_tcp_stream_peek_socks_proxy
diff --git a/camel/camel-text-index.h b/camel/camel-text-index.h
index 2e7b5e5..d981f59 100644
--- a/camel/camel-text-index.h
+++ b/camel/camel-text-index.h
@@ -133,7 +133,7 @@ struct _CamelTextIndexCursorClass {
 	CamelIndexCursorClass parent_class;
 };
 
-GType camel_text_index_cursor_get_type(void);
+GType camel_text_index_cursor_get_type (void);
 
 /* ********************************************************************** */
 
@@ -146,7 +146,7 @@ struct _CamelTextIndexKeyCursorClass {
 	CamelIndexCursorClass parent_class;
 };
 
-GType camel_text_index_key_cursor_get_type(void);
+GType camel_text_index_key_cursor_get_type (void);
 
 /* ********************************************************************** */
 
@@ -159,7 +159,7 @@ struct _CamelTextIndexNameClass {
 	CamelIndexNameClass parent_class;
 };
 
-GType camel_text_index_name_get_type(void);
+GType camel_text_index_name_get_type (void);
 
 /* ********************************************************************** */
 
diff --git a/camel/camel-trie.c b/camel/camel-trie.c
index 9e66de7..18d8d40 100644
--- a/camel/camel-trie.c
+++ b/camel/camel-trie.c
@@ -301,7 +301,7 @@ camel_trie_add (CamelTrie *trie, const gchar *pattern, gint pattern_id)
 	}
 
 	d(fprintf (stderr, "\nafter adding pattern '%s' to trie %p:\n", pattern, trie));
-	d(dump_trie (&trie->root, 0));
+	d (dump_trie (&trie->root, 0));
 }
 
 /*
diff --git a/camel/camel-url.c b/camel/camel-url.c
index f0c0c31..8b351a5 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -98,7 +98,7 @@ camel_url_new_with_base (CamelURL *base, const gchar *url_string)
 
 #ifdef G_OS_WIN32
 	if (url->protocol && !strcmp(url->protocol, "file")) {
-		url->path = g_filename_from_uri(start, &url->host, NULL);
+		url->path = g_filename_from_uri (start, &url->host, NULL);
 		return url;
 	}
 #endif
@@ -120,7 +120,7 @@ camel_url_new_with_base (CamelURL *base, const gchar *url_string)
 				colon = at;
 			}
 
-			semi = strchr(url_string, ';');
+			semi = strchr (url_string, ';');
 			if (semi && semi < colon &&
 			    !g_ascii_strncasecmp (semi, ";auth=", 6)) {
 				url->authmech = g_strndup (semi + 6,
@@ -340,7 +340,7 @@ camel_url_to_string (CamelURL *url, guint32 flags)
 
 #ifdef G_OS_WIN32
 	if (url->protocol && !strcmp(url->protocol, "file"))
-		return g_filename_to_uri(url->path, url->host, NULL);
+		return g_filename_to_uri (url->path, url->host, NULL);
 #endif /* G_OS_WIN32 */
 
 	str = g_string_sized_new (20);
@@ -412,11 +412,11 @@ camel_url_free (CamelURL *url)
 {
 	if (url) {
 		if (url->passwd)
-			memset(url->passwd, 0, strlen(url->passwd));
+			memset (url->passwd, 0, strlen (url->passwd));
 		if (url->user)
-			memset(url->user, 0, strlen(url->user));
+			memset (url->user, 0, strlen (url->user));
 		if (url->host)
-			memset(url->host, 0, strlen(url->host));
+			memset (url->host, 0, strlen (url->host));
 		g_free (url->protocol);
 		g_free (url->user);
 		g_free (url->authmech);
@@ -542,9 +542,9 @@ camel_url_set_param (CamelURL *url, const gchar *name, const gchar *value)
 	g_return_if_fail (url != NULL);
 
 	if (value)
-		g_datalist_set_data_full (&url->params, name, g_strdup(value), g_free);
+		g_datalist_set_data_full (&url->params, name, g_strdup (value), g_free);
 	else
-		g_datalist_remove_data(&url->params, name);
+		g_datalist_remove_data (&url->params, name);
 }
 
 /**
@@ -644,7 +644,7 @@ camel_url_decode (gchar *part)
 
 	s = d = (guchar *)part;
 	do {
-		if (*s == '%' && isxdigit(s[1]) && isxdigit(s[2])) {
+		if (*s == '%' && isxdigit (s[1]) && isxdigit (s[2])) {
 			*d++ = (XDIGIT (s[1]) << 4) + XDIGIT (s[2]);
 			s += 2;
 		} else
@@ -688,16 +688,16 @@ check_equal (gchar *s1, gchar *s2)
 }
 
 gint
-camel_url_equal(gconstpointer v, gconstpointer v2)
+camel_url_equal (gconstpointer v, gconstpointer v2)
 {
 	const CamelURL *u1 = v, *u2 = v2;
 
-	return check_equal(u1->protocol, u2->protocol)
-		&& check_equal(u1->user, u2->user)
-		&& check_equal(u1->authmech, u2->authmech)
-		&& check_equal(u1->host, u2->host)
-		&& check_equal(u1->path, u2->path)
-		&& check_equal(u1->query, u2->query)
+	return check_equal (u1->protocol, u2->protocol)
+		&& check_equal (u1->user, u2->user)
+		&& check_equal (u1->authmech, u2->authmech)
+		&& check_equal (u1->host, u2->host)
+		&& check_equal (u1->path, u2->path)
+		&& check_equal (u1->query, u2->query)
 		&& u1->port == u2->port;
 }
 
@@ -710,25 +710,25 @@ camel_url_equal(gconstpointer v, gconstpointer v2)
  * Returns: a duplicate copy of @in
  **/
 CamelURL *
-camel_url_copy(const CamelURL *in)
+camel_url_copy (const CamelURL *in)
 {
 	CamelURL *out;
 
 	g_return_val_if_fail (in != NULL, NULL);
 
-	out = g_malloc0(sizeof(*out));
-	out->protocol = g_strdup(in->protocol);
-	out->user = g_strdup(in->user);
-	out->authmech = g_strdup(in->authmech);
-	out->passwd = g_strdup(in->passwd);
-	out->host = g_strdup(in->host);
+	out = g_malloc0 (sizeof (*out));
+	out->protocol = g_strdup (in->protocol);
+	out->user = g_strdup (in->user);
+	out->authmech = g_strdup (in->authmech);
+	out->passwd = g_strdup (in->passwd);
+	out->host = g_strdup (in->host);
 	out->port = in->port;
-	out->path = g_strdup(in->path);
+	out->path = g_strdup (in->path);
 	out->params = NULL;
 	if (in->params)
-		g_datalist_foreach(&((CamelURL *)in)->params, copy_param, &out->params);
-	out->query = g_strdup(in->query);
-	out->fragment = g_strdup(in->fragment);
+		g_datalist_foreach (&((CamelURL *)in)->params, copy_param, &out->params);
+	out->query = g_strdup (in->query);
+	out->fragment = g_strdup (in->fragment);
 
 	return out;
 }
diff --git a/camel/camel-url.h b/camel/camel-url.h
index bbd571e..c593970 100644
--- a/camel/camel-url.h
+++ b/camel/camel-url.h
@@ -79,8 +79,8 @@ const gchar *camel_url_get_param (CamelURL *url, const gchar *name);
 
 /* for putting url's into hash tables */
 guint camel_url_hash (gconstpointer v);
-gint camel_url_equal(gconstpointer v, gconstpointer v2);
-CamelURL *camel_url_copy(const CamelURL *in);
+gint camel_url_equal (gconstpointer v, gconstpointer v2);
+CamelURL *camel_url_copy (const CamelURL *in);
 
 G_END_DECLS
 
diff --git a/camel/camel-utf8.c b/camel/camel-utf8.c
index a5702d4..9f07d3c 100644
--- a/camel/camel-utf8.c
+++ b/camel/camel-utf8.c
@@ -40,7 +40,7 @@
  * be written to @ptr.  @ptr will be advanced to the next character position.
  **/
 void
-camel_utf8_putc(guchar **ptr, guint32 c)
+camel_utf8_putc (guchar **ptr, guint32 c)
 {
 	register guchar *p = *ptr;
 
@@ -76,7 +76,7 @@ camel_utf8_putc(guchar **ptr, guint32 c)
  * the next character always.
  **/
 guint32
-camel_utf8_getc(const guchar **ptr)
+camel_utf8_getc (const guchar **ptr)
 {
 	register guchar *p = (guchar *)*ptr;
 	register guchar c, r;
@@ -126,7 +126,7 @@ loop:
  * Returns: The next utf8 char, or 0xffff.
  **/
 guint32
-camel_utf8_getc_limit(const guchar **ptr, const guchar *end)
+camel_utf8_getc_limit (const guchar **ptr, const guchar *end)
 {
 	register guchar *p = (guchar *)*ptr;
 	register guchar c, r;
@@ -169,14 +169,14 @@ loop:
 }
 
 void
-g_string_append_u(GString *out, guint32 c)
+g_string_append_u (GString *out, guint32 c)
 {
 	guchar buffer[8];
 	guchar *p = buffer;
 
-	camel_utf8_putc(&p, c);
+	camel_utf8_putc (&p, c);
 	*p = 0;
-	g_string_append(out, (const gchar *) buffer);
+	g_string_append (out, (const gchar *) buffer);
 }
 
 static const gchar utf7_alphabet[] =
@@ -213,7 +213,7 @@ static const guchar utf7_rank[256] = {
  * Returns: The converted string.
  **/
 gchar *
-camel_utf7_utf8(const gchar *ptr)
+camel_utf7_utf8 (const gchar *ptr)
 {
 	const guchar *p = (guchar *)ptr;
 	guint c;
@@ -231,11 +231,11 @@ camel_utf7_utf8(const gchar *ptr)
 			if (c == '&')
 				state = 1;
 			else
-				g_string_append_u(out, c);
+				g_string_append_u (out, c);
 			break;
 		case 1:
 			if (c == '-') {
-				g_string_append_c(out, '&');
+				g_string_append_c (out, '&');
 				state = 0;
 			} else if (utf7_rank[c] != 0xff) {
 				v = utf7_rank[c];
@@ -255,32 +255,32 @@ camel_utf7_utf8(const gchar *ptr)
 				i+=6;
 				if (i >= 16) {
 					x = (v >> (i-16)) & 0xffff;
-					g_string_append_u(out, x);
+					g_string_append_u (out, x);
 					i-=16;
 				}
 			} else {
-				g_string_append_u(out, c);
+				g_string_append_u (out, c);
 				state = 0;
 			}
 			break;
 		}
 	} while (c);
 
-	ret = g_strdup(out->str);
-	g_string_free(out, TRUE);
+	ret = g_strdup (out->str);
+	g_string_free (out, TRUE);
 
 	return ret;
 }
 
-static void utf7_closeb64(GString *out, guint32 v, guint32 i)
+static void utf7_closeb64 (GString *out, guint32 v, guint32 i)
 {
 	guint32 x;
 
 	if (i>0) {
 		x = (v << (6-i)) & 0x3f;
-		g_string_append_c(out, utf7_alphabet[x]);
+		g_string_append_c (out, utf7_alphabet[x]);
 	}
-	g_string_append_c(out, '-');
+	g_string_append_c (out, '-');
 }
 
 /**
@@ -294,7 +294,7 @@ static void utf7_closeb64(GString *out, guint32 v, guint32 i)
  * Returns:
  **/
 gchar *
-camel_utf8_utf7(const gchar *ptr)
+camel_utf8_utf7 (const gchar *ptr)
 {
 	const guchar *p = (guchar *)ptr;
 	guint c;
@@ -306,37 +306,37 @@ camel_utf8_utf7(const gchar *ptr)
 
 	out = g_string_new("");
 
-	while ((c = camel_utf8_getc(&p))) {
+	while ((c = camel_utf8_getc (&p))) {
 		if (c >= 0x20 && c <= 0x7e) {
 			if (state == 1) {
-				utf7_closeb64(out, v, i);
+				utf7_closeb64 (out, v, i);
 				state = 0;
 				i = 0;
 			}
 			if (c == '&')
 				g_string_append(out, "&-");
 			else
-				g_string_append_c(out, c);
+				g_string_append_c (out, c);
 		} else {
 			if (state == 0) {
-				g_string_append_c(out, '&');
+				g_string_append_c (out, '&');
 				state = 1;
 			}
 			v = (v << 16) | c;
 			i += 16;
 			while (i >= 6) {
 				x = (v >> (i-6)) & 0x3f;
-				g_string_append_c(out, utf7_alphabet[x]);
+				g_string_append_c (out, utf7_alphabet[x]);
 				i -= 6;
 			}
 		}
 	}
 
 	if (state == 1)
-		utf7_closeb64(out, v, i);
+		utf7_closeb64 (out, v, i);
 
-	ret = g_strdup(out->str);
-	g_string_free(out, TRUE);
+	ret = g_strdup (out->str);
+	g_string_free (out, TRUE);
 
 	return ret;
 }
@@ -351,25 +351,25 @@ camel_utf8_utf7(const gchar *ptr)
  * Returns:
  **/
 gchar *
-camel_utf8_ucs2(const gchar *pptr)
+camel_utf8_ucs2 (const gchar *pptr)
 {
-	GByteArray *work = g_byte_array_new();
+	GByteArray *work = g_byte_array_new ();
 	guint32 c;
 	gchar *out;
 	const guchar *ptr = (const guchar *) pptr;
 
 	/* what if c is > 0xffff ? */
 
-	while ((c = camel_utf8_getc(&ptr))) {
-		guint16 s = g_htons(c);
+	while ((c = camel_utf8_getc (&ptr))) {
+		guint16 s = g_htons (c);
 
-		g_byte_array_append(work, (guchar *) &s, 2);
+		g_byte_array_append (work, (guchar *) &s, 2);
 	}
 
 	g_byte_array_append(work, (guchar *) "\000\000", 2);
-	out = g_malloc(work->len);
-	memcpy(out, work->data, work->len);
-	g_byte_array_free(work, TRUE);
+	out = g_malloc (work->len);
+	memcpy (out, work->data, work->len);
+	g_byte_array_free (work, TRUE);
 
 	return out;
 }
@@ -383,7 +383,7 @@ camel_utf8_ucs2(const gchar *pptr)
  *
  * Returns:
  **/
-gchar *camel_ucs2_utf8(const gchar *ptr)
+gchar *camel_ucs2_utf8 (const gchar *ptr)
 {
 	guint16 *ucs = (guint16 *)ptr;
 	guint32 c;
@@ -391,10 +391,10 @@ gchar *camel_ucs2_utf8(const gchar *ptr)
 	gchar *out;
 
 	while ((c = *ucs++))
-		g_string_append_u(work, g_ntohs(c));
+		g_string_append_u (work, g_ntohs (c));
 
-	out = g_strdup(work->str);
-	g_string_free(work, TRUE);
+	out = g_strdup (work->str);
+	g_string_free (work, TRUE);
 
 	return out;
 }
diff --git a/camel/camel-utf8.h b/camel/camel-utf8.h
index d454bcd..f63ef3f 100644
--- a/camel/camel-utf8.h
+++ b/camel/camel-utf8.h
@@ -29,20 +29,20 @@
 
 G_BEGIN_DECLS
 
-void camel_utf8_putc(guchar **ptr, guint32 c);
-guint32 camel_utf8_getc(const guchar **ptr);
+void camel_utf8_putc (guchar **ptr, guint32 c);
+guint32 camel_utf8_getc (const guchar **ptr);
 guint32 camel_utf8_getc_limit (const guchar **ptr, const guchar *end);
 
 /* utility func for utf8 gstrings */
-void g_string_append_u(GString *out, guint32 c);
+void g_string_append_u (GString *out, guint32 c);
 
 /* convert utf7 to/from utf8, actually this is modified IMAP utf7 */
-gchar *camel_utf7_utf8(const gchar *ptr);
-gchar *camel_utf8_utf7(const gchar *ptr);
+gchar *camel_utf7_utf8 (const gchar *ptr);
+gchar *camel_utf8_utf7 (const gchar *ptr);
 
 /* convert ucs2 to/from utf8 */
-gchar *camel_utf8_ucs2(const gchar *ptr);
-gchar *camel_ucs2_utf8(const gchar *ptr);
+gchar *camel_utf8_ucs2 (const gchar *ptr);
+gchar *camel_ucs2_utf8 (const gchar *ptr);
 
 /* make valid utf8 string */
 gchar *camel_utf8_make_valid (const gchar *text);
diff --git a/camel/camel-vee-folder.h b/camel/camel-vee-folder.h
index 3653314..3111c48 100644
--- a/camel/camel-vee-folder.h
+++ b/camel/camel-vee-folder.h
@@ -109,12 +109,12 @@ GType	      camel_vee_folder_get_type		(void);
 CamelFolder  *camel_vee_folder_new		(CamelStore *parent_store, const gchar *full, guint32 flags);
 void         camel_vee_folder_construct		(CamelVeeFolder *vf, guint32 flags);
 
-CamelFolder *camel_vee_folder_get_location(CamelVeeFolder *vf, const struct _CamelVeeMessageInfo *vinfo, gchar **realuid);
+CamelFolder *camel_vee_folder_get_location (CamelVeeFolder *vf, const struct _CamelVeeMessageInfo *vinfo, gchar **realuid);
 
 void         camel_vee_folder_add_folder        (CamelVeeFolder *vf, CamelFolder *sub);
 void         camel_vee_folder_remove_folder     (CamelVeeFolder *vf, CamelFolder *sub);
 void	     camel_vee_folder_set_folders	(CamelVeeFolder *vf, GList *folders);
-gint          camel_vee_folder_rebuild_folder(CamelVeeFolder *vf, CamelFolder *sub, GError **error);
+gint          camel_vee_folder_rebuild_folder (CamelVeeFolder *vf, CamelFolder *sub, GError **error);
 void	     camel_vee_folder_set_expression	(CamelVeeFolder *vf, const gchar *expr);
 
 void	     camel_vee_folder_mask_event_folder_changed (CamelVeeFolder *vf, CamelFolder *sub);
diff --git a/camel/camel-vee-summary.c b/camel/camel-vee-summary.c
index 79fa82c..369ac88 100644
--- a/camel/camel-vee-summary.c
+++ b/camel/camel-vee-summary.c
@@ -45,25 +45,25 @@ static const gchar *unread_str = " (and\n  \n     (match-all (not (system-flag
 G_DEFINE_TYPE (CamelVeeSummary, camel_vee_summary, CAMEL_TYPE_FOLDER_SUMMARY)
 
 static void
-vee_message_info_free(CamelFolderSummary *s, CamelMessageInfo *info)
+vee_message_info_free (CamelFolderSummary *s, CamelMessageInfo *info)
 {
 	CamelVeeMessageInfo *mi = (CamelVeeMessageInfo *)info;
 
-	camel_pstring_free(info->uid);
+	camel_pstring_free (info->uid);
 	g_object_unref (mi->summary);
 }
 
 static CamelMessageInfo *
-vee_message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
+vee_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
 {
 	CamelVeeMessageInfo *to;
 	const CamelVeeMessageInfo *from = (const CamelVeeMessageInfo *)mi;
 
-	to = (CamelVeeMessageInfo *)camel_message_info_new(s);
+	to = (CamelVeeMessageInfo *)camel_message_info_new (s);
 
 	to->summary = g_object_ref (from->summary);
 	to->info.summary = s;
-	to->info.uid = camel_pstring_strdup(from->info.uid);
+	to->info.uid = camel_pstring_strdup (from->info.uid);
 
 	return (CamelMessageInfo *)to;
 }
@@ -78,20 +78,20 @@ vee_info_ptr (const CamelMessageInfo *mi, gint id)
 	gpointer p;
 
 	rmi = camel_folder_summary_uid (vmi->summary, mi->uid+8);
-	HANDLE_NULL_INFO(NULL);
-	p = (gpointer) camel_message_info_ptr(rmi, id);
+	HANDLE_NULL_INFO (NULL);
+	p = (gpointer) camel_message_info_ptr (rmi, id);
 	camel_message_info_free (rmi);
 
 	return p;
 }
 
 static guint32
-vee_info_uint32(const CamelMessageInfo *mi, gint id)
+vee_info_uint32 (const CamelMessageInfo *mi, gint id)
 {
 	CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
 	guint32 ret;
 
-	HANDLE_NULL_INFO(0);
+	HANDLE_NULL_INFO (0);
 	ret = camel_message_info_uint32 (rmi, id);
 	if (id == CAMEL_MESSAGE_INFO_FLAGS)
 		((CamelVeeMessageInfo *) mi)->old_flags = camel_message_info_flags (rmi);
@@ -102,12 +102,12 @@ vee_info_uint32(const CamelMessageInfo *mi, gint id)
 }
 
 static time_t
-vee_info_time(const CamelMessageInfo *mi, gint id)
+vee_info_time (const CamelMessageInfo *mi, gint id)
 {
 	CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
 	time_t ret;
 
-	HANDLE_NULL_INFO(0);
+	HANDLE_NULL_INFO (0);
 	ret = camel_message_info_time (rmi, id);
 	camel_message_info_free (rmi);
 
@@ -115,12 +115,12 @@ vee_info_time(const CamelMessageInfo *mi, gint id)
 }
 
 static gboolean
-vee_info_user_flag(const CamelMessageInfo *mi, const gchar *id)
+vee_info_user_flag (const CamelMessageInfo *mi, const gchar *id)
 {
 	CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
 	gboolean ret;
 
-	HANDLE_NULL_INFO(FALSE);
+	HANDLE_NULL_INFO (FALSE);
 	ret =	camel_message_info_user_flag (rmi, id);
 	camel_message_info_free (rmi);
 
@@ -128,7 +128,7 @@ vee_info_user_flag(const CamelMessageInfo *mi, const gchar *id)
 }
 
 static const gchar *
-vee_info_user_tag(const CamelMessageInfo *mi, const gchar *id)
+vee_info_user_tag (const CamelMessageInfo *mi, const gchar *id)
 {
 	CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
 	const gchar *ret;
@@ -141,7 +141,7 @@ vee_info_user_tag(const CamelMessageInfo *mi, const gchar *id)
 }
 
 static gboolean
-vee_info_set_user_flag(CamelMessageInfo *mi, const gchar *name, gboolean value)
+vee_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
 {
 	gint res = FALSE;
 	gboolean hacked_unread_folder = FALSE;
@@ -161,12 +161,12 @@ vee_info_set_user_flag(CamelMessageInfo *mi, const gchar *name, gboolean value)
 
 	if (mi->uid) {
 		CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
-		HANDLE_NULL_INFO(FALSE);
+		HANDLE_NULL_INFO (FALSE);
 
 		if (hacked_unread_folder)
 			camel_vee_folder_mask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
 
-		res = camel_message_info_set_user_flag(rmi, name, value);
+		res = camel_message_info_set_user_flag (rmi, name, value);
 
 		if (hacked_unread_folder)
 			camel_vee_folder_unmask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
@@ -178,14 +178,14 @@ vee_info_set_user_flag(CamelMessageInfo *mi, const gchar *name, gboolean value)
 }
 
 static gboolean
-vee_info_set_user_tag(CamelMessageInfo *mi, const gchar *name, const gchar *value)
+vee_info_set_user_tag (CamelMessageInfo *mi, const gchar *name, const gchar *value)
 {
 	gint res = FALSE;
 
 	if (mi->uid) {
 		CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
-		HANDLE_NULL_INFO(FALSE);
-		res = camel_message_info_set_user_tag(rmi, name, value);
+		HANDLE_NULL_INFO (FALSE);
+		res = camel_message_info_set_user_tag (rmi, name, value);
 		camel_message_info_free (rmi);
 	}
 
@@ -218,9 +218,9 @@ camel_vee_summary_load_check_unread_vfolder (CamelVeeSummary *vs)
 	}
 
 	if (!exp || !*exp)
-		exp = g_strcompress(unread_str);
+		exp = g_strcompress (unread_str);
 
-	if (vf->expression && strstr(exp, vf->expression) &&  (vf->flags & CAMEL_STORE_VEE_FOLDER_SPECIAL) == 0)
+	if (vf->expression && strstr (exp, vf->expression) &&  (vf->flags & CAMEL_STORE_VEE_FOLDER_SPECIAL) == 0)
 		hacked_unread_folder = TRUE;
 
 	if (hacked_unread_folder)
@@ -230,7 +230,7 @@ camel_vee_summary_load_check_unread_vfolder (CamelVeeSummary *vs)
 }
 
 static gboolean
-vee_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
+vee_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set)
 {
 	gint res = FALSE;
 	CamelVeeFolder *vf = (CamelVeeFolder *)mi->summary->folder;
@@ -254,7 +254,7 @@ vee_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
 		CamelMessageInfo *rmi = camel_folder_summary_uid (((CamelVeeMessageInfo *)mi)->summary, mi->uid+8);
 		CamelVeeSummary *vsummary = (CamelVeeSummary *)mi->summary;
 
-		HANDLE_NULL_INFO(FALSE);
+		HANDLE_NULL_INFO (FALSE);
 
 		old_unread = rmi->summary->unread_count;
 		old_deleted = rmi->summary->deleted_count;
@@ -265,10 +265,10 @@ vee_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
 		if (hacked_unread_folder)
 			camel_vee_folder_mask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
 
-		camel_folder_freeze(rmi->summary->folder);
-		res = camel_message_info_set_flags(rmi, flags, set);
+		camel_folder_freeze (rmi->summary->folder);
+		res = camel_message_info_set_flags (rmi, flags, set);
 		((CamelVeeMessageInfo *) mi)->old_flags = camel_message_info_flags (rmi);
-		camel_folder_thaw(rmi->summary->folder);
+		camel_folder_thaw (rmi->summary->folder);
 
 		if (hacked_unread_folder)
 			camel_vee_folder_unmask_event_folder_changed ((CamelVeeFolder *)mi->summary->folder, rmi->summary->folder);
@@ -298,10 +298,10 @@ vee_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
 
 		/* This is where the ugly-created-hack is used */
 		if (hacked_unread_folder && unread - old_unread != 0) {
-			CamelFolderChangeInfo *changes = camel_folder_change_info_new();
+			CamelFolderChangeInfo *changes = camel_folder_change_info_new ();
 			GPtrArray *match, *array;
 
-			camel_folder_change_info_change_uid(changes, mi->uid);
+			camel_folder_change_info_change_uid (changes, mi->uid);
 
 			array = g_ptr_array_new ();
 			g_ptr_array_add (array, (gpointer)rmi->uid);
@@ -315,10 +315,10 @@ vee_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
 
 			g_ptr_array_free (array, TRUE);
 			if (match)
-				camel_folder_search_free(rmi->summary->folder, match);
+				camel_folder_search_free (rmi->summary->folder, match);
 
 			camel_folder_changed (mi->summary->folder, changes);
-			camel_folder_change_info_free(changes);
+			camel_folder_change_info_free (changes);
 		}
 		camel_message_info_free (rmi);
 	}
@@ -358,13 +358,13 @@ message_info_from_uid (CamelFolderSummary *s, const gchar *uid)
 
 		/* Create the info and load it, its so easy. */
 		info = camel_message_info_new (s);
-		camel_message_info_ref(info);
+		camel_message_info_ref (info);
 		info->dirty = FALSE;
 		vinfo = (CamelVeeMessageInfo *) info;
-		info->uid = camel_pstring_strdup(uid);
-		strncpy(tmphash, uid, 8);
+		info->uid = camel_pstring_strdup (uid);
+		strncpy (tmphash, uid, 8);
 		tmphash[8] = 0;
-		vinfo->summary = g_hash_table_lookup(((CamelVeeFolder *) s->folder)->hashes, tmphash);
+		vinfo->summary = g_hash_table_lookup (((CamelVeeFolder *) s->folder)->hashes, tmphash);
 		g_object_ref (vinfo->summary);
 		camel_folder_summary_insert (s, info, FALSE);
 	}
@@ -407,7 +407,7 @@ camel_vee_summary_init (CamelVeeSummary *vee_summary)
  * Returns: A new CamelVeeSummary object.
  **/
 CamelFolderSummary *
-camel_vee_summary_new(CamelFolder *parent)
+camel_vee_summary_new (CamelFolder *parent)
 {
 	CamelVeeSummary *s;
 	CamelStore *parent_store;
@@ -450,23 +450,23 @@ camel_vee_summary_get_ids (CamelVeeSummary *summary, gchar hash[8])
 	parent_store = camel_folder_get_parent_store (cfs->folder);
 	array = camel_db_get_vuids_from_vfolder (parent_store->cdb_r, full_name, shash, NULL);
 
-	g_free(shash);
+	g_free (shash);
 
 	return array;
 }
 
 CamelVeeMessageInfo *
-camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const gchar *uid, const gchar hash[8])
+camel_vee_summary_add (CamelVeeSummary *s, CamelFolderSummary *summary, const gchar *uid, const gchar hash[8])
 {
 	CamelVeeMessageInfo *mi;
 	gchar *vuid;
 	GHashTable * fcache;
-	vuid = g_malloc(strlen(uid)+9);
-	memcpy(vuid, hash, 8);
-	strcpy(vuid+8, uid);
+	vuid = g_malloc (strlen (uid)+9);
+	memcpy (vuid, hash, 8);
+	strcpy (vuid+8, uid);
 
 	camel_folder_summary_lock (CAMEL_FOLDER_SUMMARY (s), CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
-	mi = (CamelVeeMessageInfo *) g_hash_table_lookup(((CamelFolderSummary *) s)->loaded_infos, vuid);
+	mi = (CamelVeeMessageInfo *) g_hash_table_lookup (((CamelFolderSummary *) s)->loaded_infos, vuid);
 	camel_folder_summary_unlock (CAMEL_FOLDER_SUMMARY (s), CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	if (mi) {
@@ -480,10 +480,10 @@ camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const gch
 		return mi;
 	}
 
-	mi = (CamelVeeMessageInfo *)camel_message_info_new(&s->summary);
+	mi = (CamelVeeMessageInfo *)camel_message_info_new (&s->summary);
 	mi->summary = summary;
-	fcache = camel_folder_summary_get_flag_cache(summary);
-	mi->old_flags = GPOINTER_TO_UINT(g_hash_table_lookup (fcache, uid));
+	fcache = camel_folder_summary_get_flag_cache (summary);
+	mi->old_flags = GPOINTER_TO_UINT (g_hash_table_lookup (fcache, uid));
 	/* We would do lazy loading of flags, when the folders are loaded to memory through folder_reloaded signal */
 	g_object_ref (summary);
 	mi->info.uid = (gchar *) camel_pstring_strdup (vuid);
@@ -495,7 +495,7 @@ camel_vee_summary_add(CamelVeeSummary *s, CamelFolderSummary *summary, const gch
 		mi->old_flags = camel_message_info_flags (rmi);
 		camel_message_info_free (rmi);
 	}*/
-	camel_folder_summary_insert(&s->summary, (CamelMessageInfo *)mi, FALSE);
+	camel_folder_summary_insert (&s->summary, (CamelMessageInfo *)mi, FALSE);
 
 	return mi;
 }
diff --git a/camel/camel-vtrash-folder.c b/camel/camel-vtrash-folder.c
index ca5bec8..f654501 100644
--- a/camel/camel-vtrash-folder.c
+++ b/camel/camel-vtrash-folder.c
@@ -71,10 +71,10 @@ transfer_messages (CamelFolder *folder,
 		md->folder, md->uids, md->dest, NULL, md->delete, error);
 
 	for (i=0;i<md->uids->len;i++)
-		g_free(md->uids->pdata[i]);
-	g_ptr_array_free(md->uids, TRUE);
+		g_free (md->uids->pdata[i]);
+	g_ptr_array_free (md->uids, TRUE);
 	g_object_unref (md->folder);
-	g_free(md);
+	g_free (md);
 }
 
 static gboolean
@@ -125,7 +125,7 @@ vtrash_folder_transfer_messages_to (CamelFolder *source,
 
 		/* Move to trash is the same as setting the message flag */
 		for (i = 0; i < uids->len; i++)
-			camel_folder_set_message_flags(source, uids->pdata[i], ((CamelVTrashFolder *)dest)->bit, ~0);
+			camel_folder_set_message_flags (source, uids->pdata[i], ((CamelVTrashFolder *)dest)->bit, ~0);
 		return TRUE;
 	}
 
@@ -147,27 +147,27 @@ vtrash_folder_transfer_messages_to (CamelFolder *source,
 			camel_folder_set_message_flags (source, uids->pdata[i], sbit, 0);
 		} else {
 			if (batch == NULL)
-				batch = g_hash_table_new(NULL, NULL);
-			md = g_hash_table_lookup(batch, mi->summary->folder);
+				batch = g_hash_table_new (NULL, NULL);
+			md = g_hash_table_lookup (batch, mi->summary->folder);
 			if (md == NULL) {
-				md = g_malloc0(sizeof(*md));
+				md = g_malloc0 (sizeof (*md));
 				md->folder = g_object_ref (mi->summary->folder);
-				md->uids = g_ptr_array_new();
+				md->uids = g_ptr_array_new ();
 				md->dest = dest;
-				g_hash_table_insert(batch, mi->summary->folder, md);
+				g_hash_table_insert (batch, mi->summary->folder, md);
 			}
 
 			tuid = uids->pdata[i];
-			if (strlen(tuid)>8)
+			if (strlen (tuid)>8)
 				tuid += 8;
-			g_ptr_array_add(md->uids, g_strdup(tuid));
+			g_ptr_array_add (md->uids, g_strdup (tuid));
 		}
 		camel_folder_free_message_info (source, (CamelMessageInfo *)mi);
 	}
 
 	if (batch) {
-		g_hash_table_foreach(batch, (GHFunc)transfer_messages, error);
-		g_hash_table_destroy(batch);
+		g_hash_table_foreach (batch, (GHFunc)transfer_messages, error);
+		g_hash_table_destroy (batch);
 	}
 
 	return TRUE;
@@ -203,7 +203,7 @@ camel_vtrash_folder_new (CamelStore *parent_store, camel_vtrash_folder_t type)
 {
 	CamelVTrashFolder *vtrash;
 
-	g_assert(type < CAMEL_VTRASH_FOLDER_LAST);
+	g_assert (type < CAMEL_VTRASH_FOLDER_LAST);
 
 	vtrash = g_object_new (
 		CAMEL_TYPE_VTRASH_FOLDER,
@@ -219,7 +219,7 @@ camel_vtrash_folder_new (CamelStore *parent_store, camel_vtrash_folder_t type)
 		CAMEL_STORE_VEE_FOLDER_SPECIAL);
 
 	((CamelFolder *)vtrash)->folder_flags |= vdata[type].flags;
-	camel_vee_folder_set_expression((CamelVeeFolder *)vtrash, vdata[type].expr);
+	camel_vee_folder_set_expression ((CamelVeeFolder *)vtrash, vdata[type].expr);
 	vtrash->bit = vdata[type].bit;
 	vtrash->type = type;
 
diff --git a/camel/camel.c b/camel/camel.c
index 1989e6f..fc9f415 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -45,11 +45,11 @@
 
 #ifdef CAMEL_HAVE_NSS
 /* To protect NSS initialization and shutdown. This prevents
-   concurrent calls to shutdown() and init() by different threads */
+   concurrent calls to shutdown () and init () by different threads */
 PRLock *nss_initlock = NULL;
 
 /* Whether or not Camel has initialized the NSS library. We cannot
-   unconditionally call NSS_Shutdown() if NSS was initialized by other
+   unconditionally call NSS_Shutdown () if NSS was initialized by other
    library before. This boolean ensures that we only perform a cleanup
    if and only if Camel is the one that previously initialized NSS */
 volatile gboolean nss_initialized = FALSE;
@@ -62,7 +62,7 @@ gint camel_application_is_exiting = FALSE;
 #define NSS_SYSTEM_DB "/etc/pki/nssdb"
 
 static gint
-nss_has_system_db(void)
+nss_has_system_db (void)
 {
 	gint found = FALSE;
 #ifndef G_OS_WIN32
@@ -74,11 +74,11 @@ nss_has_system_db(void)
 		return FALSE;
 
 	/* Check whether the system NSS db is actually enabled */
-	while (fgets(buf, 80, f) && !found) {
+	while (fgets (buf, 80, f) && !found) {
 		if (!strcmp(buf, "library=libnsssysinit.so\n"))
 			found = TRUE;
 	}
-	fclose(f);
+	fclose (f);
 #endif
 	return found;
 }
@@ -95,7 +95,7 @@ camel_init (const gchar *configdir, gboolean nss_init)
 	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-	camel_debug_init();
+	camel_debug_init ();
 
 #ifdef CAMEL_HAVE_NSS
 	if (nss_init) {
@@ -105,8 +105,8 @@ camel_init (const gchar *configdir, gboolean nss_init)
 		PRUint16 indx;
 
 		if (nss_initlock == NULL) {
-			PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 10);
-			nss_initlock = PR_NewLock();
+			PR_Init (PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 10);
+			nss_initlock = PR_NewLock ();
 		}
 		PR_Lock (nss_initlock);
 
@@ -137,10 +137,10 @@ camel_init (const gchar *configdir, gboolean nss_init)
 								 ".pki/nssdb", NULL );
 			if (g_mkdir_with_parents (user_nss_dir, 0700))
 				g_warning("Failed to create SQL database directory %s: %s\n",
-					  user_nss_dir, strerror(errno));
+					  user_nss_dir, strerror (errno));
 
 			nss_sql_configdir = g_strconcat ("sql:", user_nss_dir, NULL);
-			g_free(user_nss_dir);
+			g_free (user_nss_dir);
 #endif
 		}
 
@@ -160,7 +160,7 @@ camel_init (const gchar *configdir, gboolean nss_init)
 
 		if (status == SECFailure) {
 			g_warning ("Failed to initialize NSS SQL database in %s: NSS error %d",
-				   nss_sql_configdir, PORT_GetError());
+				   nss_sql_configdir, PORT_GetError ());
 			/* Fall back to opening the old DBM database */
 		}
 #endif
@@ -184,11 +184,11 @@ skip_nss_init:
 
 		NSS_SetDomesticPolicy ();
 
-		PR_Unlock(nss_initlock);
+		PR_Unlock (nss_initlock);
 
 		/* we must enable all ciphersuites */
 		for (indx = 0; indx < SSL_NumImplementedCiphers; indx++) {
-			if (!SSL_IS_SSL2_CIPHER(SSL_ImplementedCiphers[indx]))
+			if (!SSL_IS_SSL2_CIPHER (SSL_ImplementedCiphers[indx]))
 				SSL_CipherPrefSetDefault (SSL_ImplementedCiphers[indx], PR_TRUE);
 		}
 
@@ -243,10 +243,10 @@ camel_shutdown (void)
 
 #if defined (CAMEL_HAVE_NSS)
 	if (nss_initlock != NULL) {
-		PR_Lock(nss_initlock);
+		PR_Lock (nss_initlock);
 		if (nss_initialized)
 			NSS_Shutdown ();
-		PR_Unlock(nss_initlock);
+		PR_Unlock (nss_initlock);
 	}
 #endif /* CAMEL_HAVE_NSS */
 
diff --git a/camel/db-scrap-tools/db.c b/camel/db-scrap-tools/db.c
index dcd73a5..8af52f5 100644
--- a/camel/db-scrap-tools/db.c
+++ b/camel/db-scrap-tools/db.c
@@ -23,7 +23,7 @@ select_stmt (const gchar * stmt) {
 	gint   ret;
 	gint   nrecs = 0;
 
-	ret = sqlite3_exec(db, stmt, callback, &nrecs, &errmsg);
+	ret = sqlite3_exec (db, stmt, callback, &nrecs, &errmsg);
 
 	if (ret!=SQLITE_OK) {
 		printf("Error in select statement %s [%s].\n", stmt, errmsg);
@@ -35,11 +35,11 @@ select_stmt (const gchar * stmt) {
 }
 
 static gint
-sql_stmt(const gchar * stmt) {
+sql_stmt (const gchar * stmt) {
 	gchar *errmsg;
 	gint   ret;
 
-	ret = sqlite3_exec(db, stmt, 0, 0, &errmsg);
+	ret = sqlite3_exec (db, stmt, 0, 0, &errmsg);
 
 	if (ret != SQLITE_OK) {
 		printf("Error in statement: %s [%s].\n", stmt, errmsg);
@@ -54,8 +54,8 @@ sql_stmt(const gchar * stmt) {
 static gint
 create_table (const gchar *tablename)
 {
-	gchar *cmd = malloc (sizeof(CREATE_STMT)+20);
-	sprintf(cmd, CREATE_STMT, tablename);
+	gchar *cmd = malloc (sizeof (CREATE_STMT)+20);
+	sprintf (cmd, CREATE_STMT, tablename);
 	sql_stmt (cmd);
 }
 
@@ -75,7 +75,7 @@ gint sort_cmp (gpointer foo, gint len, gpointer  data1, gint len2, gpointer data
 	return a1 == a2 ? 0 : a1 < a2 ? -1 : 1;
 }
 
-gint main(gint argc, gchar **argv) {
+gint main (gint argc, gchar **argv) {
 	gchar *zErrMsg = 0;
 	gint rc;
 
@@ -84,8 +84,8 @@ gint main(gint argc, gchar **argv) {
 
 	if (rc) {
 		fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
-		sqlite3_close(db);
-		exit(1);
+		sqlite3_close (db);
+		exit (1);
 	}
 
 	sqlite3_create_collation(db, "uidcmp", SQLITE_UTF8,  NULL, sort_cmp);
@@ -109,7 +109,7 @@ gint main(gint argc, gchar **argv) {
 
 	printf("------\n");
 	select_stmt ("select count(isize) from table1");
-	sqlite3_close(db);
+	sqlite3_close (db);
 
 	return 0;
 }
diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c
index bc6b016..1bd761c 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.c
+++ b/camel/providers/groupwise/camel-groupwise-folder.c
@@ -89,7 +89,7 @@ static void gw_update_cache ( CamelFolder *folder, GList *item_list, GError **er
 static CamelMimeMessage *groupwise_folder_item_to_msg ( CamelFolder *folder, EGwItem *item, GError **error );
 static gchar * groupwise_get_filename (CamelFolder *folder, const gchar *uid, GError **error);
 static const gchar *get_from_from_org (EGwItemOrganizer *org);
-static void groupwise_refresh_folder(CamelFolder *folder, GError **error);
+static void groupwise_refresh_folder (CamelFolder *folder, GError **error);
 static gboolean groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_single, GError **error);
 
 #define d(x)
@@ -102,14 +102,14 @@ G_DEFINE_TYPE (CamelGroupwiseFolder, camel_groupwise_folder, CAMEL_TYPE_OFFLINE_
 static gchar *
 groupwise_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
 {
-	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 
 	return camel_data_cache_get_filename (gw_folder->cache, "cache", uid, error);
 }
 
 /* Get a message from cache if available otherwise get it from server */
 static CamelMimeMessage *
-groupwise_folder_get_message( CamelFolder *folder, const gchar *uid, GError **error )
+groupwise_folder_get_message ( CamelFolder *folder, const gchar *uid, GError **error )
 {
 	CamelMimeMessage *msg = NULL;
 	CamelGroupwiseFolder *gw_folder;
@@ -269,7 +269,7 @@ groupwise_set_mail_mi_dates (CamelGroupwiseMessageInfo *mi, EGwItem *item)
 	gchar *sent_date = NULL, *received_date = NULL;
 	time_t actual_time = (time_t) 0;
 
-	sent_date = e_gw_item_get_creation_date(item);
+	sent_date = e_gw_item_get_creation_date (item);
 	received_date = e_gw_item_get_delivered_date (item);
 
 	if (sent_date) {
@@ -294,7 +294,7 @@ groupwise_populate_details_from_item (CamelMimeMessage *msg, EGwItem *item)
 	gchar *dtstring = NULL;
 	gchar *temp_str = NULL;
 
-	temp_str = (gchar *)e_gw_item_get_subject(item);
+	temp_str = (gchar *)e_gw_item_get_subject (item);
 	if (temp_str)
 		camel_mime_message_set_subject (msg, temp_str);
 	type = e_gw_item_get_item_type (item);
@@ -320,7 +320,7 @@ groupwise_populate_msg_body_from_item (EGwConnection *cnc, CamelMultipart *multi
 	const gchar *temp_body = NULL;
 
 	part = camel_mime_part_new ();
-	camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_8BIT);
+	camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_8BIT);
 
 	if (!body) {
 		temp_body = e_gw_item_get_message (item);
@@ -365,7 +365,7 @@ groupwise_populate_msg_body_from_item (EGwConnection *cnc, CamelMultipart *multi
 			if (body)
 				camel_mime_part_set_content(part, body, strlen(body), "text/html");
 			else if (temp_body)
-				camel_mime_part_set_content(part, temp_body, strlen(temp_body), e_gw_item_get_msg_content_type (item));
+				camel_mime_part_set_content (part, temp_body, strlen (temp_body), e_gw_item_get_msg_content_type (item));
 			else
 				camel_mime_part_set_content(part, " ", strlen(" "), "text/html");
 			break;
@@ -403,26 +403,26 @@ groupwise_msg_set_recipient_list (CamelMimeMessage *msg, EGwItem *item)
 			enabled = recp->status_enabled;
 
 			if (!recp->email) {
-				ha=camel_header_address_new_group(recp->display_name);
+				ha=camel_header_address_new_group (recp->display_name);
 			} else {
-				ha=camel_header_address_new_name(recp->display_name,recp->email);
+				ha=camel_header_address_new_name (recp->display_name,recp->email);
 			}
 
 			if (recp->type == E_GW_ITEM_RECIPIENT_TO) {
 				if (recp->status_enabled)
 					status_opt = g_strconcat (status_opt ? status_opt : "" , "TO", ";",NULL);
-				camel_header_address_list_append(&to_list, ha);
+				camel_header_address_list_append (&to_list, ha);
 			} else if (recp->type == E_GW_ITEM_RECIPIENT_CC) {
 				if (recp->status_enabled)
 					status_opt = g_strconcat (status_opt ? status_opt : "", "CC", ";",NULL);
-				camel_header_address_list_append(&cc_list,ha);
+				camel_header_address_list_append (&cc_list,ha);
 
 			} else if (recp->type == E_GW_ITEM_RECIPIENT_BC) {
 				if (recp->status_enabled)
 					status_opt = g_strconcat (status_opt ? status_opt : "", "BCC", ";",NULL);
-				camel_header_address_list_append(&bcc_list,ha);
+				camel_header_address_list_append (&bcc_list,ha);
 			} else {
-				camel_header_address_unref(ha);
+				camel_header_address_unref (ha);
 			}
 			if (recp->status_enabled) {
 				status_opt = g_strconcat (status_opt,
@@ -448,34 +448,34 @@ groupwise_msg_set_recipient_list (CamelMimeMessage *msg, EGwItem *item)
 	}
 
 	if (to_list) {
-		subs_email=camel_header_address_list_encode(to_list);
+		subs_email=camel_header_address_list_encode (to_list);
 		camel_medium_set_header( CAMEL_MEDIUM(msg), "To", subs_email);
-		g_free(subs_email);
-		camel_header_address_list_clear(&to_list);
+		g_free (subs_email);
+		camel_header_address_list_clear (&to_list);
 	}
 
 	if (cc_list) {
-		subs_email=camel_header_address_list_encode(cc_list);
+		subs_email=camel_header_address_list_encode (cc_list);
 		camel_medium_set_header( CAMEL_MEDIUM(msg), "Cc", subs_email);
-		g_free(subs_email);
-		camel_header_address_list_clear(&cc_list);
+		g_free (subs_email);
+		camel_header_address_list_clear (&cc_list);
 	}
 
 	if (bcc_list) {
-		subs_email=camel_header_address_list_encode(bcc_list);
+		subs_email=camel_header_address_list_encode (bcc_list);
 		camel_medium_set_header( CAMEL_MEDIUM(msg), "Bcc", subs_email);
-		g_free(subs_email);
-		camel_header_address_list_clear(&bcc_list);
+		g_free (subs_email);
+		camel_header_address_list_clear (&bcc_list);
 	}
 
 	if (org) {
 		if (org->display_name && org->display_name[0] && org->email != NULL && org->email[0] != '\0') {
 			org->display_name = g_strdelimit (org->display_name, "<>", ' ');
-			ha=camel_header_address_new_name(org->display_name, org->email);
+			ha=camel_header_address_new_name (org->display_name, org->email);
 		} else if (org->email)
-			ha=camel_header_address_new_name(org->email, org->email);
+			ha=camel_header_address_new_name (org->email, org->email);
 		else if (org->display_name)
-			ha=camel_header_address_new_group(org->display_name);
+			ha=camel_header_address_new_group (org->display_name);
 		else
 			ha = NULL;
 		if (ha) {
@@ -514,7 +514,7 @@ groupwise_folder_rename (CamelFolder *folder, const gchar *new)
 	camel_data_cache_set_path (gw_folder->cache, folder_dir);
 	CAMEL_GROUPWISE_FOLDER_REC_UNLOCK (folder, cache_lock);
 
-	((CamelFolderClass *)camel_groupwise_folder_parent_class)->rename(folder, new);
+	((CamelFolderClass *)camel_groupwise_folder_parent_class)->rename (folder, new);
 	camel_folder_summary_set_filename (folder->summary, summary_path);
 
 	state_file = g_strdup_printf ("%s/cmeta", folder_dir);
@@ -528,13 +528,13 @@ groupwise_folder_rename (CamelFolder *folder, const gchar *new)
 static GPtrArray *
 groupwise_folder_search_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
 {
-	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 	GPtrArray *matches;
 
-	CAMEL_GROUPWISE_FOLDER_LOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_LOCK (gw_folder, search_lock);
 	camel_folder_search_set_folder (gw_folder->search, folder);
-	matches = camel_folder_search_search(gw_folder->search, expression, NULL, error);
-	CAMEL_GROUPWISE_FOLDER_UNLOCK(gw_folder, search_lock);
+	matches = camel_folder_search_search (gw_folder->search, expression, NULL, error);
+	CAMEL_GROUPWISE_FOLDER_UNLOCK (gw_folder, search_lock);
 
 	return matches;
 }
@@ -542,32 +542,32 @@ groupwise_folder_search_by_expression (CamelFolder *folder, const gchar *express
 static guint32
 groupwise_folder_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
 {
-	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 	guint32 matches;
 
-	CAMEL_GROUPWISE_FOLDER_LOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_LOCK (gw_folder, search_lock);
 	camel_folder_search_set_folder (gw_folder->search, folder);
 	matches = camel_folder_search_count (gw_folder->search, expression, error);
-	CAMEL_GROUPWISE_FOLDER_UNLOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_UNLOCK (gw_folder, search_lock);
 
 	return matches;
 }
 
 static GPtrArray *
-groupwise_folder_search_by_uids(CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
+groupwise_folder_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
 {
-	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 	GPtrArray *matches;
 
 	if (uids->len == 0)
-		return g_ptr_array_new();
+		return g_ptr_array_new ();
 
-	CAMEL_GROUPWISE_FOLDER_LOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_LOCK (gw_folder, search_lock);
 
-	camel_folder_search_set_folder(gw_folder->search, folder);
-	matches = camel_folder_search_search(gw_folder->search, expression, uids, error);
+	camel_folder_search_set_folder (gw_folder->search, folder);
+	matches = camel_folder_search_search (gw_folder->search, expression, uids, error);
 
-	CAMEL_GROUPWISE_FOLDER_UNLOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_UNLOCK (gw_folder, search_lock);
 
 	return matches;
 }
@@ -575,15 +575,15 @@ groupwise_folder_search_by_uids(CamelFolder *folder, const gchar *expression, GP
 static void
 groupwise_folder_search_free (CamelFolder *folder, GPtrArray *uids)
 {
-	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	CamelGroupwiseFolder *gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 
 	g_return_if_fail (gw_folder->search);
 
-	CAMEL_GROUPWISE_FOLDER_LOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_LOCK (gw_folder, search_lock);
 
 	camel_folder_search_free_result (gw_folder->search, uids);
 
-	CAMEL_GROUPWISE_FOLDER_UNLOCK(gw_folder, search_lock);
+	CAMEL_GROUPWISE_FOLDER_UNLOCK (gw_folder, search_lock);
 
 }
 
@@ -608,7 +608,7 @@ update_junk_list (CamelStore *store, CamelMessageInfo *info, gint flag)
 {
 	gchar **email = NULL, *from = NULL;
 	gint index = 0;
-	CamelGroupwiseStore *gw_store= CAMEL_GROUPWISE_STORE(store);
+	CamelGroupwiseStore *gw_store= CAMEL_GROUPWISE_STORE (store);
 	CamelGroupwiseStorePrivate  *priv = gw_store->priv;
 	EGwConnection *cnc = cnc_lookup (priv);
 	EGwConnectionStatus status;
@@ -860,22 +860,22 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_
 		flags = camel_message_info_flags (info);
 
 		if (!(flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
-				camel_message_info_free(info);
+				camel_message_info_free (info);
 				continue;
 		}
 
-		if ((flags & CAMEL_MESSAGE_JUNK) && strcmp(camel_folder_get_name(folder), JUNK_FOLDER)) {
+		if ((flags & CAMEL_MESSAGE_JUNK) && strcmp (camel_folder_get_name (folder), JUNK_FOLDER)) {
 			/*marked a message junk*/
 			move_to_junk (folder, info, error);
-			camel_folder_summary_remove_uid (folder->summary, camel_message_info_uid(info));
+			camel_folder_summary_remove_uid (folder->summary, camel_message_info_uid (info));
 			camel_data_cache_remove (gw_folder->cache, "cache", camel_message_info_uid(info), NULL);
 			continue;
 		}
 
-		if ((flags & CAMEL_GW_MESSAGE_NOJUNK) && !strcmp(camel_folder_get_name(folder), JUNK_FOLDER)) {
+		if ((flags & CAMEL_GW_MESSAGE_NOJUNK) && !strcmp (camel_folder_get_name (folder), JUNK_FOLDER)) {
 			/*message was marked as junk, now unjunk*/
 			move_to_mailbox (folder, info, error);
-			camel_folder_summary_remove_uid (folder->summary, camel_message_info_uid(info));
+			camel_folder_summary_remove_uid (folder->summary, camel_message_info_uid (info));
 			camel_data_cache_remove (gw_folder->cache, "cache", camel_message_info_uid(info), NULL);
 			continue;
 		}
@@ -888,7 +888,7 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_
 
 			/* weed out flag changes that we can't sync to the server */
 			if (!diff.changed) {
-				camel_message_info_free(info);
+				camel_message_info_free (info);
 				continue;
 			} else {
 				const gchar *uid;
@@ -1040,7 +1040,7 @@ groupwise_sync (CamelFolder *folder, gboolean expunge, CamelMessageInfo *update_
 }
 
 CamelFolder *
-camel_gw_folder_new(CamelStore *store, const gchar *folder_name, const gchar *folder_dir, GError **error)
+camel_gw_folder_new (CamelStore *store, const gchar *folder_name, const gchar *folder_dir, GError **error)
 {
 	CamelFolder *folder;
 	CamelGroupwiseFolder *gw_folder;
@@ -1058,11 +1058,11 @@ camel_gw_folder_new(CamelStore *store, const gchar *folder_name, const gchar *fo
 		"name", short_name, "full-name", folder_name,
 		"parent_store", store, NULL);
 
-	gw_folder = CAMEL_GROUPWISE_FOLDER(folder);
+	gw_folder = CAMEL_GROUPWISE_FOLDER (folder);
 
 	summary_file = g_strdup_printf ("%s/summary",folder_dir);
-	folder->summary = camel_groupwise_summary_new(folder, summary_file);
-	g_free(summary_file);
+	folder->summary = camel_groupwise_summary_new (folder, summary_file);
+	g_free (summary_file);
 	if (!folder->summary) {
 		g_object_unref (CAMEL_OBJECT (folder));
 		g_set_error (
@@ -1074,7 +1074,7 @@ camel_gw_folder_new(CamelStore *store, const gchar *folder_name, const gchar *fo
 	/* set/load persistent state */
 	state_file = g_strdup_printf ("%s/cmeta", folder_dir);
 	camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
-	g_free(state_file);
+	g_free (state_file);
 	camel_object_state_read (CAMEL_OBJECT (folder));
 
 	gw_folder->cache = camel_data_cache_new (folder_dir, error);
@@ -1244,7 +1244,7 @@ static CamelSessionThreadOps update_ops = {
 };
 
 static gboolean
-groupwise_refresh_info(CamelFolder *folder, GError **error)
+groupwise_refresh_info (CamelFolder *folder, GError **error)
 {
 	CamelGroupwiseSummary *summary = (CamelGroupwiseSummary *) folder->summary;
 	CamelStoreInfo *si;
@@ -1263,7 +1263,7 @@ groupwise_refresh_info(CamelFolder *folder, GError **error)
 	 * should not interfere with the process
 	 */
 	if (summary->time_string && (strlen (summary->time_string) > 0))  {
-		groupwise_refresh_folder(folder, error);
+		groupwise_refresh_folder (folder, error);
 		si = camel_store_summary_path ((CamelStoreSummary *)((CamelGroupwiseStore *)parent_store)->summary, full_name);
 		if (si) {
 			guint32 unread, total;
@@ -1375,7 +1375,7 @@ update_summary_string (CamelFolder *folder, const gchar *time_string)
 }
 
 static void
-groupwise_refresh_folder(CamelFolder *folder, GError **error)
+groupwise_refresh_folder (CamelFolder *folder, GError **error)
 {
 	CamelGroupwiseStore *gw_store;
 	CamelGroupwiseFolder *gw_folder;
@@ -1443,7 +1443,7 @@ groupwise_refresh_folder(CamelFolder *folder, GError **error)
 	if (!is_proxy) {
 		const gchar *source;
 
-		if (!strcmp (full_name, RECEIVED) || !strcmp(full_name, SENT)) {
+		if (!strcmp (full_name, RECEIVED) || !strcmp (full_name, SENT)) {
 			source = NULL;
 		} else {
 			source = "sent received";
@@ -1530,7 +1530,7 @@ groupwise_refresh_folder(CamelFolder *folder, GError **error)
 	 */
 	/*create a new session thread for the update all operation*/
 	if (sync_deleted || is_proxy) {
-		msg = camel_session_thread_msg_new (session, &update_ops, sizeof(*msg));
+		msg = camel_session_thread_msg_new (session, &update_ops, sizeof (*msg));
 		msg->cnc = cnc;
 		msg->t_str = g_strdup (old_sync_time);
 		msg->container_id = g_strdup (container_id);
@@ -1586,9 +1586,9 @@ groupwise_folder_set_threading_data (CamelGroupwiseMessageInfo *mi, EGwItem *ite
 		return;
 
 	/* set message id */
-	msgid = camel_header_msgid_decode(message_id);
+	msgid = camel_header_msgid_decode (message_id);
 	digest = get_md5_digest ((const guchar *)msgid);
-	memcpy(mi->info.message_id.id.hash, digest, sizeof(mi->info.message_id.id.hash));
+	memcpy (mi->info.message_id.id.hash, digest, sizeof (mi->info.message_id.id.hash));
 	g_free (msgid);
 
 	parent_threads = e_gw_item_get_parent_thread_ids (item);
@@ -1597,21 +1597,21 @@ groupwise_folder_set_threading_data (CamelGroupwiseMessageInfo *mi, EGwItem *ite
 		return;
 
 	refs = camel_header_references_decode (parent_threads);
-	count = camel_header_references_list_size(&refs);
-	mi->info.references = g_malloc(sizeof(*mi->info.references) + ((count-1) * sizeof(mi->info.references->references[0])));
+	count = camel_header_references_list_size (&refs);
+	mi->info.references = g_malloc (sizeof (*mi->info.references) + ((count-1) * sizeof (mi->info.references->references[0])));
 	scan = refs;
 	count = 0;
 
 	while (scan) {
 		digest = get_md5_digest ((const guchar *) scan->id);
-		memcpy(mi->info.references->references[count].id.hash, digest, sizeof(mi->info.message_id.id.hash));
+		memcpy (mi->info.references->references[count].id.hash, digest, sizeof (mi->info.message_id.id.hash));
 
 		count++;
 		scan = scan->next;
 	}
 
 	mi->info.references->size = count;
-	camel_header_references_list_clear(&refs);
+	camel_header_references_list_clear (&refs);
 }
 
 /* Update the GroupWise cache with the list of items passed. should happen in thread. */
@@ -1797,7 +1797,7 @@ gw_update_cache (CamelFolder *folder, GList *list, GError **error, gboolean uid_
 				}
 			}
 			if (exists)
-				camel_pstring_free(mi->info.to);
+				camel_pstring_free (mi->info.to);
 			mi->info.to = camel_pstring_strdup (str_to->str);
 			mi->info.cc = camel_pstring_strdup (str_cc->str);
 
@@ -1821,9 +1821,9 @@ gw_update_cache (CamelFolder *folder, GList *list, GError **error, gboolean uid_
 			camel_folder_change_info_change_uid (changes, mi->info.uid);
 			camel_message_info_free (pmi);
 		} else {
-			mi->info.uid = camel_pstring_strdup (e_gw_item_get_id(item));
+			mi->info.uid = camel_pstring_strdup (e_gw_item_get_id (item));
 			mi->info.size = e_gw_item_get_mail_size (item);
-			mi->info.subject = camel_pstring_strdup(e_gw_item_get_subject(item));
+			mi->info.subject = camel_pstring_strdup (e_gw_item_get_subject (item));
 			groupwise_folder_set_threading_data (mi, item);
 
 			camel_folder_summary_add (folder->summary,(CamelMessageInfo *)mi);
@@ -2051,10 +2051,10 @@ gw_update_summary (CamelFolder *folder, GList *list,GError **error)
 		} else
 			groupwise_set_mail_mi_dates (mi, item);
 
-		mi->info.uid = camel_pstring_strdup(e_gw_item_get_id(item));
+		mi->info.uid = camel_pstring_strdup (e_gw_item_get_id (item));
 		if (!exists)
 			mi->info.size = e_gw_item_get_mail_size (item);
-		mi->info.subject = camel_pstring_strdup(e_gw_item_get_subject(item));
+		mi->info.subject = camel_pstring_strdup (e_gw_item_get_subject (item));
 		groupwise_folder_set_threading_data (mi, item);
 
 		if (exists) {
@@ -2077,7 +2077,7 @@ gw_update_summary (CamelFolder *folder, GList *list,GError **error)
 }
 
 static CamelMimeMessage *
-groupwise_folder_item_to_msg( CamelFolder *folder,
+groupwise_folder_item_to_msg ( CamelFolder *folder,
 		EGwItem *item,
 		GError **error )
 {
@@ -2105,7 +2105,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 
 	gw_store = CAMEL_GROUPWISE_STORE (parent_store);
 
-	uid = e_gw_item_get_id(item);
+	uid = e_gw_item_get_id (item);
 	cnc = cnc_lookup (gw_store->priv);
 	container_id = camel_groupwise_store_container_id_lookup (gw_store, full_name);
 
@@ -2165,7 +2165,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 									gsize len_iter = 0;
 									gchar *temp = NULL;
 
-									temp = (gchar *) g_base64_decode(t_attach, &len_iter);
+									temp = (gchar *) g_base64_decode (t_attach, &len_iter);
 									gstr = g_string_append_len (gstr, temp, len_iter);
 									g_free (temp);
 									len += len_iter;
@@ -2297,13 +2297,13 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 					g_warning ("Could not get attachment\n");
 					continue;
 				}
-				temp_msg = groupwise_folder_item_to_msg(folder, temp_item, error);
+				temp_msg = groupwise_folder_item_to_msg (folder, temp_item, error);
 				if (temp_msg) {
 					CamelContentType *ct = camel_content_type_new("message", "rfc822");
 					part = camel_mime_part_new ();
-					camel_data_wrapper_set_mime_type_field(CAMEL_DATA_WRAPPER (temp_msg), ct);
-					camel_content_type_unref(ct);
-					camel_medium_set_content (CAMEL_MEDIUM (part),CAMEL_DATA_WRAPPER(temp_msg));
+					camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (temp_msg), ct);
+					camel_content_type_unref (ct);
+					camel_medium_set_content (CAMEL_MEDIUM (part),CAMEL_DATA_WRAPPER (temp_msg));
 
 					camel_multipart_add_part (multipart,part);
 					g_object_unref (temp_msg);
@@ -2327,7 +2327,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 								gsize len_iter = 0;
 								gchar *temp = NULL;
 
-								temp = (gchar *) g_base64_decode(t_attach, &len_iter);
+								temp = (gchar *) g_base64_decode (t_attach, &len_iter);
 								gstr = g_string_append_len (gstr, temp, len_iter);
 								g_free (temp);
 								len += len_iter;
@@ -2354,7 +2354,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 					part = camel_mime_part_new ();
 					/*multiparts*/
 					if (is_text_html_embed) {
-						camel_mime_part_set_filename(part, g_strdup(attach->name));
+						camel_mime_part_set_filename (part, g_strdup (attach->name));
 						camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart), "multipart/related");
 						has_boundary = TRUE;
 						camel_content_type_set_param(CAMEL_DATA_WRAPPER (multipart)->mime_type, "type", "multipart/alternative");
@@ -2369,7 +2369,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 							camel_mime_part_set_content_location (part, attach->name);
 						}
 					} else {
-						camel_mime_part_set_filename(part, g_strdup(attach->name));
+						camel_mime_part_set_filename (part, g_strdup (attach->name));
 						camel_mime_part_set_content_id (part, attach->contentid);
 					}
 
@@ -2377,7 +2377,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 					if (attach->contentType) {
 						if (is_base64_encoded)
 							camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BASE64);
-						camel_mime_part_set_content(part, attachment, len, attach->contentType);
+						camel_mime_part_set_content (part, attachment, len, attach->contentType);
 						camel_content_type_set_param (((CamelDataWrapper *) part)->mime_type, "name", attach->name);
 					} else {
 							camel_mime_part_set_content(part, attachment, len, "text/plain");
@@ -2385,7 +2385,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 					if (!has_boundary)
 						camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart),"multipart/digest");
 
-					camel_multipart_set_boundary(multipart, NULL);
+					camel_multipart_set_boundary (multipart, NULL);
 					camel_multipart_add_part (multipart, part);
 
 					g_object_unref (part);
@@ -2404,7 +2404,7 @@ groupwise_folder_item_to_msg( CamelFolder *folder,
 	if (e_gw_item_get_security (item))
 		camel_medium_add_header ( CAMEL_MEDIUM (msg), "Security", e_gw_item_get_security(item));
 
-	camel_medium_set_content (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER(multipart));
+	camel_medium_set_content (CAMEL_MEDIUM (msg), CAMEL_DATA_WRAPPER (multipart));
 	g_object_unref (multipart);
 
 end:
@@ -2665,7 +2665,7 @@ groupwise_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
 				break;
 
 			if (delete_originals) {
-				if (!strcmp(source_full_name, SENT)) {
+				if (!strcmp (source_full_name, SENT)) {
 					g_set_error (
 						error, CAMEL_SERVICE_ERROR,
 						CAMEL_SERVICE_ERROR_UNAVAILABLE,
@@ -3004,8 +3004,8 @@ camel_groupwise_folder_init (CamelGroupwiseFolder *gw_folder)
 	folder->folder_flags = CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY | CAMEL_FOLDER_HAS_SEARCH_CAPABILITY;
 
 #ifdef ENABLE_THREADS
-	g_static_mutex_init(&gw_folder->priv->search_lock);
-	g_static_rec_mutex_init(&gw_folder->priv->cache_lock);
+	g_static_mutex_init (&gw_folder->priv->search_lock);
+	g_static_rec_mutex_init (&gw_folder->priv->cache_lock);
 #endif
 
 	gw_folder->need_rescan = TRUE;
@@ -3052,7 +3052,7 @@ convert_to_calendar (EGwItem *item, gchar **str, gint *len)
 			if (*temp == '\n')
 				g_string_append(gstr, "\\n");
 			else
-				g_string_append_c(gstr, *temp);
+				g_string_append_c (gstr, *temp);
 			temp++;
 		}
 		g_string_append(gstr, "\n");
@@ -3144,7 +3144,7 @@ convert_to_task (EGwItem *item, gchar **str, gint *len)
 			if (*temp == '\n')
 				g_string_append(gstr, "\\n");
 			else
-				g_string_append_c(gstr, *temp);
+				g_string_append_c (gstr, *temp);
 			temp++;
 		}
 		g_string_append(gstr, "\n");
@@ -3229,7 +3229,7 @@ convert_to_note (EGwItem *item, gchar **str, gint *len)
 			if (*temp == '\n')
 				g_string_append(gstr, "\\n");
 			else
-				g_string_append_c(gstr, *temp);
+				g_string_append_c (gstr, *temp);
 			temp++;
 		}
 		g_string_append(gstr, "\n");
diff --git a/camel/providers/groupwise/camel-groupwise-folder.h b/camel/providers/groupwise/camel-groupwise-folder.h
index 1480b57..f8c5c8c 100644
--- a/camel/providers/groupwise/camel-groupwise-folder.h
+++ b/camel/providers/groupwise/camel-groupwise-folder.h
@@ -78,7 +78,7 @@ struct _CamelGroupwiseFolderClass {
 GType camel_groupwise_folder_get_type (void);
 
 /* implemented */
-CamelFolder * camel_gw_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *folder_name, GError **error);
+CamelFolder * camel_gw_folder_new (CamelStore *store, const gchar *folder_dir, const gchar *folder_name, GError **error);
 void gw_update_summary ( CamelFolder *folder, GList *item_list,GError **error);
 
 G_END_DECLS
diff --git a/camel/providers/groupwise/camel-groupwise-journal.c b/camel/providers/groupwise/camel-groupwise-journal.c
index e4c4e55..1734d9e 100644
--- a/camel/providers/groupwise/camel-groupwise-journal.c
+++ b/camel/providers/groupwise/camel-groupwise-journal.c
@@ -328,7 +328,7 @@ update_cache (CamelGroupwiseJournal *groupwise_journal, CamelMimeMessage *messag
 	g_object_unref (cache);
 
 	info = camel_folder_summary_info_new_from_message (folder->summary, message, NULL);
-	camel_pstring_free(info->uid);
+	camel_pstring_free (info->uid);
 	info->uid = camel_pstring_strdup (uid);
 
 	gw_message_info_dup_to ((CamelMessageInfoBase *) info, (CamelMessageInfoBase *) mi);
diff --git a/camel/providers/groupwise/camel-groupwise-private.h b/camel/providers/groupwise/camel-groupwise-private.h
index 580a0a3..6c06de6 100644
--- a/camel/providers/groupwise/camel-groupwise-private.h
+++ b/camel/providers/groupwise/camel-groupwise-private.h
@@ -31,13 +31,13 @@
 
 #ifdef ENABLE_THREADS
 #define CAMEL_GROUPWISE_FOLDER_LOCK(f, l) \
-	(g_static_mutex_lock(&((CamelGroupwiseFolder *)f)->priv->l))
+	(g_static_mutex_lock (&((CamelGroupwiseFolder *)f)->priv->l))
 #define CAMEL_GROUPWISE_FOLDER_UNLOCK(f, l) \
-	(g_static_mutex_unlock(&((CamelGroupwiseFolder *)f)->priv->l))
+	(g_static_mutex_unlock (&((CamelGroupwiseFolder *)f)->priv->l))
 #define CAMEL_GROUPWISE_FOLDER_REC_LOCK(f, l) \
-	(g_static_rec_mutex_lock(&((CamelGroupwiseFolder *)f)->priv->l))
+	(g_static_rec_mutex_lock (&((CamelGroupwiseFolder *)f)->priv->l))
 #define CAMEL_GROUPWISE_FOLDER_REC_UNLOCK(f, l) \
-	(g_static_rec_mutex_unlock(&((CamelGroupwiseFolder *)f)->priv->l))
+	(g_static_rec_mutex_unlock (&((CamelGroupwiseFolder *)f)->priv->l))
 #else
 #define GROUPWISE_FOLDER_LOCK(f, l)
 #define GROUPWISE_FOLDER_UNLOCK(f, l)
diff --git a/camel/providers/groupwise/camel-groupwise-provider.c b/camel/providers/groupwise/camel-groupwise-provider.c
index f36f2aa..bace758 100644
--- a/camel/providers/groupwise/camel-groupwise-provider.c
+++ b/camel/providers/groupwise/camel-groupwise-provider.c
@@ -117,7 +117,7 @@ groupwise_auto_detect_cb (CamelURL *url, GHashTable **auto_detected,
 }
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	CamelProvider *imap_provider = NULL;
 	gboolean use_imap = g_getenv ("USE_IMAP") != NULL;
diff --git a/camel/providers/groupwise/camel-groupwise-store-summary.c b/camel/providers/groupwise/camel-groupwise-store-summary.c
index 5a11391..ae11154 100644
--- a/camel/providers/groupwise/camel-groupwise-store-summary.c
+++ b/camel/providers/groupwise/camel-groupwise-store-summary.c
@@ -37,18 +37,18 @@
 
 #define d(x)
 
-static void namespace_clear(CamelStoreSummary *s);
+static void namespace_clear (CamelStoreSummary *s);
 
-static gint summary_header_load(CamelStoreSummary *, FILE *);
-static gint summary_header_save(CamelStoreSummary *, FILE *);
+static gint summary_header_load (CamelStoreSummary *, FILE *);
+static gint summary_header_save (CamelStoreSummary *, FILE *);
 
-static CamelStoreInfo *store_info_load(CamelStoreSummary *s, FILE *in);
-static gint store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi);
-static void store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi);
-static void store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str);
+static CamelStoreInfo *store_info_load (CamelStoreSummary *s, FILE *in);
+static gint store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi);
+static void store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi);
+static void store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str);
 
-static const gchar *store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type);
-CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_find_full(CamelGroupwiseStoreSummary *s, const gchar *full);
+static const gchar *store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type);
+CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_find_full (CamelGroupwiseStoreSummary *s, const gchar *full);
 
 G_DEFINE_TYPE (CamelGroupwiseStoreSummary, camel_groupwise_store_summary, CAMEL_TYPE_STORE_SUMMARY)
 
@@ -83,18 +83,18 @@ camel_groupwise_store_summary_new (void)
 }
 
 CamelGroupwiseStoreInfo *
-camel_groupwise_store_summary_full_name(CamelGroupwiseStoreSummary *s, const gchar *full_name)
+camel_groupwise_store_summary_full_name (CamelGroupwiseStoreSummary *s, const gchar *full_name)
 {
 	gint count, i;
 	CamelGroupwiseStoreInfo *info;
 
-	count = camel_store_summary_count((CamelStoreSummary *)s);
+	count = camel_store_summary_count ((CamelStoreSummary *)s);
 	for (i=0;i<count;i++) {
-		info = (CamelGroupwiseStoreInfo *)camel_store_summary_index((CamelStoreSummary *)s, i);
+		info = (CamelGroupwiseStoreInfo *)camel_store_summary_index ((CamelStoreSummary *)s, i);
 		if (info) {
-			if (strcmp(info->full_name, full_name) == 0)
+			if (strcmp (info->full_name, full_name) == 0)
 				return info;
-			camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+			camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		}
 	}
 
@@ -102,14 +102,14 @@ camel_groupwise_store_summary_full_name(CamelGroupwiseStoreSummary *s, const gch
 }
 
 gchar *
-camel_groupwise_store_summary_full_to_path(CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_groupwise_store_summary_full_to_path (CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	gchar *path, *p;
 	gint c;
 	const gchar *f;
 
 	if (dir_sep != '/') {
-		p = path = alloca(strlen(full_name)*3+1);
+		p = path = alloca (strlen (full_name)*3+1);
 		f = full_name;
 		while ((c = *f++ & 0xff)) {
 			if (c == dir_sep)
@@ -125,7 +125,7 @@ camel_groupwise_store_summary_full_to_path(CamelGroupwiseStoreSummary *s, const
 
 	return g_strdup (path);
 }
-static guint32 hexnib(guint32 c)
+static guint32 hexnib (guint32 c)
 {
 	if (c >= '0' && c <= '9')
 		return c-'0';
@@ -136,45 +136,45 @@ static guint32 hexnib(guint32 c)
 }
 
 static gint
-namespace_save(CamelStoreSummary *s, FILE *in, CamelGroupwiseStoreNamespace *ns)
+namespace_save (CamelStoreSummary *s, FILE *in, CamelGroupwiseStoreNamespace *ns)
 {
-	if (camel_file_util_encode_string(in, ns->path) == -1
-			|| camel_file_util_encode_string(in, ns->full_name) == -1
-			|| camel_file_util_encode_uint32(in, (guint32)ns->sep) == -1)
+	if (camel_file_util_encode_string (in, ns->path) == -1
+			|| camel_file_util_encode_string (in, ns->full_name) == -1
+			|| camel_file_util_encode_uint32 (in, (guint32)ns->sep) == -1)
 		return -1;
 
 	return 0;
 }
 
 static void
-namespace_free(CamelStoreSummary *s, CamelGroupwiseStoreNamespace *ns)
+namespace_free (CamelStoreSummary *s, CamelGroupwiseStoreNamespace *ns)
 {
-	g_free(ns->path);
-	g_free(ns->full_name);
-	g_free(ns);
+	g_free (ns->path);
+	g_free (ns->full_name);
+	g_free (ns);
 }
 
 static void
-namespace_clear(CamelStoreSummary *s)
+namespace_clear (CamelStoreSummary *s)
 {
 	CamelGroupwiseStoreSummary *is = (CamelGroupwiseStoreSummary *)s;
 
 	if (is->namespace)
-		namespace_free(s, is->namespace);
+		namespace_free (s, is->namespace);
 	is->namespace = NULL;
 }
 
 static CamelGroupwiseStoreNamespace *
-namespace_load(CamelStoreSummary *s, FILE *in)
+namespace_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelGroupwiseStoreNamespace *ns;
 	guint32 sep = '/';
 
-	ns = g_malloc0(sizeof(*ns));
-	if (camel_file_util_decode_string(in, &ns->path) == -1
-			|| camel_file_util_decode_string(in, &ns->full_name) == -1
-			|| camel_file_util_decode_uint32(in, &sep) == -1) {
-		namespace_free(s, ns);
+	ns = g_malloc0 (sizeof (*ns));
+	if (camel_file_util_decode_string (in, &ns->path) == -1
+			|| camel_file_util_decode_string (in, &ns->full_name) == -1
+			|| camel_file_util_decode_uint32 (in, &sep) == -1) {
+		namespace_free (s, ns);
 		ns = NULL;
 	} else {
 		ns->sep = sep;
@@ -184,7 +184,7 @@ namespace_load(CamelStoreSummary *s, FILE *in)
 }
 
 gchar *
-camel_groupwise_store_summary_path_to_full(CamelGroupwiseStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_groupwise_store_summary_path_to_full (CamelGroupwiseStoreSummary *s, const gchar *path, gchar dir_sep)
 {
 	gchar *full, *f;
 	guint32 c, v = 0;
@@ -195,35 +195,35 @@ camel_groupwise_store_summary_path_to_full(CamelGroupwiseStoreSummary *s, const
 	CamelGroupwiseStoreNamespace *ns;
 
 	/* check to see if we have a subpath of path already defined */
-	subpath = alloca(strlen(path)+1);
-	strcpy(subpath, path);
+	subpath = alloca (strlen (path)+1);
+	strcpy (subpath, path);
 	do {
-		si = camel_store_summary_path((CamelStoreSummary *)s, subpath);
+		si = camel_store_summary_path ((CamelStoreSummary *)s, subpath);
 		if (si == NULL) {
-			last = strrchr(subpath, '/');
+			last = strrchr (subpath, '/');
 			if (last)
 				*last = 0;
 		}
 	} while (si == NULL && last);
 
 	/* path is already present, use the raw version we have */
-	if (si && strlen(subpath) == strlen(path)) {
-		f = g_strdup(camel_groupwise_store_info_full_name(s, si));
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+	if (si && strlen (subpath) == strlen (path)) {
+		f = g_strdup (camel_groupwise_store_info_full_name (s, si));
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		return f;
 	}
 
-	ns = camel_groupwise_store_summary_namespace_find_path(s, path);
+	ns = camel_groupwise_store_summary_namespace_find_path (s, path);
 
-	f = full = alloca(strlen(path)*2+1);
+	f = full = alloca (strlen (path)*2+1);
 	if (si)
-		p = path + strlen(subpath);
+		p = path + strlen (subpath);
 	else if (ns)
-		p = path + strlen(ns->path);
+		p = path + strlen (ns->path);
 	else
 		p = path;
 
-	while ((c = camel_utf8_getc((const guchar **)&p))) {
+	while ((c = camel_utf8_getc ((const guchar **)&p))) {
 		switch (state) {
 			case 0:
 				if (c == '%')
@@ -231,39 +231,39 @@ camel_groupwise_store_summary_path_to_full(CamelGroupwiseStoreSummary *s, const
 				else {
 					if (c == '/')
 						c = dir_sep;
-					camel_utf8_putc((guchar **) &f, c);
+					camel_utf8_putc ((guchar **) &f, c);
 				}
 				break;
 			case 1:
 				state = 2;
-				v = hexnib(c)<<4;
+				v = hexnib (c)<<4;
 				break;
 			case 2:
 				state = 0;
-				v |= hexnib(c);
-				camel_utf8_putc((guchar **) &f, v);
+				v |= hexnib (c);
+				camel_utf8_putc ((guchar **) &f, v);
 				break;
 		}
 	}
-	camel_utf8_putc((guchar **) &f, c);
+	camel_utf8_putc ((guchar **) &f, c);
 
 	/* merge old path part if required */
 	f = g_strdup (full);
 	if (si) {
 		full = g_strdup_printf("%s%s", camel_groupwise_store_info_full_name(s, si), f);
-		g_free(f);
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+		g_free (f);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		f = full;
 	} else if (ns) {
 		full = g_strdup_printf("%s%s", ns->full_name, f);
-		g_free(f);
+		g_free (f);
 		f = full;
 	}
 	return f;
 }
 
 CamelGroupwiseStoreNamespace *
-camel_groupwise_store_summary_namespace_find_full(CamelGroupwiseStoreSummary *s, const gchar *full)
+camel_groupwise_store_summary_namespace_find_full (CamelGroupwiseStoreSummary *s, const gchar *full)
 {
 	gint len;
 	CamelGroupwiseStoreNamespace *ns;
@@ -271,10 +271,10 @@ camel_groupwise_store_summary_namespace_find_full(CamelGroupwiseStoreSummary *s,
 	/* NB: this currently only compares against 1 namespace, in future compare against others */
 	ns = s->namespace;
 	while (ns) {
-		len = strlen(ns->full_name);
+		len = strlen (ns->full_name);
 		d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
 		if (len == 0
-				|| (strncmp(ns->full_name, full, len) == 0
+				|| (strncmp (ns->full_name, full, len) == 0
 					&& (full[len] == ns->sep || full[len] == 0)))
 			break;
 		ns = NULL;
@@ -285,7 +285,7 @@ camel_groupwise_store_summary_namespace_find_full(CamelGroupwiseStoreSummary *s,
 }
 
 CamelGroupwiseStoreInfo *
-camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_groupwise_store_summary_add_from_full (CamelGroupwiseStoreSummary *s, const gchar *full, gchar dir_sep)
 {
 	CamelGroupwiseStoreInfo *info;
 	gchar *pathu8, *prefix;
@@ -295,30 +295,30 @@ camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const
 
 	d(printf("adding full name '%s' '%c'\n", full, dir_sep));
 
-	len = strlen(full);
-	full_name = alloca(len+1);
-	strcpy(full_name, full);
+	len = strlen (full);
+	full_name = alloca (len+1);
+	strcpy (full_name, full);
 	if (full_name[len-1] == dir_sep)
 		full_name[len-1] = 0;
 
-	info = camel_groupwise_store_summary_full_name(s, full_name);
+	info = camel_groupwise_store_summary_full_name (s, full_name);
 	if (info) {
-		camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		d(printf("  already there\n"));
 		return info;
 	}
 
-	ns = camel_groupwise_store_summary_namespace_find_full(s, full_name);
+	ns = camel_groupwise_store_summary_namespace_find_full (s, full_name);
 	if (ns) {
 		d(printf("(found namespace for '%s' ns '%s') ", full_name, ns->path));
-		len = strlen(ns->full_name);
-		if (len >= strlen(full_name)) {
-			pathu8 = g_strdup(ns->path);
+		len = strlen (ns->full_name);
+		if (len >= strlen (full_name)) {
+			pathu8 = g_strdup (ns->path);
 		} else {
 			if (full_name[len] == ns->sep)
 				len++;
 
-			prefix = camel_groupwise_store_summary_full_to_path(s, full_name+len, ns->sep);
+			prefix = camel_groupwise_store_summary_full_to_path (s, full_name+len, ns->sep);
 			if (*ns->path) {
 				pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
 				g_free (prefix);
@@ -329,13 +329,13 @@ camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const
 		d(printf(" (pathu8 = '%s')", pathu8));
 	} else {
 		d(printf("(Cannot find namespace for '%s')\n", full_name));
-		pathu8 = camel_groupwise_store_summary_full_to_path(s, full_name, dir_sep);
+		pathu8 = camel_groupwise_store_summary_full_to_path (s, full_name, dir_sep);
 	}
 
-	info = (CamelGroupwiseStoreInfo *)camel_store_summary_add_from_path((CamelStoreSummary *)s, pathu8);
+	info = (CamelGroupwiseStoreInfo *)camel_store_summary_add_from_path ((CamelStoreSummary *)s, pathu8);
 	if (info) {
 		d(printf("  '%s' -> '%s'\n", pathu8, full_name));
-		camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_STORE_INFO_LAST, full_name);
+		camel_store_info_set_string ((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_STORE_INFO_LAST, full_name);
 	} else {
 		d(printf("  failed\n"));
 	}
@@ -344,14 +344,14 @@ camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const
 }
 
 gchar *
-camel_groupwise_store_summary_full_from_path(CamelGroupwiseStoreSummary *s, const gchar *path)
+camel_groupwise_store_summary_full_from_path (CamelGroupwiseStoreSummary *s, const gchar *path)
 {
 	CamelGroupwiseStoreNamespace *ns;
 	gchar *name = NULL;
 
-	ns = camel_groupwise_store_summary_namespace_find_path(s, path);
+	ns = camel_groupwise_store_summary_namespace_find_path (s, path);
 	if (ns)
-		name = camel_groupwise_store_summary_path_to_full(s, path, ns->sep);
+		name = camel_groupwise_store_summary_path_to_full (s, path, ns->sep);
 
 	d(printf("looking up path %s -> %s\n", path, name?name:"not found"));
 
@@ -359,20 +359,20 @@ camel_groupwise_store_summary_full_from_path(CamelGroupwiseStoreSummary *s, cons
 }
 
 CamelGroupwiseStoreNamespace *
-camel_groupwise_store_summary_namespace_new(CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_groupwise_store_summary_namespace_new (CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	CamelGroupwiseStoreNamespace *ns;
 	gchar *p, *o, c;
 	gint len;
 
-	ns = g_malloc0(sizeof(*ns));
-	ns->full_name = g_strdup(full_name);
-	len = strlen(ns->full_name)-1;
+	ns = g_malloc0 (sizeof (*ns));
+	ns->full_name = g_strdup (full_name);
+	len = strlen (ns->full_name)-1;
 	if (len >= 0 && ns->full_name[len] == dir_sep)
 		ns->full_name[len] = 0;
 	ns->sep = dir_sep;
 
-	o = p = ns->path = camel_groupwise_store_summary_full_to_path(s, ns->full_name, dir_sep);
+	o = p = ns->path = camel_groupwise_store_summary_full_to_path (s, ns->full_name, dir_sep);
 	while ((c = *p++)) {
 		if (c != '#') {
 			if (c == '/')
@@ -386,16 +386,16 @@ camel_groupwise_store_summary_namespace_new(CamelGroupwiseStoreSummary *s, const
 }
 
 void
-camel_groupwise_store_summary_namespace_set(CamelGroupwiseStoreSummary *s, CamelGroupwiseStoreNamespace *ns)
+camel_groupwise_store_summary_namespace_set (CamelGroupwiseStoreSummary *s, CamelGroupwiseStoreNamespace *ns)
 {
 	d(printf("Setting namesapce to '%s' '%c' -> '%s'\n", ns->full_name, ns->sep, ns->path));
-	namespace_clear((CamelStoreSummary *)s);
+	namespace_clear ((CamelStoreSummary *)s);
 	s->namespace = ns;
-	camel_store_summary_touch((CamelStoreSummary *)s);
+	camel_store_summary_touch ((CamelStoreSummary *)s);
 }
 
 CamelGroupwiseStoreNamespace *
-camel_groupwise_store_summary_namespace_find_path(CamelGroupwiseStoreSummary *s, const gchar *path)
+camel_groupwise_store_summary_namespace_find_path (CamelGroupwiseStoreSummary *s, const gchar *path)
 {
 	gint len;
 	CamelGroupwiseStoreNamespace *ns;
@@ -403,9 +403,9 @@ camel_groupwise_store_summary_namespace_find_path(CamelGroupwiseStoreSummary *s,
 	/* NB: this currently only compares against 1 namespace, in future compare against others */
 	ns = s->namespace;
 	while (ns) {
-		len = strlen(ns->path);
+		len = strlen (ns->path);
 		if (len == 0
-				|| (strncmp(ns->path, path, len) == 0
+				|| (strncmp (ns->path, path, len) == 0
 					&& (path[len] == '/' || path[len] == 0)))
 			break;
 		ns = NULL;
@@ -416,7 +416,7 @@ camel_groupwise_store_summary_namespace_find_path(CamelGroupwiseStoreSummary *s,
 }
 
 static gint
-summary_header_load(CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelGroupwiseStoreSummary *summary = (CamelGroupwiseStoreSummary *)s;
 	 gint32 version, capabilities, count;
@@ -424,13 +424,13 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 	namespace_clear (s);
 
 	if (CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->summary_header_load ((CamelStoreSummary *)s, in) == -1
-			|| camel_file_util_decode_fixed_int32(in, &version) == -1)
+			|| camel_file_util_decode_fixed_int32 (in, &version) == -1)
 		return -1;
 
 	summary->version = version;
 
-	if (camel_file_util_decode_fixed_int32(in, &capabilities) == -1
-			|| camel_file_util_decode_fixed_int32(in, &count) == -1
+	if (camel_file_util_decode_fixed_int32 (in, &capabilities) == -1
+			|| camel_file_util_decode_fixed_int32 (in, &count) == -1
 			|| count > 1)
 		return -1;
 
@@ -443,33 +443,33 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 }
 
 static gint
-summary_header_save(CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s, FILE *out)
 {
 	CamelGroupwiseStoreSummary *summary = (CamelGroupwiseStoreSummary *) s;
 	guint32 count;
 
 	count = summary->namespace?1:0;
-	if (CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->summary_header_save((CamelStoreSummary *)s, out) == -1
-			|| camel_file_util_encode_fixed_int32(out, 0) == -1
-			|| camel_file_util_encode_fixed_int32(out, summary->capabilities) == -1
-			|| camel_file_util_encode_fixed_int32(out, count) == -1)
+	if (CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->summary_header_save ((CamelStoreSummary *)s, out) == -1
+			|| camel_file_util_encode_fixed_int32 (out, 0) == -1
+			|| camel_file_util_encode_fixed_int32 (out, summary->capabilities) == -1
+			|| camel_file_util_encode_fixed_int32 (out, count) == -1)
 		return -1;
 
-	if (summary->namespace && namespace_save(s, out, summary->namespace) == -1)
+	if (summary->namespace && namespace_save (s, out, summary->namespace) == -1)
 		return -1;
 
 	return 0;
 }
 
 static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelGroupwiseStoreInfo *si;
 
-	si = (CamelGroupwiseStoreInfo *)CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_load(s, in);
+	si = (CamelGroupwiseStoreInfo *)CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_load (s, in);
 	if (si) {
-		if (camel_file_util_decode_string(in, &si->full_name) == -1) {
-			camel_store_summary_info_free(s, (CamelStoreInfo *)si);
+		if (camel_file_util_decode_string (in, &si->full_name) == -1) {
+			camel_store_summary_info_free (s, (CamelStoreInfo *)si);
 			si = NULL;
 		}
 	}
@@ -478,28 +478,28 @@ store_info_load(CamelStoreSummary *s, FILE *in)
 }
 
 static gint
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
 {
 	CamelGroupwiseStoreInfo *summary = (CamelGroupwiseStoreInfo *)mi;
 
-	if (CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_save(s, out, mi) == -1
-			|| camel_file_util_encode_string(out, summary->full_name) == -1)
+	if (CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_save (s, out, mi) == -1
+			|| camel_file_util_encode_string (out, summary->full_name) == -1)
 		return -1;
 
 	return 0;
 }
 
 static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
 {
 	CamelGroupwiseStoreInfo *si = (CamelGroupwiseStoreInfo *)mi;
 
-	g_free(si->full_name);
-	CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_free(s, mi);
+	g_free (si->full_name);
+	CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_free (s, mi);
 }
 
 static const gchar *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 {
 	CamelGroupwiseStoreInfo *isi = (CamelGroupwiseStoreInfo *)mi;
 
@@ -511,27 +511,27 @@ store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 		case CAMEL_STORE_INFO_LAST:
 			return isi->full_name;
 		default:
-			return CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_string(s, mi, type);
+			return CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_string (s, mi, type);
 	}
 }
 
 static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
 {
 	CamelGroupwiseStoreInfo *isi = (CamelGroupwiseStoreInfo *)mi;
 
-	g_assert(mi != NULL);
+	g_assert (mi != NULL);
 
 	switch (type) {
 		case CAMEL_STORE_INFO_LAST:
 			d(printf("Set full name %s -> %s\n", isi->full_name, str));
 			camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-			g_free(isi->full_name);
-			isi->full_name = g_strdup(str);
+			g_free (isi->full_name);
+			isi->full_name = g_strdup (str);
 			camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 			break;
 		default:
-			CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_set_string(s, mi, type, str);
+			CAMEL_STORE_SUMMARY_CLASS (camel_groupwise_store_summary_parent_class)->store_info_set_string (s, mi, type, str);
 			break;
 	}
 }
diff --git a/camel/providers/groupwise/camel-groupwise-store-summary.h b/camel/providers/groupwise/camel-groupwise-store-summary.h
index 45eebf7..0dbdb6b 100644
--- a/camel/providers/groupwise/camel-groupwise-store-summary.h
+++ b/camel/providers/groupwise/camel-groupwise-store-summary.h
@@ -85,16 +85,16 @@ struct _CamelGroupwiseStoreSummaryClass {
 
 GType                        camel_groupwise_store_summary_get_type      (void);
 CamelGroupwiseStoreSummary      *camel_groupwise_store_summary_new        (void);
-CamelGroupwiseStoreInfo *camel_groupwise_store_summary_full_name(CamelGroupwiseStoreSummary *s, const gchar *full_name);
-CamelGroupwiseStoreInfo *camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const gchar *full, gchar dir_sep);
+CamelGroupwiseStoreInfo *camel_groupwise_store_summary_full_name (CamelGroupwiseStoreSummary *s, const gchar *full_name);
+CamelGroupwiseStoreInfo *camel_groupwise_store_summary_add_from_full (CamelGroupwiseStoreSummary *s, const gchar *full, gchar dir_sep);
 
-gchar *camel_groupwise_store_summary_full_to_path(CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep);
-gchar *camel_groupwise_store_summary_path_to_full(CamelGroupwiseStoreSummary *s, const gchar *path, gchar dir_sep);
-gchar *camel_groupwise_store_summary_full_from_path(CamelGroupwiseStoreSummary *s, const gchar *path);
+gchar *camel_groupwise_store_summary_full_to_path (CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep);
+gchar *camel_groupwise_store_summary_path_to_full (CamelGroupwiseStoreSummary *s, const gchar *path, gchar dir_sep);
+gchar *camel_groupwise_store_summary_full_from_path (CamelGroupwiseStoreSummary *s, const gchar *path);
 
-CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_new(CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep);
-CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_find_path(CamelGroupwiseStoreSummary *s, const gchar *path);
-void camel_groupwise_store_summary_namespace_set(CamelGroupwiseStoreSummary *s, CamelGroupwiseStoreNamespace *ns);
+CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_new (CamelGroupwiseStoreSummary *s, const gchar *full_name, gchar dir_sep);
+CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_find_path (CamelGroupwiseStoreSummary *s, const gchar *path);
+void camel_groupwise_store_summary_namespace_set (CamelGroupwiseStoreSummary *s, CamelGroupwiseStoreNamespace *ns);
 
 #define camel_groupwise_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_LAST))
 
diff --git a/camel/providers/groupwise/camel-groupwise-store.c b/camel/providers/groupwise/camel-groupwise-store.c
index 563117a..1dc4297 100644
--- a/camel/providers/groupwise/camel-groupwise-store.c
+++ b/camel/providers/groupwise/camel-groupwise-store.c
@@ -77,7 +77,7 @@ struct _CamelGroupwiseStorePrivate {
 extern CamelServiceAuthType camel_groupwise_password_authtype; /*for the query_auth_types function*/
 static CamelFolderInfo *convert_to_folder_info (CamelGroupwiseStore *store, EGwContainer *container, const gchar *url, GError **error);
 static gboolean groupwise_folders_sync (CamelGroupwiseStore *store, GError **error);
-static gint match_path(const gchar *path, const gchar *name);
+static gint match_path (const gchar *path, const gchar *name);
 
 G_DEFINE_TYPE (CamelGroupwiseStore, camel_groupwise_store, CAMEL_TYPE_OFFLINE_STORE)
 
@@ -133,7 +133,7 @@ groupwise_store_construct (CamelService *service, CamelSession *session,
 	property_value =  camel_url_get_param (url, "soap_port");
 	if (property_value == NULL)
 		priv->port = g_strdup ("7191");
-	else if (strlen(property_value) == 0)
+	else if (strlen (property_value) == 0)
 		priv->port = g_strdup ("7191");
 	else
 		priv->port = g_strdup (property_value);
@@ -215,7 +215,7 @@ groupwise_auth_loop (CamelService *service, GError **error)
 			priv->cnc = e_gw_connection_new (http_uri, priv->user, service->url->passwd);
 			g_free (http_uri);
 		}
-		if (!E_IS_GW_CONNECTION(priv->cnc)) {
+		if (!E_IS_GW_CONNECTION (priv->cnc)) {
 			if (errors.status == E_GW_CONNECTION_STATUS_INVALID_PASSWORD) {
 				/* We need to un-cache the password before prompting again */
 				prompt_flags |= CAMEL_SESSION_PASSWORD_REPROMPT;
@@ -246,13 +246,13 @@ check_for_connection (CamelService *service, GError **error)
 	struct addrinfo hints, *ai;
 	GError *local_error = NULL;
 
-	memset (&hints, 0, sizeof(hints));
+	memset (&hints, 0, sizeof (hints));
 	hints.ai_socktype = SOCK_STREAM;
 	hints.ai_family = PF_UNSPEC;
 	ai = camel_getaddrinfo(priv->server_name, "groupwise", &hints, &local_error);
 	if (ai == NULL && priv->port != NULL && g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
 		g_clear_error (&local_error);
-		ai = camel_getaddrinfo(priv->server_name, priv->port, &hints, &local_error);
+		ai = camel_getaddrinfo (priv->server_name, priv->port, &hints, &local_error);
 	}
 
 	if (ai == NULL) {
@@ -323,7 +323,7 @@ groupwise_connect (CamelService *service, GError **error)
 	((CamelOfflineStore *) store)->state = CAMEL_OFFLINE_STORE_NETWORK_AVAIL;
 
 	if (!e_gw_connection_get_version (priv->cnc)) {
-		camel_session_alert_user(session,
+		camel_session_alert_user (session,
 				CAMEL_SESSION_ALERT_WARNING,
 				_("Some features may not work correctly with your current server version"),
 				FALSE);
@@ -383,7 +383,7 @@ groupwise_disconnect_cleanup (CamelService *service, gboolean clean, GError **er
 		}
 
 		if (priv->storage_path)
-			g_free(priv->storage_path);
+			g_free (priv->storage_path);
 
 		if (groupwise_store->root_container)
 			g_free (groupwise_store->root_container);
@@ -450,33 +450,33 @@ groupwise_is_system_folder (const gchar *folder_name)
 
 /*Build/populate CamelFolderInfo structure based on the imap_build_folder_info function*/
 static CamelFolderInfo *
-groupwise_build_folder_info(CamelGroupwiseStore *gw_store, const gchar *parent_name, const gchar *folder_name)
+groupwise_build_folder_info (CamelGroupwiseStore *gw_store, const gchar *parent_name, const gchar *folder_name)
 {
 	CamelURL *url;
 	const gchar *name;
 	CamelFolderInfo *fi;
 	CamelGroupwiseStorePrivate *priv = gw_store->priv;
 
-	fi = camel_folder_info_new();
+	fi = camel_folder_info_new ();
 
 	fi->unread = -1;
 	fi->total = -1;
 
 	if (parent_name) {
-		if (strlen(parent_name) > 0)
+		if (strlen (parent_name) > 0)
 			fi->full_name = g_strconcat(parent_name, "/", folder_name, NULL);
 		else
 			fi->full_name = g_strdup (folder_name);
 	} else
-		fi->full_name = g_strdup(folder_name);
+		fi->full_name = g_strdup (folder_name);
 
-	url = camel_url_new(priv->base_url,NULL);
-	g_free(url->path);
+	url = camel_url_new (priv->base_url,NULL);
+	g_free (url->path);
 	url->path = g_strdup_printf("/%s", fi->full_name);
-	fi->uri = camel_url_to_string(url,CAMEL_URL_HIDE_ALL);
-	camel_url_free(url);
+	fi->uri = camel_url_to_string (url,CAMEL_URL_HIDE_ALL);
+	camel_url_free (url);
 
-	name = strrchr(fi->full_name,'/');
+	name = strrchr (fi->full_name,'/');
 	if (name == NULL)
 		name = fi->full_name;
 	else
@@ -493,7 +493,7 @@ groupwise_build_folder_info(CamelGroupwiseStore *gw_store, const gchar *parent_n
 	if (groupwise_is_system_folder (folder_name))
 		fi->flags |= CAMEL_FOLDER_SYSTEM;
 
-	fi->name = g_strdup(name);
+	fi->name = g_strdup (name);
 	return fi;
 }
 
@@ -511,8 +511,8 @@ groupwise_forget_folder (CamelGroupwiseStore *gw_store, const gchar *folder_name
 	storage_path = g_strdup_printf ("%s/folders", priv->storage_path);
 	folder_dir = e_path_to_physical (storage_path,folder_name);
 
-	if (g_access(folder_dir, F_OK) != 0) {
-		g_free(folder_dir);
+	if (g_access (folder_dir, F_OK) != 0) {
+		g_free (folder_dir);
 		return;
 	}
 
@@ -526,7 +526,7 @@ groupwise_forget_folder (CamelGroupwiseStore *gw_store, const gchar *folder_name
 	camel_store_summary_remove_path ( (CamelStoreSummary *)gw_store->summary, folder_name);
 	camel_store_summary_save ( (CamelStoreSummary *)gw_store->summary);
 
-	fi = groupwise_build_folder_info(gw_store, NULL, folder_name);
+	fi = groupwise_build_folder_info (gw_store, NULL, folder_name);
 	camel_store_folder_deleted (CAMEL_STORE (gw_store), fi);
 	camel_folder_info_free (fi);
 }
@@ -541,7 +541,7 @@ groupwise_get_folder_from_disk (CamelStore *store, const gchar *folder_name, gui
 
 	storage_path = g_strdup_printf("%s/folders", priv->storage_path);
 	folder_dir = e_path_to_physical (storage_path, folder_name);
-	g_free(storage_path);
+	g_free (storage_path);
 	if (!folder_dir || g_access (folder_dir, F_OK) != 0) {
 		g_free (folder_dir);
 		g_set_error (
@@ -597,8 +597,8 @@ groupwise_get_folder (CamelStore *store, const gchar *folder_name, guint32 flags
 		return NULL;
 	}
 
-	if (!E_IS_GW_CONNECTION( priv->cnc)) {
-		if (!groupwise_connect (CAMEL_SERVICE(store), error)) {
+	if (!E_IS_GW_CONNECTION ( priv->cnc)) {
+		if (!groupwise_connect (CAMEL_SERVICE (store), error)) {
 			camel_service_unlock (CAMEL_SERVICE (gw_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			return NULL;
 		}
@@ -608,7 +608,7 @@ groupwise_get_folder (CamelStore *store, const gchar *folder_name, guint32 flags
 
 	storage_path = g_strdup_printf("%s/folders", priv->storage_path);
 	folder_dir = e_path_to_physical (storage_path, folder_name);
-	g_free(storage_path);
+	g_free (storage_path);
 	folder = camel_gw_folder_new (store, folder_name, folder_dir, NULL);
 	if (!folder) {
 		camel_service_unlock (CAMEL_SERVICE (gw_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -737,8 +737,8 @@ gw_store_reload_folder (CamelGroupwiseStore *gw_store, CamelFolder *folder, guin
 		return FALSE;
 	}
 
-	if (!E_IS_GW_CONNECTION( priv->cnc)) {
-		if (!groupwise_connect (CAMEL_SERVICE((CamelStore*)gw_store), error)) {
+	if (!E_IS_GW_CONNECTION ( priv->cnc)) {
+		if (!groupwise_connect (CAMEL_SERVICE ((CamelStore*)gw_store), error)) {
 			camel_service_unlock (CAMEL_SERVICE (gw_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			return FALSE;
 		}
@@ -918,7 +918,7 @@ convert_to_folder_info (CamelGroupwiseStore *store, EGwContainer *container, con
 	}
 
 	/*name_hash returns the container id given the name */
-	g_hash_table_insert (priv->name_hash, g_strdup(fi->full_name), g_strdup(id));
+	g_hash_table_insert (priv->name_hash, g_strdup (fi->full_name), g_strdup (id));
 
 	if (e_gw_container_get_is_shared_to_me (container))
 		fi->flags |= CAMEL_FOLDER_SHARED_TO_ME;
@@ -969,12 +969,12 @@ groupwise_folders_sync (CamelGroupwiseStore *store, GError **error)
 	temp_list = folder_list;
 	list = folder_list;
 
-	url = camel_url_to_string (CAMEL_SERVICE(store)->url,
+	url = camel_url_to_string (CAMEL_SERVICE (store)->url,
 				   (CAMEL_URL_HIDE_PASSWORD|
 				    CAMEL_URL_HIDE_PARAMS|
 				    CAMEL_URL_HIDE_AUTH) );
 
-	if ( url[strlen(url) - 1] != '/') {
+	if ( url[strlen (url) - 1] != '/') {
 		temp_url = g_strconcat (url, "/", NULL);
 		g_free ((gchar *)url);
 		url = temp_url;
@@ -984,10 +984,10 @@ groupwise_folders_sync (CamelGroupwiseStore *store, GError **error)
 	for (;temp_list != NULL; temp_list = g_list_next (temp_list) ) {
 		const gchar *name, *id, *parent;
 		name = e_gw_container_get_name (E_GW_CONTAINER (temp_list->data));
-		id = e_gw_container_get_id(E_GW_CONTAINER(temp_list->data));
-		parent = e_gw_container_get_parent_id (E_GW_CONTAINER(temp_list->data));
+		id = e_gw_container_get_id (E_GW_CONTAINER (temp_list->data));
+		parent = e_gw_container_get_parent_id (E_GW_CONTAINER (temp_list->data));
 
-		if (e_gw_container_is_root (E_GW_CONTAINER(temp_list->data))) {
+		if (e_gw_container_is_root (E_GW_CONTAINER (temp_list->data))) {
 			if (store->root_container)
 				g_free (store->root_container);
 			store->root_container = g_strdup (id);
@@ -995,9 +995,9 @@ groupwise_folders_sync (CamelGroupwiseStore *store, GError **error)
 		}
 
 		/*id_hash returns the name for a given container id*/
-		g_hash_table_insert (priv->id_hash, g_strdup(id), g_strdup(name));
+		g_hash_table_insert (priv->id_hash, g_strdup (id), g_strdup (name));
 		/*parent_hash returns the parent container id, given an id*/
-		g_hash_table_insert (priv->parent_hash, g_strdup(id), g_strdup(parent));
+		g_hash_table_insert (priv->parent_hash, g_strdup (id), g_strdup (parent));
 	}
 
 	present = g_hash_table_new (g_str_hash, g_str_equal);
@@ -1008,7 +1008,7 @@ groupwise_folders_sync (CamelGroupwiseStore *store, GError **error)
 
 		type = e_gw_container_get_container_type (container);
 
-		if (e_gw_container_is_root(container))
+		if (e_gw_container_is_root (container))
 			continue;
 		if ((type == E_GW_CONTAINER_TYPE_CALENDAR) || (type == E_GW_CONTAINER_TYPE_CONTACTS))
 			continue;
@@ -1071,31 +1071,31 @@ groupwise_get_folder_info_offline (CamelStore *store, const gchar *top,
 	if (top[0] == 0) {
 			name = g_strdup("");
 	} else {
-		name = camel_groupwise_store_summary_full_from_path(groupwise_store->summary, top);
+		name = camel_groupwise_store_summary_full_from_path (groupwise_store->summary, top);
 		if (name == NULL)
-			name = camel_groupwise_store_summary_path_to_full(groupwise_store->summary, top, '/');
+			name = camel_groupwise_store_summary_path_to_full (groupwise_store->summary, top, '/');
 	}
 
 	path = gw_concat (name, "*");
 
-	for (i=0;i<camel_store_summary_count((CamelStoreSummary *)groupwise_store->summary);i++) {
-		CamelStoreInfo *si = camel_store_summary_index((CamelStoreSummary *)groupwise_store->summary, i);
+	for (i=0;i<camel_store_summary_count ((CamelStoreSummary *)groupwise_store->summary);i++) {
+		CamelStoreInfo *si = camel_store_summary_index ((CamelStoreSummary *)groupwise_store->summary, i);
 
 		if (si == NULL)
 			continue;
 
-		if ( !strcmp(name, camel_groupwise_store_info_full_name (groupwise_store->summary, si))
+		if ( !strcmp (name, camel_groupwise_store_info_full_name (groupwise_store->summary, si))
 		     || match_path (path, camel_groupwise_store_info_full_name (groupwise_store->summary, si))) {
-			fi = groupwise_build_folder_info(groupwise_store, NULL, camel_store_info_path((CamelStoreSummary *)groupwise_store->summary, si));
+			fi = groupwise_build_folder_info (groupwise_store, NULL, camel_store_info_path ((CamelStoreSummary *)groupwise_store->summary, si));
 			fi->unread = si->unread;
 			fi->total = si->total;
 			fi->flags = si->flags;
 			g_ptr_array_add (folders, fi);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)groupwise_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)groupwise_store->summary, si);
 	}
 
-	g_free(name);
+	g_free (name);
 	g_free (path);
 	fi = camel_folder_info_build (folders, top, '/', TRUE);
 	g_ptr_array_free (folders, TRUE);
@@ -1151,16 +1151,16 @@ create_junk_folder (CamelStore *store)
 	if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
 		status = e_gw_connection_modify_junk_settings (priv->cnc, JUNK_ENABLE, 0, 0,  JUNK_PERSISTENCE);
 	if (status == E_GW_CONNECTION_STATUS_OK) {
-		root = groupwise_build_folder_info(groupwise_store, parent_name, folder_name);
-		camel_store_summary_save((CamelStoreSummary *)groupwise_store->summary);
+		root = groupwise_build_folder_info (groupwise_store, parent_name, folder_name);
+		camel_store_summary_save ((CamelStoreSummary *)groupwise_store->summary);
 
 		child_container_id = e_gw_connection_get_container_id (priv->cnc, "Junk Mail");
 		if (!child_container_id)
 			g_warning("failed to retrieve id for junk folder");
 
-		g_hash_table_insert (priv->id_hash, g_strdup(child_container_id), g_strdup(folder_name));
-		g_hash_table_insert (priv->name_hash, g_strdup(folder_name), g_strdup(child_container_id));
-		g_hash_table_insert (priv->parent_hash, g_strdup(child_container_id), g_strdup(parent_id));
+		g_hash_table_insert (priv->id_hash, g_strdup (child_container_id), g_strdup (folder_name));
+		g_hash_table_insert (priv->name_hash, g_strdup (folder_name), g_strdup (child_container_id));
+		g_hash_table_insert (priv->parent_hash, g_strdup (child_container_id), g_strdup (parent_id));
 		camel_store_folder_created (store, root);
 	}
 	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -1169,7 +1169,7 @@ create_junk_folder (CamelStore *store)
 }
 
 static CamelFolderInfo*
-groupwise_create_folder(CamelStore *store,
+groupwise_create_folder (CamelStore *store,
 		const gchar *parent_name,
 		const gchar *folder_name,
 		GError **error)
@@ -1198,7 +1198,7 @@ groupwise_create_folder(CamelStore *store,
 		}
 	}
 
-	if (parent_name && (strlen(parent_name) > 0) ) {
+	if (parent_name && (strlen (parent_name) > 0) ) {
 		if (strcmp (parent_name, "Cabinet") && groupwise_is_system_folder (parent_name)) {
 			g_set_error (
 				error, CAMEL_FOLDER_ERROR,
@@ -1210,22 +1210,22 @@ groupwise_create_folder(CamelStore *store,
 	} else
 		parent_id = "";
 
-	if (!E_IS_GW_CONNECTION( priv->cnc)) {
-		if (!groupwise_connect (CAMEL_SERVICE(store), error)) {
+	if (!E_IS_GW_CONNECTION ( priv->cnc)) {
+		if (!groupwise_connect (CAMEL_SERVICE (store), error)) {
 			return NULL;
 		}
 	}
 	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
-	status = e_gw_connection_create_folder(priv->cnc,parent_id,folder_name, &child_container_id);
+	status = e_gw_connection_create_folder (priv->cnc,parent_id,folder_name, &child_container_id);
 	if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
-		status = e_gw_connection_create_folder(priv->cnc,parent_id,folder_name, &child_container_id);
+		status = e_gw_connection_create_folder (priv->cnc,parent_id,folder_name, &child_container_id);
 	if (status == E_GW_CONNECTION_STATUS_OK) {
-		root = groupwise_build_folder_info(groupwise_store, parent_name,folder_name);
-		camel_store_summary_save((CamelStoreSummary *)groupwise_store->summary);
+		root = groupwise_build_folder_info (groupwise_store, parent_name,folder_name);
+		camel_store_summary_save ((CamelStoreSummary *)groupwise_store->summary);
 
-		g_hash_table_insert (priv->id_hash, g_strdup(child_container_id), g_strdup(folder_name));
-		g_hash_table_insert (priv->name_hash, g_strdup(root->full_name), g_strdup(child_container_id));
-		g_hash_table_insert (priv->parent_hash, g_strdup(child_container_id), g_strdup(parent_id));
+		g_hash_table_insert (priv->id_hash, g_strdup (child_container_id), g_strdup (folder_name));
+		g_hash_table_insert (priv->name_hash, g_strdup (root->full_name), g_strdup (child_container_id));
+		g_hash_table_insert (priv->parent_hash, g_strdup (child_container_id), g_strdup (parent_id));
 
 		camel_store_folder_created (store, root);
 	}
@@ -1234,7 +1234,7 @@ groupwise_create_folder(CamelStore *store,
 }
 
 static gboolean
-groupwise_delete_folder(CamelStore *store,
+groupwise_delete_folder (CamelStore *store,
 				   const gchar *folder_name,
 				   GError **error)
 {
@@ -1259,7 +1259,7 @@ groupwise_delete_folder(CamelStore *store,
 	if (status == E_GW_CONNECTION_STATUS_OK) {
 		groupwise_store_set_current_folder (groupwise_store, NULL);
 
-		groupwise_forget_folder(groupwise_store,folder_name,NULL);
+		groupwise_forget_folder (groupwise_store,folder_name,NULL);
 
 		g_hash_table_remove (priv->id_hash, container);
 		g_hash_table_remove (priv->name_hash, folder_name);
@@ -1272,7 +1272,7 @@ groupwise_delete_folder(CamelStore *store,
 }
 
 static gboolean
-groupwise_rename_folder(CamelStore *store,
+groupwise_rename_folder (CamelStore *store,
 			const gchar *old_name,
 			const gchar *new_name,
 			GError **error)
@@ -1317,9 +1317,9 @@ groupwise_rename_folder(CamelStore *store,
 		return FALSE;
 	}
 
-	g_hash_table_replace (priv->id_hash, g_strdup(container_id), g_strdup(temp_new));
+	g_hash_table_replace (priv->id_hash, g_strdup (container_id), g_strdup (temp_new));
 
-	g_hash_table_insert (priv->name_hash, g_strdup(new_name), g_strdup(container_id));
+	g_hash_table_insert (priv->name_hash, g_strdup (new_name), g_strdup (container_id));
 	g_hash_table_remove (priv->name_hash, old_name);
 	/*FIXME:Update all the id in the parent_hash*/
 
@@ -1342,7 +1342,7 @@ groupwise_rename_folder(CamelStore *store,
 }
 
 gchar *
-groupwise_get_name(CamelService *service, gboolean brief)
+groupwise_get_name (CamelService *service, gboolean brief)
 {
 	if (brief)
 		return g_strdup_printf(_("GroupWise server %s"), service->url->host);
@@ -1394,7 +1394,7 @@ groupwise_get_trash (CamelStore *store, GError **error)
 		 gchar *state = g_build_filename((CAMEL_GROUPWISE_STORE(store))->priv->storage_path, "folders", "Trash", "cmeta", NULL);
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		camel_object_state_read (object);
 
 		return folder;
@@ -1407,7 +1407,7 @@ groupwise_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, GError *
 {
 	gboolean res;
 
-	res = CAMEL_STORE_CLASS(camel_groupwise_store_parent_class)->can_refresh_folder (store, info, error) ||
+	res = CAMEL_STORE_CLASS (camel_groupwise_store_parent_class)->can_refresh_folder (store, info, error) ||
 	      (camel_url_get_param (((CamelService *)store)->url, "check_all") != NULL);
 
 	return res;
@@ -1435,7 +1435,7 @@ camel_groupwise_store_connected (CamelGroupwiseStore *store, GError **error)
 }
 
 static gint
-match_path(const gchar *path, const gchar *name)
+match_path (const gchar *path, const gchar *name)
 {
 	gchar p, n;
 
diff --git a/camel/providers/groupwise/camel-groupwise-store.h b/camel/providers/groupwise/camel-groupwise-store.h
index 668bab1..2ebda32 100644
--- a/camel/providers/groupwise/camel-groupwise-store.h
+++ b/camel/providers/groupwise/camel-groupwise-store.h
@@ -77,7 +77,7 @@ struct _CamelGroupwiseStoreClass {
 };
 
 GType camel_groupwise_store_get_type (void);
-gchar * groupwise_get_name(CamelService *service, gboolean brief);
+gchar * groupwise_get_name (CamelService *service, gboolean brief);
 
 /*IMplemented*/
 const gchar *camel_groupwise_store_container_id_lookup (CamelGroupwiseStore *gw_store, const gchar *folder_name);
diff --git a/camel/providers/groupwise/camel-groupwise-summary.c b/camel/providers/groupwise/camel-groupwise-summary.c
index ca3a7db..c1a0301 100644
--- a/camel/providers/groupwise/camel-groupwise-summary.c
+++ b/camel/providers/groupwise/camel-groupwise-summary.c
@@ -50,7 +50,7 @@ static gint gw_summary_header_save (CamelFolderSummary *, FILE *);
 static CamelMessageInfo *gw_message_info_migrate (CamelFolderSummary *s, FILE *in);
 
 static CamelMessageContentInfo * gw_content_info_migrate (CamelFolderSummary *s, FILE *in);
-static gboolean gw_info_set_flags(CamelMessageInfo *info, guint32 flags, guint32 set);
+static gboolean gw_info_set_flags (CamelMessageInfo *info, guint32 flags, guint32 set);
 
 static gint summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir);
 static CamelFIRecord * summary_header_to_db (CamelFolderSummary *s, GError **error);
@@ -64,16 +64,16 @@ static CamelMessageContentInfo * content_info_from_db (CamelFolderSummary *s, Ca
 G_DEFINE_TYPE (CamelGroupwiseSummary, camel_groupwise_summary, CAMEL_TYPE_FOLDER_SUMMARY)
 
 static CamelMessageInfo *
-gw_message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
+gw_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
 {
 	CamelGroupwiseMessageInfo *to;
 	const CamelGroupwiseMessageInfo *from = (const CamelGroupwiseMessageInfo *)mi;
 
-	to = (CamelGroupwiseMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_groupwise_summary_parent_class)->message_info_clone(s, mi);
+	to = (CamelGroupwiseMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_groupwise_summary_parent_class)->message_info_clone (s, mi);
 	to->server_flags = from->server_flags;
 
 	/* FIXME: parent clone should do this */
-	to->info.content = camel_folder_summary_content_info_new(s);
+	to->info.content = camel_folder_summary_content_info_new (s);
 
 	return (CamelMessageInfo *)to;
 }
@@ -145,7 +145,7 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir)
 	part = mir->bdata;
 
 	if (part)
-		EXTRACT_FIRST_DIGIT(gms->version);
+		EXTRACT_FIRST_DIGIT (gms->version);
 
 	if (part)
 		EXTRACT_DIGIT (gms->validity);
@@ -165,8 +165,8 @@ gw_summary_header_load (CamelFolderSummary *s, FILE *in)
 	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_groupwise_summary_parent_class)->summary_header_load (s, in) == -1)
 		return -1;
 
-	if (camel_file_util_decode_fixed_int32(in, &gms->version) == -1
-			|| camel_file_util_decode_fixed_int32(in, &gms->validity) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, &gms->version) == -1
+			|| camel_file_util_decode_fixed_int32 (in, &gms->validity) == -1)
 		return -1;
 
 	if (camel_file_util_decode_string (in, &gms->time_string) == -1)
@@ -177,7 +177,7 @@ gw_summary_header_load (CamelFolderSummary *s, FILE *in)
 static CamelFIRecord *
 summary_header_to_db (CamelFolderSummary *s, GError **error)
 {
-	CamelGroupwiseSummary *ims = CAMEL_GROUPWISE_SUMMARY(s);
+	CamelGroupwiseSummary *ims = CAMEL_GROUPWISE_SUMMARY (s);
 	struct _CamelFIRecord *fir;
 
 	fir = CAMEL_FOLDER_SUMMARY_CLASS (camel_groupwise_summary_parent_class)->summary_header_to_db (s, error);
@@ -193,13 +193,13 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
 static gint
 gw_summary_header_save (CamelFolderSummary *s, FILE *out)
 {
-	CamelGroupwiseSummary *gms = CAMEL_GROUPWISE_SUMMARY(s);
+	CamelGroupwiseSummary *gms = CAMEL_GROUPWISE_SUMMARY (s);
 
 	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_groupwise_summary_parent_class)->summary_header_save (s, out) == -1)
 		return -1;
 
-	camel_file_util_encode_fixed_int32(out, CAMEL_GW_SUMMARY_VERSION);
-	camel_file_util_encode_fixed_int32(out, gms->validity);
+	camel_file_util_encode_fixed_int32 (out, CAMEL_GW_SUMMARY_VERSION);
+	camel_file_util_encode_fixed_int32 (out, gms->validity);
 	return camel_file_util_encode_string (out, gms->time_string);
 }
 
@@ -322,7 +322,7 @@ gw_info_set_flags (CamelMessageInfo *info, guint32 flags, guint32 set)
 				if (mi->summary) {
 						mi->summary->deleted_count += deleted;
 						mi->summary->unread_count -= read;
-						camel_folder_summary_touch(mi->summary);
+						camel_folder_summary_touch (mi->summary);
 				}
 		}
 
@@ -345,12 +345,12 @@ gw_info_set_flags (CamelMessageInfo *info, guint32 flags, guint32 set)
 		}
 
 		if (mi->summary && mi->summary->folder && mi->uid) {
-				CamelFolderChangeInfo *changes = camel_folder_change_info_new();
+				CamelFolderChangeInfo *changes = camel_folder_change_info_new ();
 
-				camel_folder_change_info_change_uid(changes, camel_message_info_uid(info));
+				camel_folder_change_info_change_uid (changes, camel_message_info_uid (info));
 				camel_folder_changed (mi->summary->folder, changes);
-				camel_folder_change_info_free(changes);
-				camel_folder_summary_touch(mi->summary);
+				camel_folder_change_info_free (changes);
+				camel_folder_summary_touch (mi->summary);
 		}
 
 		return TRUE;
@@ -367,20 +367,20 @@ camel_gw_summary_add_offline (CamelFolderSummary *summary, const gchar *uid, Cam
 	mi = (CamelGroupwiseMessageInfo *)camel_folder_summary_info_new_from_message (summary, message, NULL);
 
 	/* Copy flags 'n' tags */
-	mi->info.flags = camel_message_info_flags(info);
+	mi->info.flags = camel_message_info_flags (info);
 
-	flag = camel_message_info_user_flags(info);
+	flag = camel_message_info_user_flags (info);
 	while (flag) {
-		camel_message_info_set_user_flag((CamelMessageInfo *)mi, flag->name, TRUE);
+		camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flag->name, TRUE);
 		flag = flag->next;
 	}
-	tag = camel_message_info_user_tags(info);
+	tag = camel_message_info_user_tags (info);
 	while (tag) {
-		camel_message_info_set_user_tag((CamelMessageInfo *)mi, tag->name, tag->value);
+		camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tag->name, tag->value);
 		tag = tag->next;
 	}
 
-	mi->info.size = camel_message_info_size(info);
+	mi->info.size = camel_message_info_size (info);
 	mi->info.uid = camel_pstring_strdup (uid);
 
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
@@ -392,8 +392,8 @@ camel_gw_summary_add_offline_uncached (CamelFolderSummary *summary, const gchar
 {
 	CamelGroupwiseMessageInfo *mi;
 
-	mi = camel_message_info_clone(info);
-	mi->info.uid = camel_pstring_strdup(uid);
+	mi = camel_message_info_clone (info);
+	mi->info.uid = camel_pstring_strdup (uid);
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
 }
 
@@ -414,7 +414,7 @@ groupwise_summary_clear (CamelFolderSummary *summary, gboolean uncache)
 		uid = camel_message_info_uid (info);
 		camel_folder_change_info_remove_uid (changes, uid);
 		camel_folder_summary_remove_uid (summary, uid);
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
 	camel_folder_summary_clear_db (summary);
diff --git a/camel/providers/groupwise/camel-groupwise-transport.c b/camel/providers/groupwise/camel-groupwise-transport.c
index e0cc87f..ebccd13 100644
--- a/camel/providers/groupwise/camel-groupwise-transport.c
+++ b/camel/providers/groupwise/camel-groupwise-transport.c
@@ -86,7 +86,7 @@ groupwise_send_to (CamelTransport *transport,
 		return FALSE;
 	}
 
-	service = CAMEL_SERVICE(transport);
+	service = CAMEL_SERVICE (transport);
 	url = camel_url_to_string (service->url,
 				   (CAMEL_URL_HIDE_PASSWORD |
 				    CAMEL_URL_HIDE_PARAMS   |
diff --git a/camel/providers/groupwise/camel-groupwise-utils.c b/camel/providers/groupwise/camel-groupwise-utils.c
index 2613510..2372914 100644
--- a/camel/providers/groupwise/camel-groupwise-utils.c
+++ b/camel/providers/groupwise/camel-groupwise-utils.c
@@ -253,7 +253,7 @@ e_path_rmdir (const gchar *prefix, const gchar *vpath)
 }
 
 static GSList *
-add_recipients(GSList *recipient_list, CamelAddress *recipients, gint recipient_type)
+add_recipients (GSList *recipient_list, CamelAddress *recipients, gint recipient_type)
 {
 	gint total_add,i;
 	EGwItemRecipient *recipient;
@@ -303,7 +303,7 @@ send_as_attachment (EGwConnection *cnc, EGwItem *item, CamelStream *content, Cam
 			g_free (temp_str);
 			temp_str = NULL;
 		} else {
-			attachment->data = g_base64_encode(byte_array->data, byte_array->len);
+			attachment->data = g_base64_encode (byte_array->data, byte_array->len);
 			attachment->size = strlen (attachment->data);
 		}
 	} else if (byte_array->data) {
@@ -384,19 +384,19 @@ populate_recipients (CamelMimeMessage *message, EGwItem *item, gboolean redirect
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_RESENT_TO));
 	else
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO));
-	recipient_list=add_recipients(recipient_list,recipients,E_GW_ITEM_RECIPIENT_TO);
+	recipient_list=add_recipients (recipient_list,recipients,E_GW_ITEM_RECIPIENT_TO);
 
 	if (redirect)
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_RESENT_CC));
 	else
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC));
-	recipient_list=add_recipients(recipient_list,recipients,E_GW_ITEM_RECIPIENT_CC);
+	recipient_list=add_recipients (recipient_list,recipients,E_GW_ITEM_RECIPIENT_CC);
 
 	if (redirect)
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_RESENT_BCC));
 	else
 		recipients = CAMEL_ADDRESS (camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_BCC));
-	recipient_list=add_recipients(recipient_list,recipients,E_GW_ITEM_RECIPIENT_BC);
+	recipient_list=add_recipients (recipient_list,recipients,E_GW_ITEM_RECIPIENT_BC);
 	recipient_list = g_slist_reverse (recipient_list);
 
 	return recipient_list;
@@ -442,7 +442,7 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 		content = camel_stream_mem_new_with_byte_array (byte_array);
 
 		dw = camel_medium_get_content (CAMEL_MEDIUM (message));
-		type = camel_mime_part_get_content_type((CamelMimePart *)message);
+		type = camel_mime_part_get_content_type ((CamelMimePart *)message);
 
 		if (camel_content_type_is (type, "text", "plain")) {
 			CamelStream *filtered_stream;
@@ -489,35 +489,35 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 	/*Item type is mail*/
 	e_gw_item_set_item_type (item, E_GW_ITEM_TYPE_MAIL);
 	/*subject*/
-	e_gw_item_set_subject (item, camel_mime_message_get_subject(message));
+	e_gw_item_set_subject (item, camel_mime_message_get_subject (message));
 	/*attachmets*/
 	e_gw_item_set_attach_id_list (item, attach_list);
 
 	/*send options*/
 	e_gw_item_set_sendoptions (item, TRUE);
 
-	if ((gchar *)camel_medium_get_header (CAMEL_MEDIUM(message), X_REPLY_CONVENIENT))
+	if ((gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_REPLY_CONVENIENT))
 		e_gw_item_set_reply_request (item, TRUE);
 
-	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM(message), X_REPLY_WITHIN);
+	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_REPLY_WITHIN);
 	if (send_options) {
 		e_gw_item_set_reply_request (item, TRUE);
 		e_gw_item_set_reply_within (item, send_options);
 	}
-	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM(message),X_EXPIRE_AFTER);
+	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message),X_EXPIRE_AFTER);
 	if (send_options)
 		e_gw_item_set_expires (item, send_options);
 
-	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM(message), X_DELAY_UNTIL);
+	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_DELAY_UNTIL);
 	if (send_options)
 		e_gw_item_set_delay_until (item, send_options);
 
-	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM(message), X_TRACK_WHEN);
+	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_TRACK_WHEN);
 
 	/*we check if user has modified the status tracking options, if no then we anyway
 	 * set status tracking all*/
 	if (send_options) {
-		switch (atoi(send_options)) {
+		switch (atoi (send_options)) {
 			case 1: e_gw_item_set_track_info (item, E_GW_ITEM_DELIVERED);
 				break;
 			case 2: e_gw_item_set_track_info (item, E_GW_ITEM_DELIVERED_OPENED);
@@ -530,12 +530,12 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 	} else
 		e_gw_item_set_track_info (item, E_GW_ITEM_ALL);
 
-	if ((gchar *)camel_medium_get_header (CAMEL_MEDIUM(message), X_AUTODELETE))
+	if ((gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_AUTODELETE))
 		e_gw_item_set_autodelete (item, TRUE);
 
 	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_RETURN_NOTIFY_OPEN);
 	if (send_options) {
-		switch (atoi(send_options)) {
+		switch (atoi (send_options)) {
 			case 0: e_gw_item_set_notify_opened (item, E_GW_ITEM_NOTIFY_NONE);
 				break;
 			case 1: e_gw_item_set_notify_opened (item, E_GW_ITEM_NOTIFY_MAIL);
@@ -543,7 +543,7 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 	}
 	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_RETURN_NOTIFY_DELETE);
 	if (send_options) {
-		switch (atoi(send_options)) {
+		switch (atoi (send_options)) {
 			case 0: e_gw_item_set_notify_deleted (item, E_GW_ITEM_NOTIFY_NONE);
 				break;
 			case 1: e_gw_item_set_notify_deleted (item, E_GW_ITEM_NOTIFY_MAIL);
@@ -552,7 +552,7 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 
 	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_SEND_OPT_PRIORITY);
 	if (send_options) {
-		switch (atoi(send_options)) {
+		switch (atoi (send_options)) {
 			case E_GW_PRIORITY_HIGH: e_gw_item_set_priority(item, "High");
 						 break;
 			case E_GW_PRIORITY_LOW:  e_gw_item_set_priority(item, "Low");
@@ -564,7 +564,7 @@ camel_groupwise_util_item_from_message (EGwConnection *cnc, CamelMimeMessage *me
 
 	send_options = (gchar *)camel_medium_get_header (CAMEL_MEDIUM (message), X_SEND_OPT_SECURITY);
 	if (send_options) {
-		switch (atoi(send_options)) {
+		switch (atoi (send_options)) {
 			case E_GW_SECURITY_NORMAL : e_gw_item_set_security(item, "Normal");
 						    break;
 			case E_GW_SECURITY_PROPRIETARY : e_gw_item_set_security(item, "Proprietary");
@@ -646,7 +646,7 @@ do_multipart (EGwConnection *cnc, EGwItem *item, CamelMultipart *mp, GSList **at
 		if (!part)
 			continue;
 
-		type = camel_mime_part_get_content_type(part);
+		type = camel_mime_part_get_content_type (part);
 		dw = camel_medium_get_content (CAMEL_MEDIUM (part));
 
 		if (CAMEL_IS_MULTIPART (dw)) {
@@ -669,7 +669,7 @@ do_multipart (EGwConnection *cnc, EGwItem *item, CamelMultipart *mp, GSList **at
 			if (temp_part) {
 				is_alternative = TRUE;
 				temp_dw = camel_medium_get_content (CAMEL_MEDIUM (temp_part));
-				camel_data_wrapper_write_to_stream(temp_dw, temp_content, NULL);
+				camel_data_wrapper_write_to_stream (temp_dw, temp_content, NULL);
 				filename = camel_mime_part_get_filename (temp_part);
 				disposition = camel_mime_part_get_disposition (temp_part);
 				cid = camel_mime_part_get_content_id (temp_part);
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 37f1069..1f6c369 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -372,8 +372,8 @@ camel_imap_command_response (CamelImapStore *store, gchar **response,
 			/* we might get a ']' from a BAD response since we +12, but who cares? */
 			msg = g_strdup_printf(_("Alert from IMAP server %s %s:\n%s"),
 					      ((CamelService *)store)->url->user, ((CamelService *)store)->url->host, respbuf+12);
-			camel_session_alert_user(((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE);
-			g_free(msg);
+			camel_session_alert_user (((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE);
+			g_free (msg);
 		}
 
 		break;
@@ -538,7 +538,7 @@ imap_read_untagged (CamelImapStore *store, gchar *line, GError **error)
 
 		if (camel_debug("imap")) {
 			printf("Literal: -->");
-			fwrite(str->str+1, 1, length, stdout);
+			fwrite (str->str+1, 1, length, stdout);
 			printf("<--\n");
 		}
 
@@ -820,15 +820,15 @@ imap_command_strdup_vprintf (CamelImapStore *store, const gchar *fmt,
 			string = va_arg (ap, gchar *);
 			/* NB: string is freed during output for %F and %G */
 			if (*p == 'F') {
-				gchar *s = camel_imap_store_summary_full_from_path(store->summary, string);
+				gchar *s = camel_imap_store_summary_full_from_path (store->summary, string);
 				if (s) {
-					string = camel_utf8_utf7(s);
-					g_free(s);
+					string = camel_utf8_utf7 (s);
+					g_free (s);
 				} else {
-					string = camel_utf8_utf7(string);
+					string = camel_utf8_utf7 (string);
 				}
 			} else if (*p == 'G') {
-				string = camel_utf8_utf7(string);
+				string = camel_utf8_utf7 (string);
 			}
 
 			arglen = strlen (string);
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 86a3f9f..f16252a 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -116,7 +116,7 @@ static CamelFolderQuotaInfo *imap_get_quota_info (CamelFolder *folder);
 static GData *parse_fetch_response (CamelImapFolder *imap_folder, gchar *msg_att);
 
 /* internal helpers */
-static CamelImapMessageInfo * imap_folder_summary_uid_or_error(
+static CamelImapMessageInfo * imap_folder_summary_uid_or_error (
 	CamelFolderSummary *summary,
 	const gchar * uid,
 	GError **error);
@@ -298,8 +298,8 @@ camel_imap_folder_init (CamelImapFolder *imap_folder)
 				 CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
 
 #ifdef ENABLE_THREADS
-	g_static_mutex_init(&imap_folder->priv->search_lock);
-	g_static_rec_mutex_init(&imap_folder->priv->cache_lock);
+	g_static_mutex_init (&imap_folder->priv->search_lock);
+	g_static_rec_mutex_init (&imap_folder->priv->cache_lock);
 #endif
 	imap_folder->priv->ignore_recent = NULL;
 
@@ -385,7 +385,7 @@ camel_imap_folder_new (CamelStore *parent, const gchar *folder_name,
 	/* set/load persistent state */
 	state_file = g_strdup_printf ("%s/cmeta", folder_dir);
 	camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
-	g_free(state_file);
+	g_free (state_file);
 	camel_object_state_read (CAMEL_OBJECT (folder));
 
 	imap_folder->cache = camel_imap_message_cache_new (folder_dir, folder->summary, error);
@@ -412,7 +412,7 @@ camel_imap_folder_new (CamelStore *parent, const gchar *folder_name,
 		}
 	}
 
-	imap_folder->search = camel_imap_search_new(folder_dir);
+	imap_folder->search = camel_imap_search_new (folder_dir);
 
 	/* do not do that here, as other folders for 'transfer' might not be opened yet
 	replay_offline_journal (imap_store, imap_folder, ex);*/
@@ -628,17 +628,17 @@ imap_rename (CamelFolder *folder, const gchar *new)
 	summary_path = g_strdup_printf("%s/summary", folder_dir);
 
 	CAMEL_IMAP_FOLDER_REC_LOCK (folder, cache_lock);
-	camel_imap_message_cache_set_path(imap_folder->cache, folder_dir);
+	camel_imap_message_cache_set_path (imap_folder->cache, folder_dir);
 	CAMEL_IMAP_FOLDER_REC_UNLOCK (folder, cache_lock);
 
-	camel_folder_summary_set_filename(folder->summary, summary_path);
+	camel_folder_summary_set_filename (folder->summary, summary_path);
 
 	state_file = g_strdup_printf ("%s/cmeta", folder_dir);
 	camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
-	g_free(state_file);
+	g_free (state_file);
 
-	g_free(summary_path);
-	g_free(folder_dir);
+	g_free (summary_path);
+	g_free (folder_dir);
 
 	CAMEL_FOLDER_CLASS (camel_imap_folder_parent_class)->rename (folder, new);
 }
@@ -753,7 +753,7 @@ imap_refresh_info (CamelFolder *folder,
 	 * should do it.  */
 	camel_service_lock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	if (camel_application_is_exiting  || !camel_imap_store_connected(imap_store, &local_error))
+	if (camel_application_is_exiting  || !camel_imap_store_connected (imap_store, &local_error))
 		goto done;
 
 	/* try to store local changes first, as the summary contains new local messages */
@@ -788,7 +788,7 @@ imap_refresh_info (CamelFolder *folder,
 		camel_imap_response_free (imap_store, response);
 	}
 
-	si = camel_store_summary_path((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary, full_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary, full_name);
 	if (si) {
 		guint32 unread, total;
 
@@ -799,10 +799,10 @@ imap_refresh_info (CamelFolder *folder,
 		    || si->unread != unread) {
 			si->total = total;
 			si->unread = unread;
-			camel_store_summary_touch((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary);
+			camel_store_summary_touch ((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary);
 			check_rescan = 0;
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary, si);
 	}
 
 	if (check_rescan && !camel_application_is_exiting && local_error == NULL) {
@@ -849,7 +849,7 @@ fillup_custom_flags (CamelMessageInfo *mi, gchar *custom_flags)
 	array_str = g_strsplit (custom_flags, " ", -1);
 
 	while (array_str[index] != NULL) {
-		camel_flag_set(&((CamelMessageInfoBase *)mi)->user_flags, array_str[index], TRUE);
+		camel_flag_set (&((CamelMessageInfoBase *)mi)->user_flags, array_str[index], TRUE);
 		++ index;
 	}
 
@@ -1006,7 +1006,7 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 	if (summary_got == 0 && summary_len == 0) {
 		camel_operation_end (NULL);
 		camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
-		g_free(new);
+		g_free (new);
 		return TRUE;
 	}
 	camel_operation_end (NULL);
@@ -1050,7 +1050,7 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 			if (g_getenv("CRASH_IMAP")) { /* Debug logs to tackle on hard to get imap crasher */
 				printf ("CRASH: %s: %s",
 					camel_folder_get_full_name (folder), uid);
-				g_assert(0);
+				g_assert (0);
 			} else
 				continue;
 		}
@@ -1095,7 +1095,7 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 			seq = i + 1-del;
 			del++;
 			g_array_append_val (removed, seq);
-			camel_message_info_free(info);
+			camel_message_info_free (info);
 			continue;
 		}
 
@@ -1157,11 +1157,11 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 
 		if (changed) {
 			if (changes == NULL)
-				changes = camel_folder_change_info_new();
-			camel_folder_change_info_change_uid(changes, new[j].uid);
+				changes = camel_folder_change_info_new ();
+			camel_folder_change_info_change_uid (changes, new[j].uid);
 		}
 
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 		g_free (new[j].uid);
 		g_free (new[j].custom_flags);
 		j++;
@@ -1169,7 +1169,7 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 
 	if (changes) {
 		camel_folder_changed (folder, changes);
-		camel_folder_change_info_free(changes);
+		camel_folder_change_info_free (changes);
 	}
 
 	seq = i + 1;
@@ -1224,7 +1224,7 @@ imap_rescan (CamelFolder *folder, gint exists, GError **error)
 				folder->summary->visible_count--;
 
 			folder->summary->saved_count--;
-			camel_message_info_free(dinfo);
+			camel_message_info_free (dinfo);
 		}
 		j = seq - del;
 		g_array_append_val (removed, j);
@@ -1309,7 +1309,7 @@ get_matching (CamelFolder *folder, guint32 flags, guint32 mask, CamelMessageInfo
 		   only when server_flags are same, because there will be a flag removal
 		   command for this type of situation */
 		if ((info->info.flags & mask) != flags || (flags == 0 && info->server_flags != ((CamelImapMessageInfo *)master_info)->server_flags)) {
-			camel_message_info_free((CamelMessageInfo *)info);
+			camel_message_info_free ((CamelMessageInfo *)info);
 			close_range ();
 			continue;
 		}
@@ -1372,7 +1372,7 @@ get_matching (CamelFolder *folder, guint32 flags, guint32 mask, CamelMessageInfo
 
 		g_ptr_array_add (matches, info);
 		/* Remove the uid from the list, to optimize*/
-		camel_pstring_free(summary->pdata[i]);
+		camel_pstring_free (summary->pdata[i]);
 		summary->pdata[i] = NULL;
 
 		if (range != -1) {
@@ -1436,7 +1436,7 @@ imap_sync_offline (CamelFolder *folder,
 	}
 
 	camel_folder_summary_save_to_db (folder->summary, NULL);
-	camel_store_summary_save((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary);
+	camel_store_summary_save ((CamelStoreSummary *)((CamelImapStore *)parent_store)->summary);
 
 	return TRUE;
 }
@@ -1558,7 +1558,7 @@ imap_sync (CamelFolder *folder,
 		}
 
 		if (!(info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
-			camel_message_info_free((CamelMessageInfo *)info);
+			camel_message_info_free ((CamelMessageInfo *)info);
 			continue;
 		}
 
@@ -1571,14 +1571,14 @@ imap_sync (CamelFolder *folder,
 					folder->permanent_flags | CAMEL_MESSAGE_FOLDER_FLAGGED, (CamelMessageInfo *)info, &set, summary,
 					deleted_uids, junked_uids);
 		if (matches == NULL) {
-			camel_message_info_free(info);
+			camel_message_info_free (info);
 			continue;
 		}
 
 		/* Make sure we're connected before issuing commands */
-		if (!camel_imap_store_connected(store, NULL)) {
-			g_free(set);
-			camel_message_info_free(info);
+		if (!camel_imap_store_connected (store, NULL)) {
+			g_free (set);
+			camel_message_info_free (info);
 			break;
 		}
 
@@ -1650,7 +1650,7 @@ imap_sync (CamelFolder *folder,
 
 		for (j = 0; j < matches->len; j++) {
 			info = matches->pdata[j];
-			camel_message_info_free(&info->info);
+			camel_message_info_free (&info->info);
 		}
 		g_ptr_array_free (matches, TRUE);
 
@@ -1758,7 +1758,7 @@ imap_expunge_uids_offline (CamelFolder *folder,
 	}
 
 	camel_db_delete_uids (parent_store->cdb_w, full_name, list, NULL);
-	g_slist_free(list);
+	g_slist_free (list);
 	camel_folder_summary_save_to_db (folder->summary, NULL);
 
 	camel_imap_journal_log (CAMEL_IMAP_FOLDER (folder)->journal,
@@ -2218,7 +2218,7 @@ do_append (CamelFolder *folder,
 	   whatever reason, assume this is the case and save the state and try again */
 retry:
 	if (info) {
-		flags = camel_message_info_flags(info);
+		flags = camel_message_info_flags (info);
 	}
 
 	flags &= folder->permanent_flags;
@@ -2431,7 +2431,7 @@ imap_transfer_offline (CamelFolder *source,
 			camel_imap_summary_add_offline_uncached (dest->summary, destuid, mi);
 
 		camel_imap_message_cache_copy (sc, uid, dc, destuid);
-		camel_message_info_free(mi);
+		camel_message_info_free (mi);
 
 		camel_folder_change_info_add_uid (changes, destuid);
 		if (transferred_uids)
@@ -2673,7 +2673,7 @@ do_copy (CamelFolder *source,
 
 		if (local_error == NULL && delete_originals) {
 			for (i=last;i<uid;i++)
-				camel_folder_delete_message(source, uids->pdata[i]);
+				camel_folder_delete_message (source, uids->pdata[i]);
 			last = uid;
 		}
 		g_free (uidset);
@@ -2718,7 +2718,7 @@ imap_transfer_messages (CamelFolder *source,
 	qsort (uids->pdata, uids->len, sizeof (gpointer), uid_compar);
 
 	/* Now copy the messages */
-	if (!do_copy(source, uids, dest, delete_originals, error))
+	if (!do_copy (source, uids, dest, delete_originals, error))
 		return FALSE;
 
 	/* Make the destination notice its new messages */
@@ -2839,12 +2839,12 @@ imap_search_by_expression (CamelFolder *folder,
 	/* we could get around this by creating a new search object each time,
 	   but i doubt its worth it since any long operation would lock the
 	   command channel too */
-	CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
 
 	camel_folder_search_set_folder (imap_folder->search, folder);
-	matches = camel_folder_search_search(imap_folder->search, expression, NULL, error);
+	matches = camel_folder_search_search (imap_folder->search, expression, NULL, error);
 
-	CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
@@ -2860,12 +2860,12 @@ imap_count_by_expression (CamelFolder *folder,
 	/* we could get around this by creating a new search object each time,
 	   but i doubt its worth it since any long operation would lock the
 	   command channel too */
-	CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
 
 	camel_folder_search_set_folder (imap_folder->search, folder);
-	matches = camel_folder_search_count(imap_folder->search, expression, error);
+	matches = camel_folder_search_count (imap_folder->search, expression, error);
 
-	CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
@@ -2876,18 +2876,18 @@ imap_search_by_uids (CamelFolder *folder,
                      GPtrArray *uids,
                      GError **error)
 {
-	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER(folder);
+	CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
 	GPtrArray *matches;
 
 	if (uids->len == 0)
-		return g_ptr_array_new();
+		return g_ptr_array_new ();
 
-	CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
 
-	camel_folder_search_set_folder(imap_folder->search, folder);
-	matches = camel_folder_search_search(imap_folder->search, expression, uids, error);
+	camel_folder_search_set_folder (imap_folder->search, folder);
+	matches = camel_folder_search_search (imap_folder->search, expression, uids, error);
 
-	CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
@@ -2899,11 +2899,11 @@ imap_search_free (CamelFolder *folder, GPtrArray *uids)
 
 	g_return_if_fail (imap_folder->search);
 
-	CAMEL_IMAP_FOLDER_LOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_LOCK (folder, search_lock);
 
 	camel_folder_search_free_result (imap_folder->search, uids);
 
-	CAMEL_IMAP_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_IMAP_FOLDER_UNLOCK (folder, search_lock);
 }
 
 static CamelMimeMessage *get_message (CamelImapFolder *imap_folder,
@@ -3025,12 +3025,12 @@ get_content (CamelImapFolder *imap_folder, const gchar *uid,
 		/* we assume that part->content_type is more accurate/full than ci->type */
 		camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (body_mp), CAMEL_DATA_WRAPPER (part)->mime_type);
 
-		spec = g_alloca(strlen(part_spec) + 6);
+		spec = g_alloca (strlen (part_spec) + 6);
 		if (frommsg)
 			sprintf(spec, part_spec[0] ? "%s.TEXT" : "TEXT", part_spec);
 		else
-			strcpy(spec, part_spec);
-		g_free(part_spec);
+			strcpy (spec, part_spec);
+		g_free (part_spec);
 
 		stream = camel_imap_folder_fetch_data (imap_folder, uid, spec, FALSE, error);
 		if (stream) {
@@ -3094,12 +3094,12 @@ get_content (CamelImapFolder *imap_folder, const gchar *uid,
 			}
 
 			if (camel_debug("imap:folder")) {
-				gchar *ct = camel_content_type_format(camel_mime_part_get_content_type((CamelMimePart *)part));
-				gchar *ct2 = camel_content_type_format(ci->type);
+				gchar *ct = camel_content_type_format (camel_mime_part_get_content_type ((CamelMimePart *)part));
+				gchar *ct2 = camel_content_type_format (ci->type);
 
 				printf("Setting part content type to '%s' contentinfo type is '%s'\n", ct, ct2);
-				g_free(ct);
-				g_free(ct2);
+				g_free (ct);
+				g_free (ct2);
 			}
 
 			/* if we had no content-type header on a multipart/digest sub-part, then we need to
@@ -3107,10 +3107,10 @@ get_content (CamelImapFolder *imap_folder, const gchar *uid,
 			if (isdigest && camel_medium_get_header((CamelMedium *)part, "content-type") == NULL) {
 				CamelContentType *ct = camel_content_type_new("message", "rfc822");
 
-				camel_data_wrapper_set_mime_type_field(content, ct);
-				camel_content_type_unref(ct);
+				camel_data_wrapper_set_mime_type_field (content, ct);
+				camel_content_type_unref (ct);
 			} else {
-				camel_data_wrapper_set_mime_type_field(content, camel_mime_part_get_content_type(part));
+				camel_data_wrapper_set_mime_type_field (content, camel_mime_part_get_content_type (part));
 			}
 
 			camel_medium_set_content (CAMEL_MEDIUM (part), content);
@@ -3134,13 +3134,13 @@ get_content (CamelImapFolder *imap_folder, const gchar *uid,
 		gchar *spec;
 
 		/* NB: we need this differently to multipart/signed case above on purpose */
-		spec = g_alloca(strlen(part_spec) + 6);
+		spec = g_alloca (strlen (part_spec) + 6);
 		if (frommsg)
 			sprintf(spec, part_spec[0] ? "%s.1" : "1", part_spec);
 		else
 			strcpy(spec, part_spec[0]?part_spec:"1");
 
-		enc = ci->encoding?camel_transfer_encoding_from_string(ci->encoding):CAMEL_TRANSFER_ENCODING_DEFAULT;
+		enc = ci->encoding?camel_transfer_encoding_from_string (ci->encoding):CAMEL_TRANSFER_ENCODING_DEFAULT;
 		content = camel_imap_wrapper_new (imap_folder, ci->type, enc, uid, spec, part);
 		g_free (part_spec);
 		return content;
@@ -3165,14 +3165,14 @@ get_message (CamelImapFolder *imap_folder, const gchar *uid,
 	parent_store = camel_folder_get_parent_store (folder);
 	store = CAMEL_IMAP_STORE (parent_store);
 
-	part_spec = content_info_get_part_spec(ci);
+	part_spec = content_info_get_part_spec (ci);
 	d(printf("get message '%s'\n", part_spec));
 	section_text = g_strdup_printf ("%s%s%s", part_spec, *part_spec ? "." : "",
 					store->server_level >= IMAP_LEVEL_IMAP4REV1 ? "HEADER" : "0");
 
 	stream = camel_imap_folder_fetch_data (imap_folder, uid, section_text, FALSE, error);
 	g_free (section_text);
-	g_free(part_spec);
+	g_free (part_spec);
 	if (!stream)
 		return NULL;
 
@@ -3192,15 +3192,15 @@ get_message (CamelImapFolder *imap_folder, const gchar *uid,
 	}
 
 	if (camel_debug("imap:folder")) {
-		gchar *ct = camel_content_type_format(camel_mime_part_get_content_type((CamelMimePart *)msg));
-		gchar *ct2 = camel_content_type_format(ci->type);
+		gchar *ct = camel_content_type_format (camel_mime_part_get_content_type ((CamelMimePart *)msg));
+		gchar *ct2 = camel_content_type_format (ci->type);
 
 		printf("Setting message content type to '%s' contentinfo type is '%s'\n", ct, ct2);
-		g_free(ct);
-		g_free(ct2);
+		g_free (ct);
+		g_free (ct2);
 	}
 
-	camel_data_wrapper_set_mime_type_field(content, camel_mime_part_get_content_type((CamelMimePart *)msg));
+	camel_data_wrapper_set_mime_type_field (content, camel_mime_part_get_content_type ((CamelMimePart *)msg));
 	camel_medium_set_content (CAMEL_MEDIUM (msg), content);
 	g_object_unref (CAMEL_OBJECT (content));
 
@@ -3247,7 +3247,7 @@ content_info_incomplete (CamelMessageContentInfo *ci)
 		if (!ci->childs)
 			return TRUE;
 		for (ci = ci->childs;ci;ci=ci->next)
-			if (content_info_incomplete(ci))
+			if (content_info_incomplete (ci))
 				return TRUE;
 	}
 
@@ -3255,7 +3255,7 @@ content_info_incomplete (CamelMessageContentInfo *ci)
 }
 
 static CamelImapMessageInfo *
-imap_folder_summary_uid_or_error(CamelFolderSummary *summary, const gchar * uid, GError **error)
+imap_folder_summary_uid_or_error (CamelFolderSummary *summary, const gchar * uid, GError **error)
 {
 	CamelImapMessageInfo *mi;
 	mi = (CamelImapMessageInfo *)camel_folder_summary_uid (summary, uid);
@@ -3286,7 +3286,7 @@ imap_get_message (CamelFolder *folder,
 	parent_store = camel_folder_get_parent_store (folder);
 	store = CAMEL_IMAP_STORE (parent_store);
 
-	mi = imap_folder_summary_uid_or_error(folder->summary, uid, error);
+	mi = imap_folder_summary_uid_or_error (folder->summary, uid, error);
 	if (!mi)
 	  return NULL;
 
@@ -3311,10 +3311,10 @@ imap_get_message (CamelFolder *folder,
 		if (store->server_level < IMAP_LEVEL_IMAP4REV1
 		    || store->braindamaged
 		    || mi->info.size < IMAP_SMALL_BODY_SIZE
-		    || (!content_info_incomplete(mi->info.content) && !mi->info.content->childs)) {
+		    || (!content_info_incomplete (mi->info.content) && !mi->info.content->childs)) {
 			CamelMessageInfoBase *info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
 			msg = get_message_simple (imap_folder, uid, NULL, &local_error);
-			if (info && !info->preview && msg && camel_folder_summary_get_need_preview(folder->summary)) {
+			if (info && !info->preview && msg && camel_folder_summary_get_need_preview (folder->summary)) {
 				if (camel_mime_message_build_preview ((CamelMimePart *)msg, (CamelMessageInfo *)info) && info->preview)
 					camel_folder_summary_add_preview (folder->summary, (CamelMessageInfo *)info);
 			}
@@ -3333,7 +3333,7 @@ imap_get_message (CamelFolder *folder,
 				gint i;
 
 				camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
-				if (!camel_imap_store_connected(store, NULL)) {
+				if (!camel_imap_store_connected (store, NULL)) {
 					camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 					g_set_error (
 						error, CAMEL_SERVICE_ERROR,
@@ -3377,8 +3377,8 @@ imap_get_message (CamelFolder *folder,
 
 			if (camel_debug_start("imap:folder")) {
 				printf("Folder get message '%s' folder info ->\n", uid);
-				camel_message_info_dump((CamelMessageInfo *)mi);
-				camel_debug_end();
+				camel_message_info_dump ((CamelMessageInfo *)mi);
+				camel_debug_end ();
 			}
 
 			/* FETCH returned OK, but we didn't parse a BODY
@@ -3391,7 +3391,7 @@ imap_get_message (CamelFolder *folder,
 				msg = get_message_simple (imap_folder, uid, NULL, &local_error);
 			else
 				msg = get_message (imap_folder, uid, mi->info.content, &local_error);
-			if (msg && camel_folder_summary_get_need_preview(folder->summary)) {
+			if (msg && camel_folder_summary_get_need_preview (folder->summary)) {
 				CamelMessageInfoBase *info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
 				if (info && !info->preview) {
 					if (camel_mime_message_build_preview ((CamelMimePart *)msg, (CamelMessageInfo *)info) && info->preview)
@@ -3445,7 +3445,7 @@ done:
 		g_propagate_error (error, local_error);
 
 fail:
-	camel_message_info_free(&mi->info);
+	camel_message_info_free (&mi->info);
 
 	return msg;
 }
@@ -3467,13 +3467,13 @@ imap_sync_message (CamelFolder *folder,
 	CamelStream *stream = NULL;
 	gboolean success = FALSE;
 
-	mi = imap_folder_summary_uid_or_error(folder->summary, uid, error);
+	mi = imap_folder_summary_uid_or_error (folder->summary, uid, error);
 	if (!mi)
 	  /* No such UID - is this duplicate work? The sync process selects
 	   * UIDs to start with.
 	   */
 	  return FALSE;
-	camel_message_info_free(&mi->info);
+	camel_message_info_free (&mi->info);
 
 	/* If we can get a stream, assume its fully cached. This may be false
 	 * if partial streams are saved elsewhere in the code - but that seems
@@ -3486,7 +3486,7 @@ imap_sync_message (CamelFolder *folder,
 		g_object_unref (stream);
 		return TRUE;
 	}
-	msg = imap_get_message(folder, uid, error);
+	msg = imap_get_message (folder, uid, error);
 	if (msg != NULL) {
 		g_object_unref (msg);
 		success = TRUE;
@@ -3674,7 +3674,7 @@ construct_junk_headers (gchar *header, gchar *value, struct _junk_data *jdata)
 	 * that header based filtering can be much faster. But all that later. */
 	bs = camel_strstrcase (bdata ? bdata:"", header);
 	if (bs) {
-		bs += strlen(header);
+		bs += strlen (header);
 		bs = strchr (bs, ':');
 		if (bs) {
 			bs++;
@@ -3728,7 +3728,7 @@ update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info)
 			summary->visible_count -= junk ? junk : deleted;
 
 		summary->saved_count++;
-		camel_folder_summary_touch(summary);
+		camel_folder_summary_touch (summary);
 	}
 }
 
@@ -3774,7 +3774,7 @@ imap_update_summary (CamelFolder *folder,
 			if (store->custom_headers)
 				header_spec = g_string_append (header_spec, store->custom_headers);
 
-			temp = g_strdup(header_spec->str);
+			temp = g_strdup (header_spec->str);
 			temp = g_strstrip (temp);
 			header_spec = g_string_new (temp);
 			g_free (temp);
@@ -3796,7 +3796,7 @@ imap_update_summary (CamelFolder *folder,
 		tempuid = camel_folder_summary_uid_from_index (folder->summary, seq -1 );
 
 		if (tempuid) {
-			uidval = strtoul(tempuid, NULL, 10);
+			uidval = strtoul (tempuid, NULL, 10);
 			g_free (tempuid);
 		} else
 			uidval = 0;
@@ -3973,7 +3973,7 @@ imap_update_summary (CamelFolder *folder,
 				continue;
 			}
 
-			mi = (CamelImapMessageInfo *)camel_message_info_clone(pmi);
+			mi = (CamelImapMessageInfo *)camel_message_info_clone (pmi);
 		}
 
 		uid = g_datalist_get_data (&data, "UID");
@@ -4000,7 +4000,7 @@ imap_update_summary (CamelFolder *folder,
 		/* Just do this to build the junk required headers to be built*/
 		jdata.data = data;
 		jdata.mi = (CamelMessageInfoBase *) mi;
-		g_hash_table_foreach ((GHashTable *)camel_session_get_junk_headers(((CamelService *) store)->session), (GHFunc) construct_junk_headers, &jdata);
+		g_hash_table_foreach ((GHashTable *)camel_session_get_junk_headers (((CamelService *) store)->session), (GHFunc) construct_junk_headers, &jdata);
 		g_datalist_clear (&data);
 	}
 	g_ptr_array_free (fetch_data, TRUE);
@@ -4023,7 +4023,7 @@ imap_update_summary (CamelFolder *folder,
 				i + first);
 			break;
 		}
-		uid = (gchar *)camel_message_info_uid(mi);
+		uid = (gchar *)camel_message_info_uid (mi);
 		if (uid[0] == 0) {
 			g_warning("Server provided no uid: message %d", i + first);
 			g_set_error (
@@ -4079,7 +4079,7 @@ imap_update_summary (CamelFolder *folder,
 	if (messages) {
 		for (i = 0; i < messages->len; i++) {
 			if (messages->pdata[i])
-				camel_message_info_free(messages->pdata[i]);
+				camel_message_info_free (messages->pdata[i]);
 		}
 		g_ptr_array_free (messages, TRUE);
 	}
@@ -4119,7 +4119,7 @@ camel_imap_folder_changed (CamelFolder *folder, gint exists,
 				continue;
 			}
 
-			deleted = g_slist_prepend(deleted, uid);
+			deleted = g_slist_prepend (deleted, uid);
 			camel_folder_change_info_remove_uid (changes, uid);
 			CAMEL_IMAP_FOLDER_REC_LOCK (imap_folder, cache_lock);
 			camel_imap_message_cache_remove (imap_folder->cache, uid);
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index e881252..1b7f5b1 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -211,7 +211,7 @@ camel_imap_message_cache_new (const gchar *path,
 		else
 			uid = g_strdup (dname);
 
-		if (g_hash_table_lookup(shash, uid))
+		if (g_hash_table_lookup (shash, uid))
 			cache_put (cache, uid, dname, NULL);
 		else
 			g_ptr_array_add (deletes, g_strdup_printf ("%s/%s", cache->path, dname));
@@ -292,8 +292,8 @@ camel_imap_message_cache_max_uid (CamelImapMessageCache *cache)
 void
 camel_imap_message_cache_set_path (CamelImapMessageCache *cache, const gchar *path)
 {
-	g_free(cache->path);
-	cache->path = g_strdup(path);
+	g_free (cache->path);
+	cache->path = g_strdup (path);
 }
 
 static CamelStream *
@@ -632,10 +632,10 @@ camel_imap_message_cache_copy (CamelImapMessageCache *source,
 }
 
 static void
-_match_part(gpointer part_name, gpointer user_data)
+_match_part (gpointer part_name, gpointer user_data)
 {
 	struct _part_find *part_find = (struct _part_find *) user_data;
-	if (g_str_equal(part_name, part_find->disk_part_name))
+	if (g_str_equal (part_name, part_find->disk_part_name))
 		part_find->found = 1;
 }
 
@@ -661,15 +661,15 @@ _match_part(gpointer part_name, gpointer user_data)
  * needed.
  */
 GPtrArray *
-camel_imap_message_cache_filter_cached(CamelImapMessageCache *cache, GPtrArray *uids, GError **error)
+camel_imap_message_cache_filter_cached (CamelImapMessageCache *cache, GPtrArray *uids, GError **error)
 {
 	GPtrArray *result, *parts_list;
 	gint i;
 	struct _part_find part_find;
 	/* Look for a part "" for each uid. */
-	result = g_ptr_array_sized_new(uids->len);
+	result = g_ptr_array_sized_new (uids->len);
 	for (i = 0; i < uids->len; i++) {
-		if ((parts_list = g_hash_table_lookup(cache->parts, uids->pdata[i]))) {
+		if ((parts_list = g_hash_table_lookup (cache->parts, uids->pdata[i]))) {
 			/* At least one part locally present; look for "" (the
 			 * HEADERS part can be present without anything else,
 			 * and that part is not useful for users wanting to
@@ -678,8 +678,8 @@ camel_imap_message_cache_filter_cached(CamelImapMessageCache *cache, GPtrArray *
 			part_find.found = 0;
 			part_find.disk_part_name = g_strdup_printf("%s" BASE_PART_SUFFIX,
 								   (gchar *)uids->pdata[i]);
-			g_ptr_array_foreach(parts_list, _match_part, &part_find);
-			g_free(part_find.disk_part_name);
+			g_ptr_array_foreach (parts_list, _match_part, &part_find);
+			g_free (part_find.disk_part_name);
 			if (part_find.found)
 				/* The message is cached locally, do not
 				 * include it in the result.
@@ -689,7 +689,7 @@ camel_imap_message_cache_filter_cached(CamelImapMessageCache *cache, GPtrArray *
 		/* No message parts, or message part "" not found: include the
 		 * uid in the result.
 		 */
-		g_ptr_array_add(result, (gchar *)camel_pstring_strdup(uids->pdata[i]));
+		g_ptr_array_add (result, (gchar *)camel_pstring_strdup (uids->pdata[i]));
 	}
 	return result;
 }
diff --git a/camel/providers/imap/camel-imap-message-cache.h b/camel/providers/imap/camel-imap-message-cache.h
index 9258305..adb59f4 100644
--- a/camel/providers/imap/camel-imap-message-cache.h
+++ b/camel/providers/imap/camel-imap-message-cache.h
@@ -116,7 +116,7 @@ void         camel_imap_message_cache_copy   (CamelImapMessageCache *source,
 					      const gchar *dest_uid);
 gboolean     camel_imap_message_cache_delete (const gchar *path,
 					      GError **error);
-GPtrArray *  camel_imap_message_cache_filter_cached(CamelImapMessageCache *,
+GPtrArray *  camel_imap_message_cache_filter_cached (CamelImapMessageCache *,
                                               GPtrArray *uids,
                                               GError **error);
 
diff --git a/camel/providers/imap/camel-imap-private.h b/camel/providers/imap/camel-imap-private.h
index 82de48a..b33bbad 100644
--- a/camel/providers/imap/camel-imap-private.h
+++ b/camel/providers/imap/camel-imap-private.h
@@ -21,13 +21,13 @@ struct _CamelImapFolderPrivate {
 
 #ifdef ENABLE_THREADS
 #define CAMEL_IMAP_FOLDER_LOCK(f, l) \
-	(g_static_mutex_lock(&((CamelImapFolder *)f)->priv->l))
+	(g_static_mutex_lock (&((CamelImapFolder *)f)->priv->l))
 #define CAMEL_IMAP_FOLDER_UNLOCK(f, l) \
-	(g_static_mutex_unlock(&((CamelImapFolder *)f)->priv->l))
+	(g_static_mutex_unlock (&((CamelImapFolder *)f)->priv->l))
 #define CAMEL_IMAP_FOLDER_REC_LOCK(f, l) \
-	(g_static_rec_mutex_lock(&((CamelImapFolder *)f)->priv->l))
+	(g_static_rec_mutex_lock (&((CamelImapFolder *)f)->priv->l))
 #define CAMEL_IMAP_FOLDER_REC_UNLOCK(f, l) \
-	(g_static_rec_mutex_unlock(&((CamelImapFolder *)f)->priv->l))
+	(g_static_rec_mutex_unlock (&((CamelImapFolder *)f)->priv->l))
 #else
 #define CAMEL_IMAP_FOLDER_LOCK(obj)
 #define CAMEL_IMAP_FOLDER_UNLOCK(obj)
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 9cc1561..1e6873e 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -104,7 +104,7 @@ CamelServiceAuthType camel_imap_password_authtype = {
 };
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	imap_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imap_store_get_type ();
 	imap_provider.url_hash = imap_url_hash;
@@ -113,7 +113,7 @@ camel_provider_module_init(void)
 	imap_provider.authtypes = g_list_prepend (imap_provider.authtypes, &camel_imap_password_authtype);
 	imap_provider.translation_domain = GETTEXT_PACKAGE;
 
-	camel_provider_register(&imap_provider);
+	camel_provider_register (&imap_provider);
 }
 
 static void
diff --git a/camel/providers/imap/camel-imap-search.c b/camel/providers/imap/camel-imap-search.c
index f6b4af5..b0ecfc9 100644
--- a/camel/providers/imap/camel-imap-search.c
+++ b/camel/providers/imap/camel-imap-search.c
@@ -94,15 +94,15 @@ static ESExpResult *imap_body_contains (struct _ESExp *f, gint argc, struct _ESE
 G_DEFINE_TYPE (CamelImapSearch, camel_imap_search, CAMEL_TYPE_FOLDER_SEARCH)
 
 static void
-free_match(CamelImapSearch *is, struct _match_record *mr)
+free_match (CamelImapSearch *is, struct _match_record *mr)
 {
 	gint i;
 
 	for (i=0;i<mr->termcount;i++)
-		g_free(mr->terms[i]);
-	g_free(mr->terms);
-	g_array_free(mr->matches, TRUE);
-	g_free(mr);
+		g_free (mr->terms[i]);
+	g_free (mr->terms);
+	g_array_free (mr->matches, TRUE);
+	g_free (mr);
 }
 
 static void
@@ -129,7 +129,7 @@ imap_search_finalize (GObject *object)
 
 	search = CAMEL_IMAP_SEARCH (object);
 
-	while ((mr = (struct _match_record *)camel_dlist_remtail(&search->matches)))
+	while ((mr = (struct _match_record *)camel_dlist_remtail (&search->matches)))
 		free_match (search, mr);
 
 	g_hash_table_destroy (search->matches_hash);
@@ -155,8 +155,8 @@ camel_imap_search_class_init (CamelImapSearchClass *class)
 static void
 camel_imap_search_init (CamelImapSearch *is)
 {
-	camel_dlist_init(&is->matches);
-	is->matches_hash = g_hash_table_new(g_str_hash, g_str_equal);
+	camel_dlist_init (&is->matches);
+	is->matches_hash = g_hash_table_new (g_str_hash, g_str_equal);
 	is->matches_count = 0;
 	is->lastuid = 0;
 }
@@ -174,17 +174,17 @@ camel_imap_search_new (const gchar *cachedir)
 
 	camel_folder_search_construct (new);
 
-	is->cache = camel_data_cache_new(cachedir, NULL);
+	is->cache = camel_data_cache_new (cachedir, NULL);
 	if (is->cache) {
 		/* Expire entries after 14 days of inactivity */
-		camel_data_cache_set_expire_access(is->cache, 60*60*24*14);
+		camel_data_cache_set_expire_access (is->cache, 60*60*24*14);
 	}
 
 	return new;
 }
 
 static void
-hash_match(gchar hash[17], gint argc, struct _ESExpResult **argv)
+hash_match (gchar hash[17], gint argc, struct _ESExpResult **argv)
 {
 	GChecksum *checksum;
 	guint8 *digest;
@@ -218,7 +218,7 @@ hash_match(gchar hash[17], gint argc, struct _ESExpResult **argv)
 }
 
 static gint
-save_match(CamelImapSearch *is, struct _match_record *mr)
+save_match (CamelImapSearch *is, struct _match_record *mr)
 {
 	guint32 mark = MATCH_MARK;
 	gint ret = 0;
@@ -243,10 +243,10 @@ save_match(CamelImapSearch *is, struct _match_record *mr)
 	header.lastuid = mr->lastuid;
 	header.validity = mr->validity;
 
-	if (camel_stream_write(stream, (gchar *)&header, sizeof(header), NULL) != sizeof(header)
-	    || camel_stream_write(stream, mr->matches->data, mr->matches->len*sizeof(guint32), NULL) != mr->matches->len*sizeof(guint32)
-	    || camel_seekable_stream_seek((CamelSeekableStream *)stream, 0, CAMEL_STREAM_SET, NULL) == -1
-	    || camel_stream_write(stream, (gchar *)&mark, sizeof(mark), NULL) != sizeof(mark)) {
+	if (camel_stream_write (stream, (gchar *)&header, sizeof (header), NULL) != sizeof (header)
+	    || camel_stream_write (stream, mr->matches->data, mr->matches->len*sizeof (guint32), NULL) != mr->matches->len*sizeof (guint32)
+	    || camel_seekable_stream_seek ((CamelSeekableStream *)stream, 0, CAMEL_STREAM_SET, NULL) == -1
+	    || camel_stream_write (stream, (gchar *)&mark, sizeof (mark), NULL) != sizeof (mark)) {
 		d(printf(" saving failed, removing cache entry\n"));
 		camel_data_cache_remove(is->cache, "search/body-contains", mr->hash, NULL);
 		ret = -1;
@@ -257,28 +257,28 @@ save_match(CamelImapSearch *is, struct _match_record *mr)
 }
 
 static struct _match_record *
-load_match(CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult **argv)
+load_match (CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult **argv)
 {
 	struct _match_record *mr;
 	CamelStream *stream = NULL;
 	struct _match_header header;
 	gint i;
 
-	mr = g_malloc0(sizeof(*mr));
-	mr->matches = g_array_new(0, 0, sizeof(guint32));
-	g_assert(strlen(hash) == 16);
-	strcpy(mr->hash, hash);
-	mr->terms = g_malloc0(sizeof(mr->terms[0]) * argc);
+	mr = g_malloc0 (sizeof (*mr));
+	mr->matches = g_array_new (0, 0, sizeof (guint32));
+	g_assert (strlen (hash) == 16);
+	strcpy (mr->hash, hash);
+	mr->terms = g_malloc0 (sizeof (mr->terms[0]) * argc);
 	for (i=0;i<argc;i++) {
 		if (argv[i]->type == ESEXP_RES_STRING) {
 			mr->termcount++;
-			mr->terms[i] = g_strdup(argv[i]->value.string);
+			mr->terms[i] = g_strdup (argv[i]->value.string);
 		}
 	}
 
 	d(printf("Loading search cache entry to '%s': %s\n", mr->hash, mr->terms[0]));
 
-	memset(&header, 0, sizeof(header));
+	memset (&header, 0, sizeof (header));
 	if (is->cache)
 		stream = camel_data_cache_get(is->cache, "search/body-contains", mr->hash, NULL);
 	if (stream != NULL) {
@@ -287,16 +287,16 @@ load_match(CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult *
 		   should be sufficient to key it */
 		/* This check should also handle endianness changes, we just throw away
 		   the data (its only a cache) */
-		if (camel_stream_read(stream, (gchar *)&header, sizeof(header), NULL) == sizeof(header)
+		if (camel_stream_read (stream, (gchar *)&header, sizeof (header), NULL) == sizeof (header)
 		    && header.validity == is->validity
 		    && header.mark == MATCH_MARK
 		    && header.termcount == 0) {
 			d(printf(" found %d matches\n", header.matchcount));
-			g_array_set_size(mr->matches, header.matchcount);
-			camel_stream_read(stream, mr->matches->data, sizeof(guint32)*header.matchcount, NULL);
+			g_array_set_size (mr->matches, header.matchcount);
+			camel_stream_read (stream, mr->matches->data, sizeof (guint32)*header.matchcount, NULL);
 		} else {
 			d(printf(" file format invalid/validity changed\n"));
-			memset(&header, 0, sizeof(header));
+			memset (&header, 0, sizeof (header));
 		}
 		g_object_unref (stream);
 	} else {
@@ -313,7 +313,7 @@ load_match(CamelImapSearch *is, gchar hash[17], gint argc, struct _ESExpResult *
 }
 
 static gint
-sync_match(CamelImapSearch *is, struct _match_record *mr)
+sync_match (CamelImapSearch *is, struct _match_record *mr)
 {
 	gchar *p, *result, *lasts = NULL;
 	CamelImapResponse *response = NULL;
@@ -363,7 +363,7 @@ sync_match(CamelImapSearch *is, struct _match_record *mr)
 	if (response == NULL)
 		response = camel_imap_command (store, folder, NULL,
 					       "UID SEARCH %s", search->str);
-	g_string_free(search, TRUE);
+	g_string_free (search, TRUE);
 
 	if (!response)
 		return -1;
@@ -373,51 +373,51 @@ sync_match(CamelImapSearch *is, struct _match_record *mr)
 
 	p = result + sizeof ("* SEARCH");
 	for (p = strtok_r (p, " ", &lasts); p; p = strtok_r (NULL, " ", &lasts)) {
-		uid = strtoul(p, NULL, 10);
-		g_array_append_vals(mr->matches, &uid, 1);
+		uid = strtoul (p, NULL, 10);
+		g_array_append_vals (mr->matches, &uid, 1);
 	}
-	g_free(result);
+	g_free (result);
 
 	mr->validity = is->validity;
 	mr->lastuid = is->lastuid;
-	save_match(is, mr);
+	save_match (is, mr);
 
 	return 0;
 }
 
 static struct _match_record *
-get_match(CamelImapSearch *is, gint argc, struct _ESExpResult **argv)
+get_match (CamelImapSearch *is, gint argc, struct _ESExpResult **argv)
 {
 	gchar hash[17];
 	struct _match_record *mr;
 
-	hash_match(hash, argc, argv);
+	hash_match (hash, argc, argv);
 
-	mr = g_hash_table_lookup(is->matches_hash, hash);
+	mr = g_hash_table_lookup (is->matches_hash, hash);
 	if (mr == NULL) {
 		while (is->matches_count >= MATCH_CACHE_SIZE) {
-			mr = (struct _match_record *)camel_dlist_remtail(&is->matches);
+			mr = (struct _match_record *)camel_dlist_remtail (&is->matches);
 			if (mr) {
 				printf("expiring match '%s' (%s)\n", mr->hash, mr->terms[0]);
-				g_hash_table_remove(is->matches_hash, mr->hash);
-				free_match(is, mr);
+				g_hash_table_remove (is->matches_hash, mr->hash);
+				free_match (is, mr);
 				is->matches_count--;
 			} else {
 				is->matches_count = 0;
 			}
 		}
-		mr = load_match(is, hash, argc, argv);
-		g_hash_table_insert(is->matches_hash, mr->hash, mr);
+		mr = load_match (is, hash, argc, argv);
+		g_hash_table_insert (is->matches_hash, mr->hash, mr);
 		is->matches_count++;
 	} else {
-		camel_dlist_remove((CamelDListNode *)mr);
+		camel_dlist_remove ((CamelDListNode *)mr);
 	}
 
-	camel_dlist_addhead(&is->matches, (CamelDListNode *)mr);
+	camel_dlist_addhead (&is->matches, (CamelDListNode *)mr);
 
 	/* what about offline mode? */
 	/* We could cache those results too, or should we cache them elsewhere? */
-	sync_match(is, mr);
+	sync_match (is, mr);
 
 	return mr;
 }
@@ -445,68 +445,68 @@ imap_body_contains (struct _ESExp *f, gint argc, struct _ESExpResult **argv, Cam
 
 	/* If offline, search using the parent class, which can handle this manually */
 	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
-		return CAMEL_FOLDER_SEARCH_CLASS (camel_imap_search_parent_class)->body_contains(f, argc, argv, s);
+		return CAMEL_FOLDER_SEARCH_CLASS (camel_imap_search_parent_class)->body_contains (f, argc, argv, s);
 
 	/* optimise the match "" case - match everything */
 	if (argc == 1 && argv[0]->value.string[0] == '\0') {
 		if (s->current) {
-			r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = TRUE;
 		} else {
-			r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+			r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 			r->value.ptrarray = g_ptr_array_new ();
 			for (i = 0; i < s->summary->len; i++) {
-				g_ptr_array_add(r->value.ptrarray, (gchar *)g_ptr_array_index(s->summary, i));
+				g_ptr_array_add (r->value.ptrarray, (gchar *)g_ptr_array_index (s->summary, i));
 			}
 		}
 	} else if (argc == 0 || s->summary->len == 0) {
 		/* nothing to match case, do nothing (should be handled higher up?) */
 		if (s->current) {
-			r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = FALSE;
 		} else {
-			r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
+			r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
 			r->value.ptrarray = g_ptr_array_new ();
 		}
 	} else {
 		gint truth = FALSE;
 
 		/* setup lastuid/validity for synchronising */
-		is->lastuid = strtoul((gchar *)g_ptr_array_index(s->summary, s->summary->len-1), NULL, 10);
+		is->lastuid = strtoul ((gchar *)g_ptr_array_index (s->summary, s->summary->len-1), NULL, 10);
 		is->validity = ((CamelImapSummary *)(s->folder->summary))->validity;
 
-		mr = get_match(is, argc, argv);
+		mr = get_match (is, argc, argv);
 
 		if (s->current) {
-			uidn = strtoul(camel_message_info_uid(s->current), NULL, 10);
+			uidn = strtoul (camel_message_info_uid (s->current), NULL, 10);
 			uidp = (guint32 *)mr->matches->data;
 			j = mr->matches->len;
 			for (i=0;i<j && !truth;i++)
 				truth = *uidp++ == uidn;
-			r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+			r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 			r->value.boolean = truth;
 		} else {
-			r = e_sexp_result_new(f, ESEXP_RES_ARRAY_PTR);
-			array = r->value.ptrarray = g_ptr_array_new();
+			r = e_sexp_result_new (f, ESEXP_RES_ARRAY_PTR);
+			array = r->value.ptrarray = g_ptr_array_new ();
 
 			/* We use a hash to map the uid numbers to uid strings as required by the search api */
 			/* We use the summary's strings so we dont need to alloc more */
-			uid_hash = g_hash_table_new(NULL, NULL);
+			uid_hash = g_hash_table_new (NULL, NULL);
 			for (i = 0; i < s->summary->len; i++) {
 				uid = (gchar *)s->summary->pdata[i];
-				uidn = strtoul(uid, NULL, 10);
-				g_hash_table_insert(uid_hash, GUINT_TO_POINTER(uidn), uid);
+				uidn = strtoul (uid, NULL, 10);
+				g_hash_table_insert (uid_hash, GUINT_TO_POINTER (uidn), uid);
 			}
 
 			uidp = (guint32 *)mr->matches->data;
 			j = mr->matches->len;
 			for (i=0;i<j && !truth;i++) {
-				uid = g_hash_table_lookup(uid_hash, GUINT_TO_POINTER(*uidp++));
+				uid = g_hash_table_lookup (uid_hash, GUINT_TO_POINTER (*uidp++));
 				if (uid)
-					g_ptr_array_add(array, uid);
+					g_ptr_array_add (array, uid);
 			}
 
-			g_hash_table_destroy(uid_hash);
+			g_hash_table_destroy (uid_hash);
 		}
 	}
 
diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c
index c2061ee..522a066 100644
--- a/camel/providers/imap/camel-imap-store-summary.c
+++ b/camel/providers/imap/camel-imap-store-summary.c
@@ -38,16 +38,16 @@
 
 #define CAMEL_IMAP_STORE_SUMMARY_VERSION (0)
 
-static gint summary_header_load(CamelStoreSummary *, FILE *);
-static gint summary_header_save(CamelStoreSummary *, FILE *);
+static gint summary_header_load (CamelStoreSummary *, FILE *);
+static gint summary_header_save (CamelStoreSummary *, FILE *);
 
 /*static CamelStoreInfo * store_info_new(CamelStoreSummary *, const gchar *);*/
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static gint		 store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void		 store_info_free(CamelStoreSummary *, CamelStoreInfo *);
+static CamelStoreInfo * store_info_load (CamelStoreSummary *, FILE *);
+static gint		 store_info_save (CamelStoreSummary *, FILE *, CamelStoreInfo *);
+static void		 store_info_free (CamelStoreSummary *, CamelStoreInfo *);
 
-static const gchar *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, gint);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
+static const gchar *store_info_string (CamelStoreSummary *, const CamelStoreInfo *, gint);
+static void store_info_set_string (CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
 
 G_DEFINE_TYPE (CamelImapStoreSummary, camel_imap_store_summary, CAMEL_TYPE_STORE_SUMMARY)
 
@@ -105,18 +105,18 @@ camel_imap_store_summary_new (void)
  * It must be freed using camel_store_summary_info_free().
  **/
 CamelImapStoreInfo *
-camel_imap_store_summary_full_name(CamelImapStoreSummary *s, const gchar *full_name)
+camel_imap_store_summary_full_name (CamelImapStoreSummary *s, const gchar *full_name)
 {
 	gint count, i;
 	CamelImapStoreInfo *info;
 
-	count = camel_store_summary_count((CamelStoreSummary *)s);
+	count = camel_store_summary_count ((CamelStoreSummary *)s);
 	for (i=0;i<count;i++) {
-		info = (CamelImapStoreInfo *)camel_store_summary_index((CamelStoreSummary *)s, i);
+		info = (CamelImapStoreInfo *)camel_store_summary_index ((CamelStoreSummary *)s, i);
 		if (info) {
-			if (strcmp(info->full_name, full_name) == 0)
+			if (strcmp (info->full_name, full_name) == 0)
 				return info;
-			camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+			camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		}
 	}
 
@@ -124,14 +124,14 @@ camel_imap_store_summary_full_name(CamelImapStoreSummary *s, const gchar *full_n
 }
 
 gchar *
-camel_imap_store_summary_full_to_path(CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imap_store_summary_full_to_path (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	gchar *path, *p;
 	gint c;
 	const gchar *f;
 
 	if (dir_sep != '/') {
-		p = path = alloca(strlen(full_name)*3+1);
+		p = path = alloca (strlen (full_name)*3+1);
 		f = full_name;
 		while ((c = *f++ & 0xff)) {
 			if (c == dir_sep)
@@ -145,10 +145,10 @@ camel_imap_store_summary_full_to_path(CamelImapStoreSummary *s, const gchar *ful
 	} else
 		path = (gchar *)full_name;
 
-	return g_strdup(path);
+	return g_strdup (path);
 }
 
-static guint32 hexnib(guint32 c)
+static guint32 hexnib (guint32 c)
 {
 	if (c >= '0' && c <= '9')
 		return c-'0';
@@ -159,7 +159,7 @@ static guint32 hexnib(guint32 c)
 }
 
 gchar *
-camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *path, gchar dir_sep)
 {
 	gchar *full, *f;
 	guint32 c, v = 0;
@@ -170,35 +170,35 @@ camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const gchar *pat
 	CamelImapStoreNamespace *ns;
 
 	/* check to see if we have a subpath of path already defined */
-	subpath = alloca(strlen(path)+1);
-	strcpy(subpath, path);
+	subpath = alloca (strlen (path)+1);
+	strcpy (subpath, path);
 	do {
-		si = camel_store_summary_path((CamelStoreSummary *)s, subpath);
+		si = camel_store_summary_path ((CamelStoreSummary *)s, subpath);
 		if (si == NULL) {
-			last = strrchr(subpath, '/');
+			last = strrchr (subpath, '/');
 			if (last)
 				*last = 0;
 		}
 	} while (si == NULL && last);
 
 	/* path is already present, use the raw version we have */
-	if (si && strlen(subpath) == strlen(path)) {
-		f = g_strdup(camel_imap_store_info_full_name(s, si));
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+	if (si && strlen (subpath) == strlen (path)) {
+		f = g_strdup (camel_imap_store_info_full_name (s, si));
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		return f;
 	}
 
-	ns = camel_imap_store_summary_namespace_find_path(s, path);
+	ns = camel_imap_store_summary_namespace_find_path (s, path);
 
-	f = full = alloca(strlen(path)*2+1);
+	f = full = alloca (strlen (path)*2+1);
 	if (si)
-		p = path + strlen(subpath);
+		p = path + strlen (subpath);
 	else if (ns)
-		p = path + strlen(ns->path);
+		p = path + strlen (ns->path);
 	else
 		p = path;
 
-	while ((c = camel_utf8_getc((const guchar **)&p))) {
+	while ((c = camel_utf8_getc ((const guchar **)&p))) {
 		switch (state) {
 		case 0:
 			if (c == '%')
@@ -206,32 +206,32 @@ camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const gchar *pat
 			else {
 				if (c == '/')
 					c = dir_sep;
-				camel_utf8_putc((guchar **) &f, c);
+				camel_utf8_putc ((guchar **) &f, c);
 			}
 			break;
 		case 1:
 			state = 2;
-			v = hexnib(c)<<4;
+			v = hexnib (c)<<4;
 			break;
 		case 2:
 			state = 0;
-			v |= hexnib(c);
-			camel_utf8_putc((guchar **) &f, v);
+			v |= hexnib (c);
+			camel_utf8_putc ((guchar **) &f, v);
 			break;
 		}
 	}
-	camel_utf8_putc((guchar **) &f, c);
+	camel_utf8_putc ((guchar **) &f, c);
 
 	/* merge old path part if required */
-	f = g_strdup(full);
+	f = g_strdup (full);
 	if (si) {
 		full = g_strdup_printf("%s%s", camel_imap_store_info_full_name(s, si), f);
-		g_free(f);
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+		g_free (f);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		f = full;
 	} else if (ns) {
 		full = g_strdup_printf("%s%s", ns->full_name, f);
-		g_free(f);
+		g_free (f);
 		f = full;
 	}
 
@@ -239,7 +239,7 @@ camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const gchar *pat
 }
 
 CamelImapStoreInfo *
-camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *full, gchar dir_sep)
 {
 	CamelImapStoreInfo *info;
 	gchar *pathu8, *prefix;
@@ -249,30 +249,30 @@ camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const gchar *fu
 
 	d(printf("adding full name '%s' '%c'\n", full, dir_sep));
 
-	len = strlen(full);
-	full_name = alloca(len+1);
-	strcpy(full_name, full);
+	len = strlen (full);
+	full_name = alloca (len+1);
+	strcpy (full_name, full);
 	if (full_name[len-1] == dir_sep)
 		full_name[len-1] = 0;
 
-	info = camel_imap_store_summary_full_name(s, full_name);
+	info = camel_imap_store_summary_full_name (s, full_name);
 	if (info) {
-		camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		d(printf("  already there\n"));
 		return info;
 	}
 
-	ns = camel_imap_store_summary_namespace_find_full(s, full_name);
+	ns = camel_imap_store_summary_namespace_find_full (s, full_name);
 	if (ns) {
 		d(printf("(found namespace for '%s' ns '%s') ", full_name, ns->path));
-		len = strlen(ns->full_name);
-		if (len >= strlen(full_name)) {
-			pathu8 = g_strdup(ns->path);
+		len = strlen (ns->full_name);
+		if (len >= strlen (full_name)) {
+			pathu8 = g_strdup (ns->path);
 		} else {
 			if (full_name[len] == ns->sep)
 				len++;
 
-			prefix = camel_imap_store_summary_full_to_path(s, full_name+len, ns->sep);
+			prefix = camel_imap_store_summary_full_to_path (s, full_name+len, ns->sep);
 			if (*ns->path) {
 				pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
 				g_free (prefix);
@@ -283,13 +283,13 @@ camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const gchar *fu
 		d(printf(" (pathu8 = '%s')", pathu8));
 	} else {
 		d(printf("(Cannot find namespace for '%s')\n", full_name));
-		pathu8 = camel_imap_store_summary_full_to_path(s, full_name, dir_sep);
+		pathu8 = camel_imap_store_summary_full_to_path (s, full_name, dir_sep);
 	}
 
-	info = (CamelImapStoreInfo *)camel_store_summary_add_from_path((CamelStoreSummary *)s, pathu8);
+	info = (CamelImapStoreInfo *)camel_store_summary_add_from_path ((CamelStoreSummary *)s, pathu8);
 	if (info) {
 		d(printf("  '%s' -> '%s'\n", pathu8, full_name));
-		camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAP_STORE_INFO_FULL_NAME, full_name);
+		camel_store_info_set_string ((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAP_STORE_INFO_FULL_NAME, full_name);
 
 		if (!g_ascii_strcasecmp(full_name, "inbox"))
 			info->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
@@ -303,14 +303,14 @@ camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const gchar *fu
 /* should this be const? */
 /* TODO: deprecate/merge this function with path_to_full */
 gchar *
-camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const gchar *path)
+camel_imap_store_summary_full_from_path (CamelImapStoreSummary *s, const gchar *path)
 {
 	CamelImapStoreNamespace *ns;
 	gchar *name = NULL;
 
-	ns = camel_imap_store_summary_namespace_find_path(s, path);
+	ns = camel_imap_store_summary_namespace_find_path (s, path);
 	if (ns)
-		name = camel_imap_store_summary_path_to_full(s, path, ns->sep);
+		name = camel_imap_store_summary_path_to_full (s, path, ns->sep);
 
 	d(printf("looking up path %s -> %s\n", path, name?name:"not found"));
 
@@ -324,14 +324,14 @@ namespace_new (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep)
 	gchar *p, *o, c;
 	gint len;
 
-	ns = g_malloc0(sizeof(*ns));
-	ns->full_name = g_strdup(full_name);
-	len = strlen(ns->full_name)-1;
+	ns = g_malloc0 (sizeof (*ns));
+	ns->full_name = g_strdup (full_name);
+	len = strlen (ns->full_name)-1;
 	if (len >= 0 && ns->full_name[len] == dir_sep)
 		ns->full_name[len] = 0;
 	ns->sep = dir_sep;
 
-	o = p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep);
+	o = p = ns->path = camel_imap_store_summary_full_to_path (s, ns->full_name, dir_sep);
 	while ((c = *p++)) {
 		if (c != '#') {
 			if (c == '/')
@@ -437,16 +437,16 @@ camel_imap_store_summary_get_main_namespace (CamelImapStoreSummary *s)
 }
 
 CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const gchar *path)
+camel_imap_store_summary_namespace_find_path (CamelImapStoreSummary *s, const gchar *path)
 {
 	gint len;
 	CamelImapStoreNamespace *ns;
 
 	ns = s->namespace;
 	while (ns) {
-		len = strlen(ns->path);
+		len = strlen (ns->path);
 		if (len == 0
-		    || (strncmp(ns->path, path, len) == 0
+		    || (strncmp (ns->path, path, len) == 0
 			&& (path[len] == '/' || path[len] == 0)))
 			break;
 		ns = ns->next;
@@ -457,17 +457,17 @@ camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const gch
 }
 
 CamelImapStoreNamespace *
-camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const gchar *full)
+camel_imap_store_summary_namespace_find_full (CamelImapStoreSummary *s, const gchar *full)
 {
 	gint len;
 	CamelImapStoreNamespace *ns;
 
 	ns = s->namespace;
 	while (ns) {
-		len = strlen(ns->full_name);
+		len = strlen (ns->full_name);
 		d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
 		if (len == 0
-		    || (strncmp(ns->full_name, full, len) == 0
+		    || (strncmp (ns->full_name, full, len) == 0
 			&& (full[len] == ns->sep || full[len] == 0)))
 			break;
 		ns = ns->next;
@@ -480,9 +480,9 @@ camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const gch
 static void
 namespace_free (CamelImapStoreSummary *is, CamelImapStoreNamespace *ns)
 {
-	g_free(ns->path);
-	g_free(ns->full_name);
-	g_free(ns);
+	g_free (ns->path);
+	g_free (ns->full_name);
+	g_free (ns);
 }
 
 static void
@@ -507,7 +507,7 @@ namespaces_load (CamelImapStoreSummary *s, FILE *in, guint count)
 	tail = &s->namespace;
 
 	while (count > 0) {
-		ns = g_malloc0 (sizeof(*ns));
+		ns = g_malloc0 (sizeof (*ns));
 		if (camel_file_util_decode_string (in, &ns->path) == -1
 		    || camel_file_util_decode_string (in, &ns->full_name) == -1
 		    || camel_file_util_decode_uint32 (in, &sep) == -1) {
@@ -530,9 +530,9 @@ static gboolean
 namespaces_save (CamelImapStoreSummary *s, FILE *in, CamelImapStoreNamespace *ns)
 {
 	while (ns) {
-		if (camel_file_util_encode_string(in, ns->path) == -1
-		    || camel_file_util_encode_string(in, ns->full_name) == -1
-		    || camel_file_util_encode_uint32(in, (guint32)ns->sep) == -1)
+		if (camel_file_util_encode_string (in, ns->path) == -1
+		    || camel_file_util_encode_string (in, ns->full_name) == -1
+		    || camel_file_util_encode_uint32 (in, (guint32)ns->sep) == -1)
 			return FALSE;
 
 		ns = ns->next;
@@ -542,15 +542,15 @@ namespaces_save (CamelImapStoreSummary *s, FILE *in, CamelImapStoreNamespace *ns
 }
 
 static gint
-summary_header_load(CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelImapStoreSummary *is = (CamelImapStoreSummary *)s;
 	gint32 version, capabilities, count;
 
 	namespace_clear (is);
 
-	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->summary_header_load((CamelStoreSummary *)s, in) == -1
-	    || camel_file_util_decode_fixed_int32(in, &version) == -1)
+	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->summary_header_load ((CamelStoreSummary *)s, in) == -1
+	    || camel_file_util_decode_fixed_int32 (in, &version) == -1)
 		return -1;
 
 	is->version = version;
@@ -560,8 +560,8 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 		return -1;
 	}
 
-	if (camel_file_util_decode_fixed_int32(in, &capabilities) == -1
-	    || camel_file_util_decode_fixed_int32(in, &count) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, &capabilities) == -1
+	    || camel_file_util_decode_fixed_int32 (in, &count) == -1)
 		return -1;
 
 	is->capabilities = capabilities;
@@ -574,7 +574,7 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 }
 
 static gint
-summary_header_save(CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s, FILE *out)
 {
 	CamelImapStoreSummary *is = (CamelImapStoreSummary *)s;
 	guint32 count = 0;
@@ -585,10 +585,10 @@ summary_header_save(CamelStoreSummary *s, FILE *out)
 	}
 
 	/* always write as latest version */
-	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->summary_header_save((CamelStoreSummary *)s, out) == -1
-	    || camel_file_util_encode_fixed_int32(out, CAMEL_IMAP_STORE_SUMMARY_VERSION) == -1
-	    || camel_file_util_encode_fixed_int32(out, is->capabilities) == -1
-	    || camel_file_util_encode_fixed_int32(out, count) == -1)
+	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->summary_header_save ((CamelStoreSummary *)s, out) == -1
+	    || camel_file_util_encode_fixed_int32 (out, CAMEL_IMAP_STORE_SUMMARY_VERSION) == -1
+	    || camel_file_util_encode_fixed_int32 (out, is->capabilities) == -1
+	    || camel_file_util_encode_fixed_int32 (out, count) == -1)
 		return -1;
 
 	if (!namespaces_save (is, out, is->namespace))
@@ -598,14 +598,14 @@ summary_header_save(CamelStoreSummary *s, FILE *out)
 }
 
 static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelImapStoreInfo *mi;
 
-	mi = (CamelImapStoreInfo *) CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_load(s, in);
+	mi = (CamelImapStoreInfo *) CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_load (s, in);
 	if (mi) {
-		if (camel_file_util_decode_string(in, &mi->full_name) == -1) {
-			camel_store_summary_info_free(s, (CamelStoreInfo *)mi);
+		if (camel_file_util_decode_string (in, &mi->full_name) == -1) {
+			camel_store_summary_info_free (s, (CamelStoreInfo *)mi);
 			mi = NULL;
 		} else {
 			/* NB: this is done again for compatability */
@@ -618,28 +618,28 @@ store_info_load(CamelStoreSummary *s, FILE *in)
 }
 
 static gint
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
 {
 	CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
 
-	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_save(s, out, mi) == -1
-	    || camel_file_util_encode_string(out, isi->full_name) == -1)
+	if (CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_save (s, out, mi) == -1
+	    || camel_file_util_encode_string (out, isi->full_name) == -1)
 		return -1;
 
 	return 0;
 }
 
 static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
 {
 	CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
 
-	g_free(isi->full_name);
-	CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_free(s, mi);
+	g_free (isi->full_name);
+	CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_free (s, mi);
 }
 
 static const gchar *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 {
 	CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
 
@@ -651,27 +651,27 @@ store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 	case CAMEL_IMAP_STORE_INFO_FULL_NAME:
 		return isi->full_name;
 	default:
-		return CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_string(s, mi, type);
+		return CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_string (s, mi, type);
 	}
 }
 
 static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
 {
 	CamelImapStoreInfo *isi = (CamelImapStoreInfo *)mi;
 
-	g_assert(mi != NULL);
+	g_assert (mi != NULL);
 
 	switch (type) {
 	case CAMEL_IMAP_STORE_INFO_FULL_NAME:
 		d(printf("Set full name %s -> %s\n", isi->full_name, str));
 		camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-		g_free(isi->full_name);
-		isi->full_name = g_strdup(str);
+		g_free (isi->full_name);
+		isi->full_name = g_strdup (str);
 		camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 		break;
 	default:
-		CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_set_string(s, mi, type, str);
+		CAMEL_STORE_SUMMARY_CLASS (camel_imap_store_summary_parent_class)->store_info_set_string (s, mi, type, str);
 		break;
 	}
 }
diff --git a/camel/providers/imap/camel-imap-store-summary.h b/camel/providers/imap/camel-imap-store-summary.h
index ad31198..1bc0864 100644
--- a/camel/providers/imap/camel-imap-store-summary.h
+++ b/camel/providers/imap/camel-imap-store-summary.h
@@ -91,18 +91,18 @@ CamelImapStoreSummary      *camel_imap_store_summary_new	(void);
 void camel_imap_store_summary_namespace_set_main (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
 void camel_imap_store_summary_namespace_add_secondary (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
 CamelImapStoreNamespace *camel_imap_store_summary_get_main_namespace (CamelImapStoreSummary *s);
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const gchar *path);
-CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const gchar *full_name);
+CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_path (CamelImapStoreSummary *s, const gchar *path);
+CamelImapStoreNamespace *camel_imap_store_summary_namespace_find_full (CamelImapStoreSummary *s, const gchar *full_name);
 
 /* converts to/from utf8 canonical nasmes */
-gchar *camel_imap_store_summary_full_to_path(CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
-gchar *camel_imap_store_summary_path_to_full(CamelImapStoreSummary *s, const gchar *path, gchar dir_sep);
+gchar *camel_imap_store_summary_full_to_path (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
+gchar *camel_imap_store_summary_path_to_full (CamelImapStoreSummary *s, const gchar *path, gchar dir_sep);
 
-CamelImapStoreInfo *camel_imap_store_summary_full_name(CamelImapStoreSummary *s, const gchar *full_name);
-CamelImapStoreInfo *camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
+CamelImapStoreInfo *camel_imap_store_summary_full_name (CamelImapStoreSummary *s, const gchar *full_name);
+CamelImapStoreInfo *camel_imap_store_summary_add_from_full (CamelImapStoreSummary *s, const gchar *full_name, gchar dir_sep);
 
 /* a convenience lookup function. always use this if path known */
-gchar *camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const gchar *path);
+gchar *camel_imap_store_summary_full_from_path (CamelImapStoreSummary *s, const gchar *path);
 
 /* helper macro's */
 #define camel_imap_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_IMAP_STORE_INFO_FULL_NAME))
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index d241ee5..00ca4db 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -73,8 +73,8 @@ static gboolean construct (CamelService *service, CamelSession *session,
 static gchar *imap_get_name (CamelService *service, gboolean brief);
 
 static gboolean imap_noop (CamelStore *store, GError **error);
-static CamelFolder *imap_get_junk(CamelStore *store, GError **error);
-static CamelFolder *imap_get_trash(CamelStore *store, GError **error);
+static CamelFolder *imap_get_junk (CamelStore *store, GError **error);
+static CamelFolder *imap_get_trash (CamelStore *store, GError **error);
 static GList *query_auth_types (CamelService *service, GError **error);
 static guint hash_folder_name (gconstpointer key);
 static gint compare_folder_name (gconstpointer a, gconstpointer b);
@@ -88,11 +88,11 @@ static gboolean subscribe_folder (CamelStore *store, const gchar *folder_name,
 static gboolean unsubscribe_folder (CamelStore *store, const gchar *folder_name,
 				GError **error);
 
-static gboolean get_folders_sync(CamelImapStore *imap_store, const gchar *pattern, GError **error);
+static gboolean get_folders_sync (CamelImapStore *imap_store, const gchar *pattern, GError **error);
 
-static gboolean imap_folder_effectively_unsubscribed(CamelImapStore *imap_store, const gchar *folder_name, GError **error);
+static gboolean imap_folder_effectively_unsubscribed (CamelImapStore *imap_store, const gchar *folder_name, GError **error);
 static gboolean imap_check_folder_still_extant (CamelImapStore *imap_store, const gchar *full_name,  GError **error);
-static void imap_forget_folder(CamelImapStore *imap_store, const gchar *folder_name, GError **error);
+static void imap_forget_folder (CamelImapStore *imap_store, const gchar *folder_name, GError **error);
 static void imap_set_server_level (CamelImapStore *store);
 
 static gboolean imap_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, GError **error);
@@ -231,7 +231,7 @@ construct (CamelService *service, CamelSession *session,
 		imap_store->parameters |= IMAP_PARAM_SUBSCRIPTIONS;
 	if (camel_url_get_param (url, "override_namespace") && camel_url_get_param (url, "namespace")) {
 		imap_store->parameters |= IMAP_PARAM_OVERRIDE_NAMESPACE;
-		g_free(imap_store->users_namespace);
+		g_free (imap_store->users_namespace);
 		imap_store->users_namespace = g_strdup (camel_url_get_param (url, "namespace"));
 	}
 	if (camel_url_get_param (url, "check_all"))
@@ -279,25 +279,25 @@ construct (CamelService *service, CamelSession *session,
 	}
 
 	/* setup/load the store summary */
-	tmp = alloca(strlen(imap_store->storage_path)+32);
+	tmp = alloca (strlen (imap_store->storage_path)+32);
 	sprintf(tmp, "%s/.ev-store-summary", imap_store->storage_path);
-	imap_store->summary = camel_imap_store_summary_new();
-	camel_store_summary_set_filename((CamelStoreSummary *)imap_store->summary, tmp);
-	summary_url = camel_url_new(imap_store->base_url, NULL);
-	camel_store_summary_set_uri_base((CamelStoreSummary *)imap_store->summary, summary_url);
-	camel_url_free(summary_url);
-	if (camel_store_summary_load((CamelStoreSummary *)imap_store->summary) == 0) {
+	imap_store->summary = camel_imap_store_summary_new ();
+	camel_store_summary_set_filename ((CamelStoreSummary *)imap_store->summary, tmp);
+	summary_url = camel_url_new (imap_store->base_url, NULL);
+	camel_store_summary_set_uri_base ((CamelStoreSummary *)imap_store->summary, summary_url);
+	camel_url_free (summary_url);
+	if (camel_store_summary_load ((CamelStoreSummary *)imap_store->summary) == 0) {
 		CamelImapStoreSummary *is = imap_store->summary;
 
 		if (is->namespace) {
 			/* if namespace has changed, clear folder list */
-			if (imap_store->users_namespace && strcmp(imap_store->users_namespace, is->namespace->full_name) != 0) {
-				camel_store_summary_clear((CamelStoreSummary *)is);
+			if (imap_store->users_namespace && strcmp (imap_store->users_namespace, is->namespace->full_name) != 0) {
+				camel_store_summary_clear ((CamelStoreSummary *)is);
 			}
 		}
 
 		imap_store->capabilities = is->capabilities;
-		imap_set_server_level(imap_store);
+		imap_set_server_level (imap_store);
 	}
 
 	return TRUE;
@@ -344,7 +344,7 @@ static struct {
 };
 
 static void
-parse_capability(CamelImapStore *store, gchar *capa)
+parse_capability (CamelImapStore *store, gchar *capa)
 {
 	gchar *lasts = NULL;
 	gint i;
@@ -384,7 +384,7 @@ imap_get_capability (CamelService *service, GError **error)
 		return FALSE;
 
 	/* Skip over "* CAPABILITY ". */
-	parse_capability(store, result+13);
+	parse_capability (store, result+13);
 	g_free (result);
 
 	/* dunno why the groupwise guys didn't just list this in capabilities */
@@ -392,7 +392,7 @@ imap_get_capability (CamelService *service, GError **error)
 		/* not critical if this fails */
 		response = camel_imap_command (store, NULL, NULL, "XGWEXTENSIONS");
 		if (response && (result = camel_imap_response_extract (store, response, "XGWEXTENSIONS ", NULL))) {
-			parse_capability(store, result+16);
+			parse_capability (store, result+16);
 			g_free (result);
 		}
 	}
@@ -401,8 +401,8 @@ imap_get_capability (CamelService *service, GError **error)
 
 	if (store->summary->capabilities != store->capabilities) {
 		store->summary->capabilities = store->capabilities;
-		camel_store_summary_touch((CamelStoreSummary *)store->summary);
-		camel_store_summary_save((CamelStoreSummary *)store->summary);
+		camel_store_summary_touch ((CamelStoreSummary *)store->summary);
+		camel_store_summary_save ((CamelStoreSummary *)store->summary);
 	}
 
 	return TRUE;
@@ -479,12 +479,12 @@ connect_to_server (CamelService *service,
 	/* Disable Nagle - we send a lot of small requests which nagle slows down */
 	sockopt.option = CAMEL_SOCKOPT_NODELAY;
 	sockopt.value.no_delay = TRUE;
-	camel_tcp_stream_setsockopt((CamelTcpStream *)tcp_stream, &sockopt);
+	camel_tcp_stream_setsockopt ((CamelTcpStream *)tcp_stream, &sockopt);
 
 	/* Set keepalive - needed for some hosts/router configurations, we're idle a lot */
 	sockopt.option = CAMEL_SOCKOPT_KEEPALIVE;
 	sockopt.value.keep_alive = TRUE;
-	camel_tcp_stream_setsockopt((CamelTcpStream *)tcp_stream, &sockopt);
+	camel_tcp_stream_setsockopt ((CamelTcpStream *)tcp_stream, &sockopt);
 
 	/* Read the greeting, if any, and deal with PREAUTH */
 	if (camel_imap_store_readline (store, &buf, error) < 0) {
@@ -671,9 +671,9 @@ connect_to_server_process (CamelService *service, const gchar *cmd, GError **err
 
 	/* Put full details in the environment, in case the connection
 	   program needs them */
-	buf = camel_url_to_string(service->url, 0);
+	buf = camel_url_to_string (service->url, 0);
 	child_env[i++] = g_strdup_printf("URL=%s", buf);
-	g_free(buf);
+	g_free (buf);
 
 	child_env[i++] = g_strdup_printf("URLHOST=%s", service->url->host);
 	if (service->url->port)
@@ -687,7 +687,7 @@ connect_to_server_process (CamelService *service, const gchar *cmd, GError **err
 	child_env[i] = NULL;
 
 	/* Now do %h, %u, etc. substitution in cmd */
-	buf = cmd_copy = g_strdup(cmd);
+	buf = cmd_copy = g_strdup (cmd);
 
 	full_cmd = g_strdup("");
 
@@ -697,11 +697,11 @@ connect_to_server_process (CamelService *service, const gchar *cmd, GError **err
 		gchar *var;
 		gint len;
 
-		pc = strchr(buf, '%');
+		pc = strchr (buf, '%');
 	ignore:
 		if (!pc) {
 			tmp = g_strdup_printf("%s%s", full_cmd, buf);
-			g_free(full_cmd);
+			g_free (full_cmd);
 			full_cmd = tmp;
 			break;
 		}
@@ -721,24 +721,24 @@ connect_to_server_process (CamelService *service, const gchar *cmd, GError **err
 		if (!var) {
 			/* If there wasn't a valid %-code, with an actual
 			   variable to insert, pretend we didn't see the % */
-			pc = strchr(pc + 1, '%');
+			pc = strchr (pc + 1, '%');
 			goto ignore;
 		}
 		tmp = g_strdup_printf("%s%.*s%s", full_cmd, len, buf, var);
-		g_free(full_cmd);
+		g_free (full_cmd);
 		full_cmd = tmp;
 		buf = pc + 2;
 	}
 
-	g_free(cmd_copy);
+	g_free (cmd_copy);
 
 	cmd_stream = camel_stream_process_new ();
 
-	ret = camel_stream_process_connect (CAMEL_STREAM_PROCESS(cmd_stream),
+	ret = camel_stream_process_connect (CAMEL_STREAM_PROCESS (cmd_stream),
 					    full_cmd, (const gchar **)child_env);
 
 	while (i)
-		g_free(child_env[--i]);
+		g_free (child_env[--i]);
 
 	if (ret == -1) {
 		if (errno == EINTR)
@@ -834,7 +834,7 @@ connect_to_server_wrapper (CamelService *service, GError **error)
 
 	if (camel_url_get_param(service->url, "use_command")
 	    && (command = camel_url_get_param(service->url, "command")))
-		return connect_to_server_process(service, command, error);
+		return connect_to_server_process (service, command, error);
 #endif
 
 	if ((ssl_mode = camel_url_get_param (service->url, "use_ssl"))) {
@@ -901,14 +901,14 @@ query_auth_types (CamelService *service, GError **error)
 
 /* folder_name is path name */
 static CamelFolderInfo *
-imap_build_folder_info(CamelImapStore *imap_store, const gchar *folder_name)
+imap_build_folder_info (CamelImapStore *imap_store, const gchar *folder_name)
 {
 	CamelURL *url;
 	const gchar *name;
 	CamelFolderInfo *fi;
 
 	fi = camel_folder_info_new ();
-	fi->full_name = g_strdup(folder_name);
+	fi->full_name = g_strdup (folder_name);
 	fi->unread = -1;
 	fi->total = -1;
 
@@ -916,7 +916,7 @@ imap_build_folder_info(CamelImapStore *imap_store, const gchar *folder_name)
 	g_free (url->path);
 	url->path = g_strdup_printf ("/%s", folder_name);
 	fi->uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
-	camel_url_free(url);
+	camel_url_free (url);
 	name = strrchr (fi->full_name, '/');
 	if (name == NULL)
 		name = fi->full_name;
@@ -947,14 +947,14 @@ imap_folder_effectively_unsubscribed (CamelImapStore *imap_store,
 	CamelFolderInfo *fi;
 	CamelStoreInfo *si;
 
-	si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)imap_store->summary, folder_name);
 	if (si) {
 		if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
 			si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-			camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
-			camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
+			camel_store_summary_touch ((CamelStoreSummary *)imap_store->summary);
+			camel_store_summary_save ((CamelStoreSummary *)imap_store->summary);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
 
 	if (imap_store->renaming) {
@@ -965,7 +965,7 @@ imap_folder_effectively_unsubscribed (CamelImapStore *imap_store,
 
 	}
 
-	fi = imap_build_folder_info(imap_store, folder_name);
+	fi = imap_build_folder_info (imap_store, folder_name);
 	camel_store_folder_unsubscribed (CAMEL_STORE (imap_store), fi);
 	camel_folder_info_free (fi);
 
@@ -1008,18 +1008,18 @@ imap_forget_folder (CamelImapStore *imap_store, const gchar *folder_name, GError
 	camel_imap_message_cache_delete (folder_dir, NULL);
 
 	state_file = g_strdup_printf("%s/subfolders", folder_dir);
-	g_rmdir(state_file);
-	g_free(state_file);
+	g_rmdir (state_file);
+	g_free (state_file);
 
 	g_rmdir (folder_dir);
 	g_free (folder_dir);
 
  event:
 
-	camel_store_summary_remove_path((CamelStoreSummary *)imap_store->summary, folder_name);
-	camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
+	camel_store_summary_remove_path ((CamelStoreSummary *)imap_store->summary, folder_name);
+	camel_store_summary_save ((CamelStoreSummary *)imap_store->summary);
 
-	fi = imap_build_folder_info(imap_store, folder_name);
+	fi = imap_build_folder_info (imap_store, folder_name);
 	camel_store_folder_deleted (CAMEL_STORE (imap_store), fi);
 	camel_folder_info_free (fi);
 }
@@ -1368,7 +1368,7 @@ imap_connect (CamelService *service, GError **error)
 	camel_imap_store_summary_namespace_set_main (store->summary, store->users_namespace, store->dir_sep);
 
 	if ((store->parameters & IMAP_PARAM_SUBSCRIPTIONS)
-	    && camel_store_summary_count((CamelStoreSummary *)store->summary) == 0) {
+	    && camel_store_summary_count ((CamelStoreSummary *)store->summary) == 0) {
 		CamelStoreInfo *si;
 
 		/* look in all namespaces */
@@ -1383,18 +1383,18 @@ imap_connect (CamelService *service, GError **error)
 				camel_imap_response_free (store, response);
 			}
 			if (si)
-				camel_store_summary_info_free((CamelStoreSummary *)store->summary, si);
+				camel_store_summary_info_free ((CamelStoreSummary *)store->summary, si);
 			if (local_error != NULL)
 				goto done;
 			get_folders_sync(store, "INBOX", &local_error);
 		}
 
-		store->refresh_stamp = time(NULL);
+		store->refresh_stamp = time (NULL);
 	}
 
 done:
 	/* save any changes we had */
-	camel_store_summary_save((CamelStoreSummary *)store->summary);
+	camel_store_summary_save ((CamelStoreSummary *)store->summary);
 
 	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
@@ -1420,13 +1420,13 @@ imap_disconnect (CamelService *service, gboolean clean, GError **error)
 	}
 
 	if (store->istream) {
-		camel_stream_close(store->istream, NULL);
+		camel_stream_close (store->istream, NULL);
 		g_object_unref (store->istream);
 		store->istream = NULL;
 	}
 
 	if (store->ostream) {
-		camel_stream_close(store->ostream, NULL);
+		camel_stream_close (store->ostream, NULL);
 		g_object_unref (store->ostream);
 		store->ostream = NULL;
 	}
@@ -1464,7 +1464,7 @@ imap_summary_is_dirty (CamelFolderSummary *summary)
 		info = (CamelImapMessageInfo *)camel_folder_summary_index (summary, i);
 		if (info) {
 			found = info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED;
-			camel_message_info_free(info);
+			camel_message_info_free (info);
 		}
 	}
 
@@ -1482,7 +1482,7 @@ imap_noop (CamelStore *store,
 
 	camel_service_lock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	if (!camel_imap_store_connected(imap_store, error)) {
+	if (!camel_imap_store_connected (imap_store, error)) {
 		success = FALSE;
 		goto done;
 	}
@@ -1505,7 +1505,7 @@ done:
 }
 
 static CamelFolder *
-imap_get_trash(CamelStore *store, GError **error)
+imap_get_trash (CamelStore *store, GError **error)
 {
 	CamelFolder *folder = NULL;
 	CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
@@ -1522,14 +1522,14 @@ imap_get_trash(CamelStore *store, GError **error)
 	if (folder)
 		return folder;
 
-	folder = CAMEL_STORE_CLASS(camel_imap_store_parent_class)->get_trash(store, error);
+	folder = CAMEL_STORE_CLASS (camel_imap_store_parent_class)->get_trash (store, error);
 
 	if (folder) {
 		CamelObject *object = CAMEL_OBJECT (folder);
 		gchar *state = g_build_filename(((CamelImapStore *)store)->storage_path, "system", "Trash.cmeta", NULL);
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -1538,7 +1538,7 @@ imap_get_trash(CamelStore *store, GError **error)
 }
 
 static CamelFolder *
-imap_get_junk(CamelStore *store, GError **error)
+imap_get_junk (CamelStore *store, GError **error)
 {
 	CamelFolder *folder = NULL;
 	CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
@@ -1555,14 +1555,14 @@ imap_get_junk(CamelStore *store, GError **error)
 	if (folder)
 		return folder;
 
-	folder = CAMEL_STORE_CLASS(camel_imap_store_parent_class)->get_junk(store, error);
+	folder = CAMEL_STORE_CLASS (camel_imap_store_parent_class)->get_junk (store, error);
 
 	if (folder) {
 		CamelObject *object = CAMEL_OBJECT (folder);
 		gchar *state = g_build_filename(((CamelImapStore *)store)->storage_path, "system", "Junk.cmeta", NULL);
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -1707,7 +1707,7 @@ get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError *
 
 	/* Try to get it locally first, if it is, then the client will
 	   force a select when necessary */
-	new_folder = get_folder_offline(store, folder_name, flags, &local_error);
+	new_folder = get_folder_offline (store, folder_name, flags, &local_error);
 	if (new_folder)
 		return new_folder;
 
@@ -1723,7 +1723,7 @@ get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError *
 
 	camel_service_lock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	if (!camel_imap_store_connected(imap_store, error)) {
+	if (!camel_imap_store_connected (imap_store, error)) {
 		camel_service_unlock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		return NULL;
 	}
@@ -1758,7 +1758,7 @@ get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError *
 			return NULL;
 		}
 
-		parent_name = strrchr(folder_name, '/');
+		parent_name = strrchr (folder_name, '/');
 		c = parent_name ? parent_name+1 : folder_name;
 		while (*c && *c != imap_store->dir_sep && !strchr ("#%*", *c))
 			c++;
@@ -1867,16 +1867,16 @@ get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError *
 
 		g_free (parent_name);
 
-		folder_real = camel_imap_store_summary_path_to_full(imap_store->summary, folder_name, imap_store->dir_sep);
+		folder_real = camel_imap_store_summary_path_to_full (imap_store->summary, folder_name, imap_store->dir_sep);
 		response = camel_imap_command (imap_store, NULL, error, "CREATE %G", folder_real);
 		if (response) {
-			camel_imap_store_summary_add_from_full(imap_store->summary, folder_real, imap_store->dir_sep);
+			camel_imap_store_summary_add_from_full (imap_store->summary, folder_real, imap_store->dir_sep);
 
 			camel_imap_response_free (imap_store, response);
 
 			response = camel_imap_command (imap_store, NULL, NULL, "SELECT %F", folder_name);
 		}
-		g_free(folder_real);
+		g_free (folder_real);
 		if (!response) {
 			camel_service_unlock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 			return NULL;
@@ -1896,7 +1896,7 @@ get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError *
 
 	storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
 	folder_dir = imap_path_to_physical (storage_path, folder_name);
-	g_free(storage_path);
+	g_free (storage_path);
 	new_folder = camel_imap_folder_new (store, folder_name, folder_dir, error);
 	g_free (folder_dir);
 	if (new_folder) {
@@ -1924,7 +1924,7 @@ get_folder_offline (CamelStore *store, const gchar *folder_name,
 	CamelFolder *new_folder = NULL;
 	CamelStoreInfo *si;
 
-	si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)imap_store->summary, folder_name);
 	if (si) {
 		gchar *folder_dir, *storage_path;
 
@@ -1940,11 +1940,11 @@ get_folder_offline (CamelStore *store, const gchar *folder_name,
 
 		storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
 		folder_dir = imap_path_to_physical (storage_path, folder_name);
-		g_free(storage_path);
+		g_free (storage_path);
 		new_folder = camel_imap_folder_new (store, folder_name, folder_dir, error);
-		g_free(folder_dir);
+		g_free (folder_dir);
 
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	} else {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
@@ -1966,7 +1966,7 @@ delete_folder (CamelStore *store,
 
 	camel_service_lock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	if (!camel_imap_store_connected(imap_store, error)) {
+	if (!camel_imap_store_connected (imap_store, error)) {
 		success = FALSE;
 		goto fail;
 	}
@@ -2002,22 +2002,22 @@ manage_subscriptions (CamelStore *store, const gchar *old_name, gboolean subscri
 {
 	CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
 	CamelStoreInfo *si;
-	gint olen = strlen(old_name);
+	gint olen = strlen (old_name);
 	const gchar *path;
 	gint i, count;
 
-	count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
+	count = camel_store_summary_count ((CamelStoreSummary *)imap_store->summary);
 	for (i=0;i<count;i++) {
-		si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
+		si = camel_store_summary_index ((CamelStoreSummary *)imap_store->summary, i);
 		if (si) {
-			path = camel_store_info_path(imap_store->summary, si);
-			if (strncmp(path, old_name, olen) == 0) {
+			path = camel_store_info_path (imap_store->summary, si);
+			if (strncmp (path, old_name, olen) == 0) {
 				if (subscribe)
-					subscribe_folder(store, path, NULL);
+					subscribe_folder (store, path, NULL);
 				else
-					unsubscribe_folder(store, path, NULL);
+					unsubscribe_folder (store, path, NULL);
 			}
-			camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+			camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 		}
 	}
 }
@@ -2027,22 +2027,22 @@ rename_folder_info (CamelImapStore *imap_store, const gchar *old_name, const gch
 {
 	gint i, count;
 	CamelStoreInfo *si;
-	gint olen = strlen(old_name);
+	gint olen = strlen (old_name);
 	const gchar *path;
 	gchar *npath, *nfull;
 
-	count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
+	count = camel_store_summary_count ((CamelStoreSummary *)imap_store->summary);
 	for (i=0;i<count;i++) {
-		si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
+		si = camel_store_summary_index ((CamelStoreSummary *)imap_store->summary, i);
 		if (si == NULL)
 			continue;
-		path = camel_store_info_path(imap_store->summary, si);
-		if (strncmp(path, old_name, olen) == 0) {
-			if (strlen(path) > olen)
+		path = camel_store_info_path (imap_store->summary, si);
+		if (strncmp (path, old_name, olen) == 0) {
+			if (strlen (path) > olen)
 				npath = g_strdup_printf("%s/%s", new_name, path+olen+1);
 			else
-				npath = g_strdup(new_name);
-			nfull = camel_imap_store_summary_path_to_full(imap_store->summary, npath, imap_store->dir_sep);
+				npath = g_strdup (new_name);
+			nfull = camel_imap_store_summary_path_to_full (imap_store->summary, npath, imap_store->dir_sep);
 
 			/* workaround for broken server (courier uses '.') that doesn't rename
 			   subordinate folders as required by rfc 2060 */
@@ -2054,14 +2054,14 @@ rename_folder_info (CamelImapStore *imap_store, const gchar *old_name, const gch
 					camel_imap_response_free (imap_store, response);
 			}
 
-			camel_store_info_set_string((CamelStoreSummary *)imap_store->summary, si, CAMEL_STORE_INFO_PATH, npath);
-			camel_store_info_set_string((CamelStoreSummary *)imap_store->summary, si, CAMEL_IMAP_STORE_INFO_FULL_NAME, nfull);
+			camel_store_info_set_string ((CamelStoreSummary *)imap_store->summary, si, CAMEL_STORE_INFO_PATH, npath);
+			camel_store_info_set_string ((CamelStoreSummary *)imap_store->summary, si, CAMEL_IMAP_STORE_INFO_FULL_NAME, nfull);
 
-			camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
-			g_free(nfull);
-			g_free(npath);
+			camel_store_summary_touch ((CamelStoreSummary *)imap_store->summary);
+			g_free (nfull);
+			g_free (npath);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
 }
 
@@ -2078,7 +2078,7 @@ rename_folder (CamelStore *store,
 
 	camel_service_lock (CAMEL_SERVICE (imap_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	if (!camel_imap_store_connected(imap_store, error)) {
+	if (!camel_imap_store_connected (imap_store, error)) {
 		success = FALSE;
 		goto fail;
 	}
@@ -2100,12 +2100,12 @@ rename_folder (CamelStore *store,
 
 	imap_store->renaming = TRUE;
 	if (imap_store->parameters & IMAP_PARAM_SUBSCRIPTIONS)
-		manage_subscriptions(store, old_name, FALSE);
+		manage_subscriptions (store, old_name, FALSE);
 
 	response = camel_imap_command (imap_store, NULL, error, "RENAME %F %F", old_name, new_name_in);
 	if (!response) {
 		if (imap_store->parameters & IMAP_PARAM_SUBSCRIPTIONS)
-			manage_subscriptions(store, old_name, TRUE);
+			manage_subscriptions (store, old_name, TRUE);
 		success = FALSE;
 		goto fail;
 	}
@@ -2113,10 +2113,10 @@ rename_folder (CamelStore *store,
 	camel_imap_response_free (imap_store, response);
 
 	/* rename summary, and handle broken server */
-	rename_folder_info(imap_store, old_name, new_name_in);
+	rename_folder_info (imap_store, old_name, new_name_in);
 
 	if (imap_store->parameters & IMAP_PARAM_SUBSCRIPTIONS)
-		manage_subscriptions(store, new_name_in, TRUE);
+		manage_subscriptions (store, new_name_in, TRUE);
 
 	storage_path = g_strdup_printf("%s/folders", imap_store->storage_path);
 	oldpath = imap_path_to_physical (storage_path, old_name);
@@ -2198,7 +2198,7 @@ create_folder (CamelStore *store, const gchar *parent_name,
 	/* check if the parent allows inferiors */
 
 	/* FIXME: use storesummary directly */
-	parent_real = camel_imap_store_summary_full_from_path(imap_store->summary, parent_name);
+	parent_real = camel_imap_store_summary_full_from_path (imap_store->summary, parent_name);
 	if (parent_real == NULL) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
@@ -2211,7 +2211,7 @@ create_folder (CamelStore *store, const gchar *parent_name,
 	response = camel_imap_command (imap_store, NULL, error, "LIST \"\" %G",
 				       parent_real);
 	if (!response) /* whoa, this is bad */ {
-		g_free(parent_real);
+		g_free (parent_real);
 		return NULL;
 	}
 
@@ -2227,7 +2227,7 @@ create_folder (CamelStore *store, const gchar *parent_name,
 				need_convert = TRUE;
 		}
 
-		g_free(thisone);
+		g_free (thisone);
 	}
 
 	camel_imap_response_free (imap_store, response);
@@ -2255,7 +2255,7 @@ create_folder (CamelStore *store, const gchar *parent_name,
 				error, CAMEL_FOLDER_ERROR,
 				CAMEL_FOLDER_ERROR_INVALID_STATE,
 				_("The parent folder is not allowed to contain subfolders"));
-			g_free(parent_real);
+			g_free (parent_real);
 			return NULL;
 		}
 
@@ -2270,18 +2270,18 @@ create_folder (CamelStore *store, const gchar *parent_name,
 		g_free (name);
 
 		if (!response) {
-			g_free(parent_real);
+			g_free (parent_real);
 			return NULL;
 		} else
 			camel_imap_response_free (imap_store, response);
 
-		root = imap_build_folder_info(imap_store, parent_name);
+		root = imap_build_folder_info (imap_store, parent_name);
 	}
 
 	/* ok now we can create the folder */
-	real_name = camel_imap_store_summary_path_to_full(imap_store->summary, folder_name, imap_store->dir_sep);
+	real_name = camel_imap_store_summary_path_to_full (imap_store->summary, folder_name, imap_store->dir_sep);
 	full_name = imap_concat (imap_store, parent_real, real_name);
-	g_free(real_name);
+	g_free (real_name);
 	response = camel_imap_command (imap_store, NULL, error, "CREATE %G", full_name);
 
 	if (response) {
@@ -2290,9 +2290,9 @@ create_folder (CamelStore *store, const gchar *parent_name,
 
 		camel_imap_response_free (imap_store, response);
 
-		si = camel_imap_store_summary_add_from_full(imap_store->summary, full_name, imap_store->dir_sep);
-		camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
-		fi = imap_build_folder_info(imap_store, camel_store_info_path(imap_store->summary, si));
+		si = camel_imap_store_summary_add_from_full (imap_store->summary, full_name, imap_store->dir_sep);
+		camel_store_summary_save ((CamelStoreSummary *)imap_store->summary);
+		fi = imap_build_folder_info (imap_store, camel_store_info_path (imap_store->summary, si));
 		fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 		if (root) {
 			root->child = fi;
@@ -2304,12 +2304,12 @@ create_folder (CamelStore *store, const gchar *parent_name,
 	} else if (root) {
 		/* need to re-recreate the folder we just deleted */
 		camel_store_folder_created (store, root);
-		camel_folder_info_free(root);
+		camel_folder_info_free (root);
 		root = NULL;
 	}
 
 	g_free (full_name);
-	g_free(parent_real);
+	g_free (parent_real);
 
 	return root;
 }
@@ -2330,26 +2330,26 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
 
 	/* FIXME: should use imap_build_folder_info, note the differences with param setting tho */
 
-	si = camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
-	g_free(dir);
+	si = camel_imap_store_summary_add_from_full (imap_store->summary, dir, sep?sep:'/');
+	g_free (dir);
 	if (si == NULL)
 		return NULL;
 
 	newflags = (si->info.flags & (CAMEL_STORE_INFO_FOLDER_SUBSCRIBED | CAMEL_STORE_INFO_FOLDER_CHECK_FOR_NEW)) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
 	if (si->info.flags != newflags) {
 		si->info.flags = newflags;
-		camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
+		camel_store_summary_touch ((CamelStoreSummary *)imap_store->summary);
 	}
 
 	flags = (flags & ~CAMEL_FOLDER_SUBSCRIBED) | (si->info.flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED);
 
 	fi = camel_folder_info_new ();
-	fi->full_name = g_strdup(camel_store_info_path(imap_store->summary, si));
+	fi->full_name = g_strdup (camel_store_info_path (imap_store->summary, si));
 	if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
 		flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
 		fi->name = g_strdup (_("Inbox"));
 	} else
-		fi->name = g_strdup(camel_store_info_name(imap_store->summary, si));
+		fi->name = g_strdup (camel_store_info_name (imap_store->summary, si));
 
 	/* HACK: some servers report noinferiors for all folders (uw-imapd)
 	   We just translate this into nochildren, and let the imap layer enforce
@@ -2359,9 +2359,9 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
 	fi->flags = flags;
 
 	url = camel_url_new (imap_store->base_url, NULL);
-	path = alloca(strlen(fi->full_name)+2);
+	path = alloca (strlen (fi->full_name)+2);
 	sprintf(path, "/%s", fi->full_name);
-	camel_url_set_path(url, path);
+	camel_url_set_path (url, path);
 
 	if ((flags & CAMEL_FOLDER_NOSELECT) != 0 || fi->name[0] == 0)
 		camel_url_set_param (url, "noselect", "yes");
@@ -2408,17 +2408,17 @@ static gint imap_match_pattern (CamelImapStoreNamespace *ns, const gchar *patter
 
 /* imap needs to treat inbox case insensitive */
 /* we'll assume the names are normalized already */
-static guint folder_hash(gconstpointer ap)
+static guint folder_hash (gconstpointer ap)
 {
 	const gchar *a = ap;
 
 	if (g_ascii_strcasecmp(a, "INBOX") == 0)
 		a = "INBOX";
 
-	return g_str_hash(a);
+	return g_str_hash (a);
 }
 
-static gint folder_eq(gconstpointer ap, gconstpointer bp)
+static gint folder_eq (gconstpointer ap, gconstpointer bp)
 {
 	const gchar *a = ap;
 	const gchar *b = bp;
@@ -2428,13 +2428,13 @@ static gint folder_eq(gconstpointer ap, gconstpointer bp)
 	if (g_ascii_strcasecmp(b, "INBOX") == 0)
 		b = "INBOX";
 
-	return g_str_equal(a, b);
+	return g_str_equal (a, b);
 }
 
 static void
-get_folders_free(gpointer k, gpointer v, gpointer d)
+get_folders_free (gpointer k, gpointer v, gpointer d)
 {
-	camel_folder_info_free(v);
+	camel_folder_info_free (v);
 }
 
 static gboolean
@@ -2452,7 +2452,7 @@ get_folders_sync (CamelImapStore *imap_store, const gchar *ppattern, GError **er
 
 	/* We do a LIST followed by LSUB, and merge the results.  LSUB may not be a strict
 	   subset of LIST for some servers, so we can't use either or separately */
-	present = g_hash_table_new(folder_hash, folder_eq);
+	present = g_hash_table_new (folder_hash, folder_eq);
 
 	if (!pattern)
 		pattern = "";
@@ -2486,18 +2486,18 @@ get_folders_sync (CamelImapStore *imap_store, const gchar *ppattern, GError **er
 					list = response->untagged->pdata[i];
 					fi = parse_list_response_as_folder_info (imap_store, list);
 					if (fi && *fi->full_name) {
-						hfi = g_hash_table_lookup(present, fi->full_name);
+						hfi = g_hash_table_lookup (present, fi->full_name);
 						if (hfi == NULL) {
 							if (j == 1) {
 								fi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
 								if ((fi->flags & (CAMEL_IMAP_FOLDER_MARKED | CAMEL_IMAP_FOLDER_UNMARKED)))
 									imap_store->capabilities |= IMAP_CAPABILITY_useful_lsub;
 							}
-							g_hash_table_insert(present, fi->full_name, fi);
+							g_hash_table_insert (present, fi->full_name, fi);
 						} else {
 							if (j == 1)
 								hfi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-							camel_folder_info_free(fi);
+							camel_folder_info_free (fi);
 						}
 					} else if (fi) {
 						camel_folder_info_free (fi);
@@ -2518,12 +2518,12 @@ get_folders_sync (CamelImapStore *imap_store, const gchar *ppattern, GError **er
 	/* Sync summary to match */
 
 	/* FIXME: we need to emit folder_create/subscribed/etc events for any new folders */
-	count = camel_store_summary_count((CamelStoreSummary *)imap_store->summary);
+	count = camel_store_summary_count ((CamelStoreSummary *)imap_store->summary);
 
 	for (i=0;i<count;i++) {
 		const gchar *full_name;
 
-		si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
+		si = camel_store_summary_index ((CamelStoreSummary *)imap_store->summary, i);
 		if (si == NULL)
 			continue;
 
@@ -2534,10 +2534,10 @@ get_folders_sync (CamelImapStore *imap_store, const gchar *ppattern, GError **er
 		}
 
 		if (!ppattern || imap_match_pattern (camel_imap_store_summary_namespace_find_full (imap_store->summary, full_name), pattern, full_name)) {
-			if ((fi = g_hash_table_lookup(present, camel_store_info_path(imap_store->summary, si))) != NULL) {
+			if ((fi = g_hash_table_lookup (present, camel_store_info_path (imap_store->summary, si))) != NULL) {
 				if (((fi->flags ^ si->flags) & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)) {
 					si->flags = (si->flags & ~CAMEL_FOLDER_SUBSCRIBED) | (fi->flags & CAMEL_FOLDER_SUBSCRIBED);
-					camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
+					camel_store_summary_touch ((CamelStoreSummary *)imap_store->summary);
 
 					camel_store_folder_created (CAMEL_STORE (imap_store), fi);
 					camel_store_folder_subscribed (CAMEL_STORE (imap_store), fi);
@@ -2558,18 +2558,18 @@ get_folders_sync (CamelImapStore *imap_store, const gchar *ppattern, GError **er
 				i--;
 			}
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
 fail:
-	g_hash_table_foreach(present, get_folders_free, NULL);
-	g_hash_table_destroy(present);
+	g_hash_table_foreach (present, get_folders_free, NULL);
+	g_hash_table_destroy (present);
 
 	return success;
 }
 
 #if 0
 static void
-dumpfi(CamelFolderInfo *fi)
+dumpfi (CamelFolderInfo *fi)
 {
 	gint depth;
 	CamelFolderInfo *n = fi;
@@ -2586,18 +2586,18 @@ dumpfi(CamelFolderInfo *fi)
 	while (fi) {
 		printf("%-25s %-25s %*s\n", fi->name, fi->full_name, (gint)(depth*2+strlen(fi->uri)), fi->uri);
 		if (fi->child)
-			dumpfi(fi->child);
+			dumpfi (fi->child);
 		fi = fi->next;
 	}
 }
 #endif
 
 static void
-fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
+fill_fi (CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 {
 	CamelFolder *folder;
 
-	folder = camel_object_bag_peek(store->folders, fi->full_name);
+	folder = camel_object_bag_peek (store->folders, fi->full_name);
 	if (folder) {
 		CamelImapSummary *ims;
 
@@ -2623,7 +2623,7 @@ struct _refresh_msg {
 };
 
 static void
-refresh_refresh(CamelSession *session, CamelSessionThreadMsg *msg)
+refresh_refresh (CamelSession *session, CamelSessionThreadMsg *msg)
 {
 	struct _refresh_msg *m = (struct _refresh_msg *)msg;
 	CamelImapStore *store = (CamelImapStore *)m->store;
@@ -2648,7 +2648,7 @@ done:
 }
 
 static void
-refresh_free(CamelSession *session, CamelSessionThreadMsg *msg)
+refresh_free (CamelSession *session, CamelSessionThreadMsg *msg)
 {
 	struct _refresh_msg *m = (struct _refresh_msg *)msg;
 
@@ -2686,11 +2686,11 @@ get_folder_info (CamelStore *store,
 	}
 
 	if ((flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED)
-	    && camel_store_summary_count((CamelStoreSummary *)imap_store->summary) > 0) {
+	    && camel_store_summary_count ((CamelStoreSummary *)imap_store->summary) > 0) {
 		time_t now;
 		gint ref;
 
-		now = time(NULL);
+		now = time (NULL);
 		ref = now > imap_store->refresh_stamp+60*60*1;
 		if (ref) {
 			camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -2700,10 +2700,10 @@ get_folder_info (CamelStore *store,
 
 				imap_store->refresh_stamp = now;
 
-				m = camel_session_thread_msg_new(((CamelService *)store)->session, &refresh_ops, sizeof(*m));
+				m = camel_session_thread_msg_new (((CamelService *)store)->session, &refresh_ops, sizeof (*m));
 				m->store = g_object_ref (store);
 				m->error = NULL;
-				camel_session_thread_queue(((CamelService *)store)->session, &m->msg, 0);
+				camel_session_thread_queue (((CamelService *)store)->session, &m->msg, 0);
 			}
 			camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 		}
@@ -2714,7 +2714,7 @@ get_folder_info (CamelStore *store,
 
 		camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-		if (!camel_imap_store_connected((CamelImapStore *)store, error))
+		if (!camel_imap_store_connected ((CamelImapStore *)store, error))
 			goto fail;
 
 		if (top[0] == 0) {
@@ -2725,14 +2725,14 @@ get_folder_info (CamelStore *store,
 		} else {
 			gchar *name;
 
-			name = camel_imap_store_summary_full_from_path(imap_store->summary, top);
+			name = camel_imap_store_summary_full_from_path (imap_store->summary, top);
 			if (name == NULL)
-				name = camel_imap_store_summary_path_to_full(imap_store->summary, top, imap_store->dir_sep);
+				name = camel_imap_store_summary_path_to_full (imap_store->summary, top, imap_store->dir_sep);
 
-			i = strlen(name);
-			pattern = g_alloca(i+5);
-			strcpy(pattern, name);
-			g_free(name);
+			i = strlen (name);
+			pattern = g_alloca (i+5);
+			strcpy (pattern, name);
+			g_free (name);
 		}
 
 		ns = camel_imap_store_summary_get_main_namespace (imap_store->summary);
@@ -2742,13 +2742,13 @@ get_folder_info (CamelStore *store,
 			pattern[i] = ns->sep;
 			pattern[i+1] = (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)?'*':'%';
 			pattern[i+2] = 0;
-			get_folders_sync(imap_store, pattern, NULL);
+			get_folders_sync (imap_store, pattern, NULL);
 		}
-		camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
+		camel_store_summary_save ((CamelStoreSummary *)imap_store->summary);
 		camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 	}
 
-	tree = get_folder_info_offline(store, top, flags, error);
+	tree = get_folder_info_offline (store, top, flags, error);
 	return tree;
 
 fail:
@@ -2784,9 +2784,9 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 	if (top[0] == 0) {
 		name = g_strdup("");
 	} else {
-		name = camel_imap_store_summary_full_from_path(imap_store->summary, top);
+		name = camel_imap_store_summary_full_from_path (imap_store->summary, top);
 		if (name == NULL)
-			name = camel_imap_store_summary_path_to_full(imap_store->summary, top, imap_store->dir_sep);
+			name = camel_imap_store_summary_path_to_full (imap_store->summary, top, imap_store->dir_sep);
 	}
 
 	main_ns = camel_imap_store_summary_get_main_namespace (imap_store->summary);
@@ -2797,8 +2797,8 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 	 * the moment. So let it do the right thing by bailing out if it's
 	 * not a folder we're explicitly interested in. */
 
-	for (i=0;i<camel_store_summary_count((CamelStoreSummary *)imap_store->summary);i++) {
-		CamelStoreInfo *si = camel_store_summary_index((CamelStoreSummary *)imap_store->summary, i);
+	for (i=0;i<camel_store_summary_count ((CamelStoreSummary *)imap_store->summary);i++) {
+		CamelStoreInfo *si = camel_store_summary_index ((CamelStoreSummary *)imap_store->summary, i);
 		const gchar *full_name;
 
 		if (si == NULL)
@@ -2821,7 +2821,7 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 			|| (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)
 			|| (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST) != 0)) {
 
-			fi = imap_build_folder_info(imap_store, camel_store_info_path((CamelStoreSummary *)imap_store->summary, si));
+			fi = imap_build_folder_info (imap_store, camel_store_info_path ((CamelStoreSummary *)imap_store->summary, si));
 			fi->unread = si->unread;
 			fi->total = si->total;
 			fi->flags = si->flags;
@@ -2848,26 +2848,26 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 			}
 
 			if (si->flags & CAMEL_FOLDER_NOSELECT) {
-				CamelURL *url = camel_url_new(fi->uri, NULL);
+				CamelURL *url = camel_url_new (fi->uri, NULL);
 
 				camel_url_set_param (url, "noselect", "yes");
-				g_free(fi->uri);
+				g_free (fi->uri);
 				fi->uri = camel_url_to_string (url, 0);
 				camel_url_free (url);
 			} else {
-				fill_fi((CamelStore *)imap_store, fi, 0);
+				fill_fi ((CamelStore *)imap_store, fi, 0);
 			}
 			if (!fi->child)
 				fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 			g_ptr_array_add (folders, fi);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
-	g_free(pattern);
+	g_free (pattern);
 
 	fi = camel_folder_info_build (folders, top, '/', TRUE);
 	g_ptr_array_free (folders, TRUE);
-	g_free(name);
+	g_free (name);
 
 	return fi;
 }
@@ -2880,10 +2880,10 @@ folder_is_subscribed (CamelStore *store,
 	CamelStoreInfo *si;
 	gint truth = FALSE;
 
-	si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)imap_store->summary, folder_name);
 	if (si) {
 		truth = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
 
 	return truth;
@@ -2917,14 +2917,14 @@ subscribe_folder (CamelStore *store,
 
 	camel_imap_response_free (imap_store, response);
 
-	si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)imap_store->summary, folder_name);
 	if (si) {
 		if ((si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) == 0) {
 			si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-			camel_store_summary_touch((CamelStoreSummary *)imap_store->summary);
-			camel_store_summary_save((CamelStoreSummary *)imap_store->summary);
+			camel_store_summary_touch ((CamelStoreSummary *)imap_store->summary);
+			camel_store_summary_save ((CamelStoreSummary *)imap_store->summary);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imap_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imap_store->summary, si);
 	}
 
 	if (imap_store->renaming) {
@@ -2934,7 +2934,7 @@ subscribe_folder (CamelStore *store,
 		goto done;
 	}
 
-	fi = imap_build_folder_info(imap_store, folder_name);
+	fi = imap_build_folder_info (imap_store, folder_name);
 	fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 
 	camel_store_folder_subscribed (store, fi);
@@ -3012,7 +3012,7 @@ camel_imap_store_connected (CamelImapStore *store, GError **error)
 
 	if (store->istream != NULL
 	    || (((CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL)
-		&& camel_service_connect((CamelService *)store, NULL)
+		&& camel_service_connect ((CamelService *)store, NULL)
 		&& store->istream != NULL)))
 		return TRUE;
 
@@ -3097,7 +3097,7 @@ imap_can_refresh_folder (CamelStore *store,
 	gboolean res;
 	GError *local_error = NULL;
 
-	res = CAMEL_STORE_CLASS(camel_imap_store_parent_class)->can_refresh_folder (store, info, &local_error) ||
+	res = CAMEL_STORE_CLASS (camel_imap_store_parent_class)->can_refresh_folder (store, info, &local_error) ||
 	      (camel_url_get_param (((CamelService *)store)->url, "check_all") != NULL) ||
 	      (camel_url_get_param (((CamelService *)store)->url, "check_lsub") != NULL && (info->flags & CAMEL_FOLDER_SUBSCRIBED) != 0);
 
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
index 27410a5..8e38fe3 100644
--- a/camel/providers/imap/camel-imap-store.h
+++ b/camel/providers/imap/camel-imap-store.h
@@ -43,10 +43,10 @@ struct _CamelImapMsg {
 	void (*free)(CamelImapStore *store, struct _CamelImapMsg *m);
 };
 
-CamelImapMsg *camel_imap_msg_new(void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m),
+CamelImapMsg *camel_imap_msg_new (void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m),
 				 void (*free)(CamelImapStore *store, struct _CamelImapMsg *m),
 				 gsize size);
-void camel_imap_msg_queue(CamelImapStore *store, CamelImapMsg *msg);
+void camel_imap_msg_queue (CamelImapStore *store, CamelImapMsg *msg);
 
 #endif
 
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index e067836..e7a1b77 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -56,16 +56,16 @@ static CamelMessageContentInfo * content_info_from_db (CamelFolderSummary *s, Ca
 G_DEFINE_TYPE (CamelImapSummary, camel_imap_summary, CAMEL_TYPE_FOLDER_SUMMARY)
 
 static CamelMessageInfo *
-imap_message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
+imap_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
 {
 	CamelImapMessageInfo *to;
 	const CamelImapMessageInfo *from = (const CamelImapMessageInfo *)mi;
 
-	to = (CamelImapMessageInfo *) CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->message_info_clone(s, mi);
+	to = (CamelImapMessageInfo *) CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->message_info_clone (s, mi);
 	to->server_flags = from->server_flags;
 
 	/* FIXME: parent clone should do this */
-	to->info.content = camel_folder_summary_content_info_new(s);
+	to->info.content = camel_folder_summary_content_info_new (s);
 
 	return (CamelMessageInfo *)to;
 }
@@ -219,10 +219,10 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 
 	/* Legacy version */
 	if (s->version == 0x30c)
-		return camel_file_util_decode_uint32(in, &ims->validity);
+		return camel_file_util_decode_uint32 (in, &ims->validity);
 
 	/* Version 1 */
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &ims->version) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->version) == -1)
 		return -1;
 
 	if (ims->version == 2) {
@@ -233,7 +233,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 			return -1;
 	}
 
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &ims->validity) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->validity) == -1)
 		return -1;
 
 	if (ims->version > CAMEL_IMAP_SUMMARY_VERSION) {
@@ -248,7 +248,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 static CamelFIRecord *
 summary_header_to_db (CamelFolderSummary *s, GError **error)
 {
-	CamelImapSummary *ims = CAMEL_IMAP_SUMMARY(s);
+	CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
 	struct _CamelFIRecord *fir;
 
 	fir = CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->summary_header_to_db (s, error);
@@ -262,14 +262,14 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
 static gint
 summary_header_save (CamelFolderSummary *s, FILE *out)
 {
-	CamelImapSummary *ims = CAMEL_IMAP_SUMMARY(s);
+	CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
 
 	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->summary_header_save (s, out) == -1)
 		return -1;
 
-	camel_file_util_encode_fixed_int32(out, CAMEL_IMAP_SUMMARY_VERSION);
+	camel_file_util_encode_fixed_int32 (out, CAMEL_IMAP_SUMMARY_VERSION);
 
-	return camel_file_util_encode_fixed_int32(out, ims->validity);
+	return camel_file_util_encode_fixed_int32 (out, ims->validity);
 }
 
 static CamelMessageInfo *
@@ -306,7 +306,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 
 	return info;
 error:
-	camel_message_info_free(info);
+	camel_message_info_free (info);
 	return NULL;
 }
 
@@ -373,12 +373,12 @@ content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelM
 	if (info->type) {
 		oldr = mir->cinfo;
 		mir->cinfo = oldr ? g_strdup_printf("%s 1", oldr) : g_strdup ("1");
-		g_free(oldr);
+		g_free (oldr);
 		return CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->content_info_to_db (s, info, mir);
 	} else {
 		oldr = mir->cinfo;
 		mir->cinfo = oldr ? g_strdup_printf("%s 0", oldr) : g_strdup ("0");
-		g_free(oldr);
+		g_free (oldr);
 		return 0;
 	}
 }
@@ -396,20 +396,20 @@ camel_imap_summary_add_offline (CamelFolderSummary *summary, const gchar *uid,
 	mi = (CamelImapMessageInfo *)camel_folder_summary_info_new_from_message (summary, message, NULL);
 
 	/* Copy flags 'n' tags */
-	mi->info.flags = camel_message_info_flags(info);
+	mi->info.flags = camel_message_info_flags (info);
 
-	flag = camel_message_info_user_flags(info);
+	flag = camel_message_info_user_flags (info);
 	while (flag) {
-		camel_message_info_set_user_flag((CamelMessageInfo *)mi, flag->name, TRUE);
+		camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flag->name, TRUE);
 		flag = flag->next;
 	}
-	tag = camel_message_info_user_tags(info);
+	tag = camel_message_info_user_tags (info);
 	while (tag) {
-		camel_message_info_set_user_tag((CamelMessageInfo *)mi, tag->name, tag->value);
+		camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tag->name, tag->value);
 		tag = tag->next;
 	}
 
-	mi->info.size = camel_message_info_size(info);
+	mi->info.size = camel_message_info_size (info);
 	mi->info.uid = camel_pstring_strdup (uid);
 
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
@@ -421,8 +421,8 @@ camel_imap_summary_add_offline_uncached (CamelFolderSummary *summary, const gcha
 {
 	CamelImapMessageInfo *mi;
 
-	mi = camel_message_info_clone(info);
-	mi->info.uid = camel_pstring_strdup(uid);
+	mi = camel_message_info_clone (info);
+	mi->info.uid = camel_pstring_strdup (uid);
 
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
 }
diff --git a/camel/providers/imap/camel-imap-utils.c b/camel/providers/imap/camel-imap-utils.c
index de0551b..eee2e0b 100644
--- a/camel/providers/imap/camel-imap-utils.c
+++ b/camel/providers/imap/camel-imap-utils.c
@@ -278,7 +278,7 @@ imap_parse_namespace_response (const gchar *response)
 	if (!imap_namespace_decode (&inptr, &namespaces->shared))
 		goto exception;
 
-	d(namespaces_dump (namespaces));
+	d (namespaces_dump (namespaces));
 
 	return namespaces;
 
@@ -515,7 +515,7 @@ imap_create_flag_list (guint32 flags, CamelMessageInfo *info, guint32 permanent_
 		const gchar *name;
 
 		/* FIXME: All the custom flags are sent to the server. Not just the changed ones */
-		flag = camel_message_info_user_flags(info);
+		flag = camel_message_info_user_flags (info);
 		while (flag) {
 			if (flag->name && *flag->name) {
 				name = rename_label_flag (flag->name, strlen (flag->name), FALSE);
@@ -671,13 +671,13 @@ static guchar imap_atom_specials[256] = {
 #define imap_is_atom_char(c) ((imap_atom_specials[(c)&0xff] & 0x01) != 0)
 
 gboolean
-imap_is_atom(const gchar *in)
+imap_is_atom (const gchar *in)
 {
 	register guchar c;
 	register const gchar *p = in;
 
 	while ((c = (guchar)*p)) {
-		if (!imap_is_atom_char(c))
+		if (!imap_is_atom_char (c))
 			return FALSE;
 		p++;
 	}
@@ -1382,11 +1382,11 @@ imap_mailbox_decode (const guchar *in, gsize inlen)
 gchar *
 imap_path_to_physical (const gchar *prefix, const gchar *vpath)
 {
-	GString *out = g_string_new(prefix);
+	GString *out = g_string_new (prefix);
 	const gchar *p = vpath;
 	gchar c, *res;
 
-	g_string_append_c(out, '/');
+	g_string_append_c (out, '/');
 	p = vpath;
 	while ((c = *p++)) {
 		if (c == '/') {
@@ -1394,11 +1394,11 @@ imap_path_to_physical (const gchar *prefix, const gchar *vpath)
 			while (*p == '/')
 				p++;
 		} else
-			g_string_append_c(out, c);
+			g_string_append_c (out, c);
 	}
 
 	res = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return res;
 }
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c b/camel/providers/imapx/camel-imapx-conn-manager.c
index 0fdf1f3..418476f 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -66,20 +66,20 @@ free_connection (gpointer data, gpointer user_data)
 static void
 imapx_prune_connections (CamelIMAPXConnManager *con_man)
 {
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	con_man->priv->clearing_connections = TRUE;
 	g_slist_foreach (con_man->priv->connections, (GFunc) free_connection, NULL);
 	con_man->priv->connections = NULL;
 	con_man->priv->clearing_connections = FALSE;
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 }
 
 static void
 imapx_conn_manager_finalize (GObject *object)
 {
-	CamelIMAPXConnManager *con_man = CAMEL_IMAPX_CONN_MANAGER(object);
+	CamelIMAPXConnManager *con_man = CAMEL_IMAPX_CONN_MANAGER (object);
 
 	imapx_prune_connections (con_man);
 	g_static_rec_mutex_free (&con_man->priv->con_man_lock);
@@ -131,7 +131,7 @@ imapx_conn_shutdown (CamelIMAPXServer *conn, CamelIMAPXConnManager *con_man)
 		return;
 	}
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
 		cinfo = (ConnectionInfo *) l->data;
@@ -146,7 +146,7 @@ imapx_conn_shutdown (CamelIMAPXServer *conn, CamelIMAPXConnManager *con_man)
 		free_connection (cinfo, GINT_TO_POINTER (1));
 	}
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 }
 
 static void
@@ -156,7 +156,7 @@ imapx_conn_update_select (CamelIMAPXServer *conn, const gchar *selected_folder,
 	ConnectionInfo *cinfo;
 	gboolean found = FALSE;
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
 		cinfo = (ConnectionInfo *) l->data;
@@ -182,7 +182,7 @@ imapx_conn_update_select (CamelIMAPXServer *conn, const gchar *selected_folder,
 		cinfo->selected_folder = g_strdup (selected_folder);
 	}
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 }
 
 /* This should find a connection if the slots are full, returns NULL if there are slots available for a new connection for a folder */
@@ -194,7 +194,7 @@ imapx_find_connection (CamelIMAPXConnManager *con_man, const gchar *folder_name)
 	CamelIMAPXServer *conn = NULL;
 	ConnectionInfo *cinfo = NULL;
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	/* Have a dedicated connection for INBOX ? */
 	for (l = con_man->priv->connections, i = 0; l != NULL; l = g_slist_next (l), i++) {
@@ -233,9 +233,9 @@ imapx_find_connection (CamelIMAPXConnManager *con_man, const gchar *folder_name)
 		}
 	}
 
-	c(g_assert (!(con_man->priv->n_connections == g_slist_length (con_man->priv->connections) && !conn)));
+	c (g_assert (!(con_man->priv->n_connections == g_slist_length (con_man->priv->connections) && !conn)));
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 
 	return conn;
 }
@@ -247,12 +247,12 @@ imapx_create_new_connection (CamelIMAPXConnManager *con_man, const gchar *folder
 	CamelStore *store = con_man->priv->store;
 	ConnectionInfo *cinfo = NULL;
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	conn = camel_imapx_server_new (CAMEL_STORE(store), CAMEL_SERVICE(store)->url);
-	if (camel_imapx_server_connect(conn, error)) {
+	conn = camel_imapx_server_new (CAMEL_STORE (store), CAMEL_SERVICE (store)->url);
+	if (camel_imapx_server_connect (conn, error)) {
 		g_object_ref (conn);
 	} else {
 		g_object_unref (conn);
@@ -279,7 +279,7 @@ imapx_create_new_connection (CamelIMAPXConnManager *con_man, const gchar *folder
 
 	c(printf ("Created new connection for %s and total connections %d \n", folder_name, g_slist_length (con_man->priv->connections)));
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 
 	return conn;
 }
@@ -312,13 +312,13 @@ camel_imapx_conn_manager_get_connection (CamelIMAPXConnManager *con_man, const g
 
 	g_return_val_if_fail (CAMEL_IS_IMAPX_CONN_MANAGER (con_man), NULL);
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	conn = imapx_find_connection (con_man, folder_name);
 	if (!conn)
 		conn = imapx_create_new_connection (con_man, folder_name, error);
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 
 	return conn;
 }
@@ -328,7 +328,7 @@ camel_imapx_conn_manager_get_connections (CamelIMAPXConnManager *con_man)
 {
 	GSList *l, *conns = NULL;
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
 		ConnectionInfo *cinfo = (ConnectionInfo *) l->data;
@@ -336,7 +336,7 @@ camel_imapx_conn_manager_get_connections (CamelIMAPXConnManager *con_man)
 		conns = g_slist_prepend (conns, g_object_ref (cinfo->conn));
 	}
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 
 	return conns;
 }
@@ -352,7 +352,7 @@ camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man, CamelI
 
 	g_return_if_fail (CAMEL_IS_IMAPX_CONN_MANAGER (con_man));
 
-	CON_LOCK(con_man);
+	CON_LOCK (con_man);
 
 	for (l = con_man->priv->connections; l != NULL; l = g_slist_next (l)) {
 		cinfo = (ConnectionInfo *) l->data;
@@ -373,7 +373,7 @@ camel_imapx_conn_manager_update_con_info (CamelIMAPXConnManager *con_man, CamelI
 		camel_imapx_destroy_job_queue_info (jinfo);
 	}
 
-	CON_UNLOCK(con_man);
+	CON_UNLOCK (con_man);
 }
 
 void
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index c0d3b4a..0985640 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -42,7 +42,7 @@
 G_DEFINE_TYPE (CamelIMAPXFolder, camel_imapx_folder, CAMEL_TYPE_OFFLINE_FOLDER)
 
 CamelFolder *
-camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *folder_name, GError **error)
+camel_imapx_folder_new (CamelStore *store, const gchar *folder_dir, const gchar *folder_name, GError **error)
 {
 	CamelFolder *folder;
 	CamelIMAPXFolder *ifolder;
@@ -65,10 +65,10 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
 		"parent-store", store, NULL);
 	ifolder = (CamelIMAPXFolder *) folder;
 
-	((CamelIMAPXFolder *)folder)->raw_name = g_strdup(folder_name);
+	((CamelIMAPXFolder *)folder)->raw_name = g_strdup (folder_name);
 
 	summary_file = g_strdup_printf ("%s/summary", folder_dir);
-	folder->summary = camel_imapx_summary_new(folder, summary_file);
+	folder->summary = camel_imapx_summary_new (folder, summary_file);
 	if (!folder->summary) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -87,7 +87,7 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
 
 	state_file = g_strdup_printf ("%s/cmeta", folder_dir);
 	camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
-	g_free(state_file);
+	g_free (state_file);
 	camel_object_state_read (CAMEL_OBJECT (folder));
 
 	ifolder->search = camel_folder_search_new ();
@@ -166,14 +166,14 @@ imapx_refresh_info (CamelFolder *folder, GError **error)
 		return FALSE;
 	}
 
-	if (!camel_service_connect((CamelService *)istore, error))
+	if (!camel_service_connect ((CamelService *)istore, error))
 		return FALSE;
 
-	server = camel_imapx_store_get_server(istore, camel_folder_get_full_name (folder), error);
+	server = camel_imapx_store_get_server (istore, camel_folder_get_full_name (folder), error);
 	if (server != NULL) {
-		success = camel_imapx_server_refresh_info(server, folder, error);
+		success = camel_imapx_server_refresh_info (server, folder, error);
 		camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (folder));
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	return success;
@@ -197,11 +197,11 @@ imapx_expunge (CamelFolder *folder, GError **error)
 		return FALSE;
 	}
 
-	server = camel_imapx_store_get_server(istore, camel_folder_get_full_name (folder), error);
+	server = camel_imapx_store_get_server (istore, camel_folder_get_full_name (folder), error);
 	if (server) {
-		camel_imapx_server_expunge(server, folder, error);
+		camel_imapx_server_expunge (server, folder, error);
 		camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (folder));
-		g_object_unref(server);
+		g_object_unref (server);
 		return TRUE;
 	}
 
@@ -226,7 +226,7 @@ imapx_sync (CamelFolder *folder, gboolean expunge, GError **error)
 		return FALSE;
 	}
 
-	server = camel_imapx_store_get_server(istore, camel_folder_get_full_name (folder), NULL);
+	server = camel_imapx_store_get_server (istore, camel_folder_get_full_name (folder), NULL);
 	if (server)
 		camel_imapx_server_sync_changes (server, folder, NULL);
 
@@ -234,10 +234,10 @@ imapx_sync (CamelFolder *folder, gboolean expunge, GError **error)
 	   then sync again incase expunge changed anything */
 
 	if (server && expunge)
-		camel_imapx_server_expunge(server, folder, NULL);
+		camel_imapx_server_expunge (server, folder, NULL);
 	if (server) {
 		camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (folder));
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	return TRUE;
@@ -283,20 +283,20 @@ imapx_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 			return NULL;
 		}
 
-		server = camel_imapx_store_get_server(istore, camel_folder_get_full_name (folder), error);
+		server = camel_imapx_store_get_server (istore, camel_folder_get_full_name (folder), error);
 		if (server) {
-			stream = camel_imapx_server_get_message(server, folder, uid, error);
+			stream = camel_imapx_server_get_message (server, folder, uid, error);
 			camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (folder));
-			g_object_unref(server);
+			g_object_unref (server);
 		} else
 			return NULL;
 	}
 
 	if (stream != NULL) {
-		msg = camel_mime_message_new();
+		msg = camel_mime_message_new ();
 
 		g_mutex_lock (ifolder->stream_lock);
-		if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream, error) == -1) {
+		if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)msg, stream, error) == -1) {
 			g_object_unref (msg);
 			msg = NULL;
 		}
@@ -332,7 +332,7 @@ imapx_sync_message (CamelFolder *folder, const gchar *uid, GError **error)
 
 	success = camel_imapx_server_sync_message (server, folder, uid, error);
 	camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (folder));
-	g_object_unref(server);
+	g_object_unref (server);
 
 	return success;
 }
@@ -362,7 +362,7 @@ imapx_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
 	if (server) {
 		success = camel_imapx_server_copy_message (server, source, dest, uids, delete_originals, error);
 		camel_imapx_store_op_done (istore, server, camel_folder_get_full_name (source));
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	imapx_refresh_info (dest, NULL);
@@ -371,7 +371,7 @@ imapx_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
 }
 
 static gboolean
-imapx_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, gchar **appended_uid, GError **error)
+imapx_append_message (CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, gchar **appended_uid, GError **error)
 {
 	CamelStore *parent_store;
 	CamelIMAPXStore *istore;
@@ -395,7 +395,7 @@ imapx_append_message(CamelFolder *folder, CamelMimeMessage *message, const Camel
 	server = camel_imapx_store_get_server (istore, NULL, error);
 	if (server) {
 		success = camel_imapx_server_append_message (server, folder, message, info, error);
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	return success;
@@ -454,7 +454,7 @@ imapx_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
       info.flags = flags
     }
     if got.header {
-      info.init(header)
+      info.init (header)
       info.empty = false
     }
 
@@ -468,7 +468,7 @@ info.state - 2 bit field in flags
 static void
 imapx_search_free (CamelFolder *folder, GPtrArray *uids)
 {
-	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER(folder);
+	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
 
 	g_return_if_fail (ifolder->search);
 
@@ -482,16 +482,16 @@ imapx_search_free (CamelFolder *folder, GPtrArray *uids)
 static GPtrArray *
 imapx_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
 {
-	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER(folder);
+	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
 	GPtrArray *matches;
 
 	if (uids->len == 0)
-		return g_ptr_array_new();
+		return g_ptr_array_new ();
 
 	g_mutex_lock (ifolder->search_lock);
 
-	camel_folder_search_set_folder(ifolder->search, folder);
-	matches = camel_folder_search_search(ifolder->search, expression, uids, error);
+	camel_folder_search_set_folder (ifolder->search, folder);
+	matches = camel_folder_search_search (ifolder->search, expression, uids, error);
 
 	g_mutex_unlock (ifolder->search_lock);
 
@@ -501,7 +501,7 @@ imapx_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *u
 static guint32
 imapx_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
 {
-	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER(folder);
+	CamelIMAPXFolder *ifolder = CAMEL_IMAPX_FOLDER (folder);
 	guint32 matches;
 
 	g_mutex_lock (ifolder->search_lock);
@@ -523,7 +523,7 @@ imapx_search_by_expression (CamelFolder *folder, const gchar *expression, GError
 	g_mutex_lock (ifolder->search_lock);
 
 	camel_folder_search_set_folder (ifolder->search, folder);
-	matches = camel_folder_search_search(ifolder->search, expression, NULL, error);
+	matches = camel_folder_search_search (ifolder->search, expression, NULL, error);
 
 	g_mutex_unlock (ifolder->search_lock);
 
diff --git a/camel/providers/imapx/camel-imapx-provider.c b/camel/providers/imapx/camel-imapx-provider.c
index 9bf6558..325d6b6 100644
--- a/camel/providers/imapx/camel-imapx-provider.c
+++ b/camel/providers/imapx/camel-imapx-provider.c
@@ -111,30 +111,30 @@ CamelServiceAuthType camel_imapx_password_authtype = {
 	TRUE
 };
 
-void camel_imapx_module_init(void);
+void camel_imapx_module_init (void);
 
-extern void imapx_utils_init(void);
+extern void imapx_utils_init (void);
 
 void
-camel_imapx_module_init(void)
+camel_imapx_module_init (void)
 {
-	imapx_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imapx_store_get_type();
+	imapx_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imapx_store_get_type ();
 	imapx_provider.url_hash = imapx_url_hash;
 	imapx_provider.url_equal = imapx_url_equal;
-	imapx_provider.authtypes = camel_sasl_authtype_list(FALSE);
-	imapx_provider.authtypes = g_list_prepend(imapx_provider.authtypes, &camel_imapx_password_authtype);
+	imapx_provider.authtypes = camel_sasl_authtype_list (FALSE);
+	imapx_provider.authtypes = g_list_prepend (imapx_provider.authtypes, &camel_imapx_password_authtype);
 	imapx_provider.translation_domain = GETTEXT_PACKAGE;
 
 	/* TEMPORARY */
-	imapx_utils_init();
+	imapx_utils_init ();
 
-	camel_provider_register(&imapx_provider);
+	camel_provider_register (&imapx_provider);
 }
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
-	camel_imapx_module_init();
+	camel_imapx_module_init ();
 }
 
 static void
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 1b7992f..941f500 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -74,13 +74,13 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-void imapx_uidset_init(struct _uidset_state *ss, gint total, gint limit);
-gint imapx_uidset_done(struct _uidset_state *ss, struct _CamelIMAPXCommand *ic);
-gint imapx_uidset_add(struct _uidset_state *ss, struct _CamelIMAPXCommand *ic, const gchar *uid);
+void imapx_uidset_init (struct _uidset_state *ss, gint total, gint limit);
+gint imapx_uidset_done (struct _uidset_state *ss, struct _CamelIMAPXCommand *ic);
+gint imapx_uidset_add (struct _uidset_state *ss, struct _CamelIMAPXCommand *ic, const gchar *uid);
 static gboolean imapx_command_idle_stop (CamelIMAPXServer *is, GError **error);
-static gint imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error);
+static gint imapx_continuation (CamelIMAPXServer *imap, gboolean litplus, GError **error);
 static gboolean imapx_disconnect (CamelIMAPXServer *is);
-static gint imapx_uid_cmp(gconstpointer ap, gconstpointer bp, gpointer data);
+static gint imapx_uid_cmp (gconstpointer ap, gconstpointer bp, gpointer data);
 
 typedef struct _CamelIMAPXCommandPart CamelIMAPXCommandPart;
 
@@ -144,10 +144,10 @@ struct _CamelIMAPXCommand {
 	struct _CamelIMAPXJob *job;
 };
 
-CamelIMAPXCommand *camel_imapx_command_new(CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...);
-void camel_imapx_command_add(CamelIMAPXCommand *ic, const gchar *fmt, ...);
-void camel_imapx_command_free(CamelIMAPXCommand *ic);
-void camel_imapx_command_close(CamelIMAPXCommand *ic);
+CamelIMAPXCommand *camel_imapx_command_new (CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...);
+void camel_imapx_command_add (CamelIMAPXCommand *ic, const gchar *fmt, ...);
+void camel_imapx_command_free (CamelIMAPXCommand *ic);
+void camel_imapx_command_close (CamelIMAPXCommand *ic);
 static gboolean imapx_is_command_queue_empty (CamelIMAPXServer *is);
 
 /* states for the connection? */
@@ -298,9 +298,9 @@ static void imapx_job_done (CamelIMAPXServer *is, CamelIMAPXJob *job);
 static gboolean imapx_run_job (CamelIMAPXServer *is, CamelIMAPXJob *job, GError **error);
 static void imapx_job_fetch_new_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job);
 static void imapx_command_copy_messages_step_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic);
-static gint imapx_refresh_info_uid_cmp(gconstpointer ap, gconstpointer bp);
+static gint imapx_refresh_info_uid_cmp (gconstpointer ap, gconstpointer bp);
 static gint imapx_uids_array_cmp (gconstpointer ap, gconstpointer bp);
-static gboolean imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, GError **error);
+static gboolean imapx_server_sync_changes (CamelIMAPXServer *is, CamelFolder *folder, gint pri, GError **error);
 
 enum _idle_state {
 	IMAPX_IDLE_OFF,
@@ -342,7 +342,7 @@ enum {
 #define SSL_PORT_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 | CAMEL_TCP_STREAM_SSL_ENABLE_SSL3)
 #define STARTTLS_FLAGS (CAMEL_TCP_STREAM_SSL_ENABLE_TLS)
 
-static gboolean imapx_select(CamelIMAPXServer *is, CamelFolder *folder, gboolean force, GError **error);
+static gboolean imapx_select (CamelIMAPXServer *is, CamelFolder *folder, gboolean force, GError **error);
 
 G_DEFINE_TYPE (CamelIMAPXServer, camel_imapx_server, CAMEL_TYPE_OBJECT)
 
@@ -352,7 +352,7 @@ G_DEFINE_TYPE (CamelIMAPXServer, camel_imapx_server, CAMEL_TYPE_OBJECT)
   if limit is set, then we break it up into limit entries (i.e. command length)
 */
 void
-imapx_uidset_init(struct _uidset_state *ss, gint total, gint limit)
+imapx_uidset_init (struct _uidset_state *ss, gint total, gint limit)
 {
 	ss->uids = 0;
 	ss->entries = 0;
@@ -363,7 +363,7 @@ imapx_uidset_init(struct _uidset_state *ss, gint total, gint limit)
 }
 
 gint
-imapx_uidset_done(struct _uidset_state *ss, CamelIMAPXCommand *ic)
+imapx_uidset_done (struct _uidset_state *ss, CamelIMAPXCommand *ic)
 {
 	gint ret = 0;
 
@@ -382,11 +382,11 @@ imapx_uidset_done(struct _uidset_state *ss, CamelIMAPXCommand *ic)
 }
 
 gint
-imapx_uidset_add(struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *uid)
+imapx_uidset_add (struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *uid)
 {
 	guint32 uidn;
 
-	uidn = strtoul(uid, NULL, 10);
+	uidn = strtoul (uid, NULL, 10);
 	if (uidn == 0)
 		return -1;
 
@@ -419,7 +419,7 @@ imapx_uidset_add(struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *u
 	if ((ss->limit && ss->entries >= ss->limit)
 	    || (ss->total && ss->uids >= ss->total)) {
 		e(printf(" done, %d entries, %d uids\n", ss->entries, ss->uids));
-		imapx_uidset_done(ss, ic);
+		imapx_uidset_done (ss, ic);
 		return 1;
 	}
 
@@ -427,7 +427,7 @@ imapx_uidset_add(struct _uidset_state *ss, CamelIMAPXCommand *ic, const gchar *u
 }
 
 static void
-imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, gpointer o)
+imapx_command_add_part (CamelIMAPXCommand *ic, camel_imapx_command_part_t type, gpointer o)
 {
 	CamelIMAPXCommandPart *cp;
 	CamelStreamNull *null;
@@ -442,13 +442,13 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g
 		CamelObject *ob = o;
 
 		/* TODO: seekable streams we could just seek to the end and back */
-		null = (CamelStreamNull *)camel_stream_null_new();
+		null = (CamelStreamNull *)camel_stream_null_new ();
 		if ( (type & CAMEL_IMAPX_COMMAND_MASK) == CAMEL_IMAPX_COMMAND_DATAWRAPPER) {
-			camel_data_wrapper_write_to_stream((CamelDataWrapper *)ob, (CamelStream *)null, NULL);
+			camel_data_wrapper_write_to_stream ((CamelDataWrapper *)ob, (CamelStream *)null, NULL);
 		} else {
-			camel_stream_reset((CamelStream *)ob, NULL);
-			camel_stream_write_to_stream((CamelStream *)ob, (CamelStream *)null, NULL);
-			camel_stream_reset((CamelStream *)ob, NULL);
+			camel_stream_reset ((CamelStream *)ob, NULL);
+			camel_stream_write_to_stream ((CamelStream *)ob, (CamelStream *)null, NULL);
+			camel_stream_reset ((CamelStream *)ob, NULL);
 		}
 		type |= CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
 		g_object_ref (ob);
@@ -462,7 +462,7 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g
 		/* we presume we'll need to get additional data only if we're not authenticated yet */
 		g_object_ref (ob);
 		camel_stream_printf((CamelStream *)ic->mem, "%s", camel_sasl_get_mechanism (CAMEL_SASL (ob)));
-		if (!camel_sasl_get_authenticated((CamelSasl *)ob))
+		if (!camel_sasl_get_authenticated ((CamelSasl *)ob))
 			type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
 		break;
 	}
@@ -470,8 +470,8 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g
 		gchar *path = o;
 		struct stat st;
 
-		if (g_stat(path, &st) == 0) {
-			o = g_strdup(o);
+		if (g_stat (path, &st) == 0) {
+			o = g_strdup (o);
 			ob_size = st.st_size;
 		} else
 			o = NULL;
@@ -480,8 +480,8 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g
 		break;
 	}
 	case CAMEL_IMAPX_COMMAND_STRING:
-		o = g_strdup(o);
-		ob_size = strlen(o);
+		o = g_strdup (o);
+		ob_size = strlen (o);
 		type |= CAMEL_IMAPX_COMMAND_LITERAL_PLUS;
 		break;
 	default:
@@ -500,24 +500,24 @@ imapx_command_add_part(CamelIMAPXCommand *ic, camel_imapx_command_part_t type, g
 
 	byte_array = camel_stream_mem_get_byte_array (ic->mem);
 
-	cp = g_malloc0(sizeof(*cp));
+	cp = g_malloc0 (sizeof (*cp));
 	cp->type = type;
 	cp->ob_size = ob_size;
 	cp->ob = o;
 	cp->data_size = byte_array->len;
-	cp->data = g_malloc(cp->data_size+1);
-	memcpy(cp->data, byte_array->data, cp->data_size);
+	cp->data = g_malloc (cp->data_size+1);
+	memcpy (cp->data, byte_array->data, cp->data_size);
 	cp->data[cp->data_size] = 0;
 
-	camel_stream_reset((CamelStream *)ic->mem, NULL);
+	camel_stream_reset ((CamelStream *)ic->mem, NULL);
 	/* FIXME: hackish? */
-	g_byte_array_set_size(byte_array, 0);
+	g_byte_array_set_size (byte_array, 0);
 
-	camel_dlist_addtail(&ic->parts, (CamelDListNode *)cp);
+	camel_dlist_addtail (&ic->parts, (CamelDListNode *)cp);
 }
 
 static void
-imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
+imapx_command_addv (CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 {
 	const gchar *p, *ps, *start;
 	guchar c;
@@ -550,11 +550,11 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 		switch (c) {
 		case '%':
 			if (*p == '%') {
-				camel_stream_write((CamelStream *)ic->mem, ps, p-ps, NULL);
+				camel_stream_write ((CamelStream *)ic->mem, ps, p-ps, NULL);
 				p++;
 				ps = p;
 			} else {
-				camel_stream_write((CamelStream *)ic->mem, ps, p-ps-1, NULL);
+				camel_stream_write ((CamelStream *)ic->mem, ps, p-ps-1, NULL);
 				start = p-1;
 				width = 0;
 				left = FALSE;
@@ -574,7 +574,7 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 
 				do {
 					// FIXME: ascii isdigit
-					if (isdigit(c))
+					if (isdigit (c))
 						width = width * 10 + (c-'0');
 					else
 						break;
@@ -587,71 +587,71 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 
 				switch (c) {
 				case 'A': /* auth object - sasl auth, treat as special kind of continuation */
-					A = va_arg(ap, CamelSasl *);
-					imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_AUTH, A);
+					A = va_arg (ap, CamelSasl *);
+					imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_AUTH, A);
 					break;
 				case 'S': /* stream */
-					S = va_arg(ap, CamelStream *);
+					S = va_arg (ap, CamelStream *);
 					c(printf("got stream '%p'\n", S));
-					imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_STREAM, S);
+					imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_STREAM, S);
 					break;
 				case 'D': /* datawrapper */
-					D = va_arg(ap, CamelDataWrapper *);
+					D = va_arg (ap, CamelDataWrapper *);
 					c(printf("got data wrapper '%p'\n", D));
-					imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_DATAWRAPPER, D);
+					imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_DATAWRAPPER, D);
 					break;
 				case 'P': /* filename path */
-					P = va_arg(ap, gchar *);
+					P = va_arg (ap, gchar *);
 					c(printf("got file path '%s'\n", P));
-					imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_FILE, P);
+					imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_FILE, P);
 					break;
 				case 't': /* token */
-					s = va_arg(ap, gchar *);
-					camel_stream_write((CamelStream *)ic->mem, s, strlen(s), NULL);
+					s = va_arg (ap, gchar *);
+					camel_stream_write ((CamelStream *)ic->mem, s, strlen (s), NULL);
 					break;
 				case 's': /* simple string */
-					s = va_arg(ap, gchar *);
+					s = va_arg (ap, gchar *);
 					c(printf("got string '%s'\n", s));
 				output_string:
 					if (*s) {
-						guchar mask = imapx_is_mask(s);
+						guchar mask = imapx_is_mask (s);
 
 						if (mask & IMAPX_TYPE_ATOM_CHAR)
-							camel_stream_write((CamelStream *)ic->mem, s, strlen(s), NULL);
+							camel_stream_write ((CamelStream *)ic->mem, s, strlen (s), NULL);
 						else if (mask & IMAPX_TYPE_TEXT_CHAR) {
 							camel_stream_write((CamelStream *)ic->mem, "\"", 1, NULL);
 							while (*s) {
 								gchar *start = s;
 
-								while (*s && imapx_is_quoted_char(*s))
+								while (*s && imapx_is_quoted_char (*s))
 									s++;
-								camel_stream_write((CamelStream *)ic->mem, start, s-start, NULL);
+								camel_stream_write ((CamelStream *)ic->mem, start, s-start, NULL);
 								if (*s) {
 									camel_stream_write((CamelStream *)ic->mem, "\\", 1, NULL);
-									camel_stream_write((CamelStream *)ic->mem, s, 1, NULL);
+									camel_stream_write ((CamelStream *)ic->mem, s, 1, NULL);
 									s++;
 								}
 							}
 							camel_stream_write((CamelStream *)ic->mem, "\"", 1, NULL);
 						} else {
-							imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_STRING, s);
+							imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_STRING, s);
 						}
 					} else {
 						camel_stream_write((CamelStream *)ic->mem, "\"\"", 2, NULL);
 					}
 					if (encoded) {
-						g_free(encoded);
+						g_free (encoded);
 						encoded = NULL;
 					}
 					break;
 				case 'f': /* imap folder name */
-					folder = va_arg(ap, CamelFolder *);
+					folder = va_arg (ap, CamelFolder *);
 					full_name = camel_folder_get_full_name (folder);
 					c(printf("got folder '%s'\n", full_name));
 					parent_store = camel_folder_get_parent_store (folder);
-					fname = camel_imapx_store_summary_full_from_path(((CamelIMAPXStore *) parent_store)->summary, full_name);
+					fname = camel_imapx_store_summary_full_from_path (((CamelIMAPXStore *) parent_store)->summary, full_name);
 					if (fname) {
-						encoded = camel_utf8_utf7(fname);
+						encoded = camel_utf8_utf7 (fname);
 						g_free (fname);
 					} else
 						encoded = camel_utf8_utf7 (full_name);
@@ -664,29 +664,29 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 
 					break;
 				case 'F': /* IMAP flags set */
-					f = va_arg(ap, guint32);
-					F = va_arg(ap, CamelFlag *);
-					imapx_write_flags((CamelStream *)ic->mem, f, F, NULL);
+					f = va_arg (ap, guint32);
+					F = va_arg (ap, CamelFlag *);
+					imapx_write_flags ((CamelStream *)ic->mem, f, F, NULL);
 					break;
 				case 'c':
-					d = va_arg(ap, gint);
+					d = va_arg (ap, gint);
 					ch = d;
-					camel_stream_write((CamelStream *)ic->mem, &ch, 1, NULL);
+					camel_stream_write ((CamelStream *)ic->mem, &ch, 1, NULL);
 					break;
 				case 'd': /* int/unsigned */
 				case 'u':
 					if (llong) {
-						l = va_arg(ap, glong);
+						l = va_arg (ap, glong);
 						c(printf("got glong '%d'\n", (gint)l));
-						memcpy(buffer, start, p-start);
+						memcpy (buffer, start, p-start);
 						buffer[p-start] = 0;
-						camel_stream_printf((CamelStream *)ic->mem, buffer, l);
+						camel_stream_printf ((CamelStream *)ic->mem, buffer, l);
 					} else {
-						d = va_arg(ap, gint);
+						d = va_arg (ap, gint);
 						c(printf("got gint '%d'\n", d));
-						memcpy(buffer, start, p-start);
+						memcpy (buffer, start, p-start);
 						buffer[p-start] = 0;
-						camel_stream_printf((CamelStream *)ic->mem, buffer, d);
+						camel_stream_printf ((CamelStream *)ic->mem, buffer, d);
 					}
 					break;
 				}
@@ -697,57 +697,57 @@ imapx_command_addv(CamelIMAPXCommand *ic, const gchar *fmt, va_list ap)
 		case '\\':	/* only for \\ really, we dont support \n\r etc at all */
 			c = *p;
 			if (c) {
-				g_assert(c == '\\');
-				camel_stream_write((CamelStream *)ic->mem, ps, p-ps, NULL);
+				g_assert (c == '\\');
+				camel_stream_write ((CamelStream *)ic->mem, ps, p-ps, NULL);
 				p++;
 				ps = p;
 			}
 		}
 	}
 
-	camel_stream_write((CamelStream *)ic->mem, ps, p-ps-1, NULL);
+	camel_stream_write ((CamelStream *)ic->mem, ps, p-ps-1, NULL);
 }
 
 CamelIMAPXCommand *
-camel_imapx_command_new(CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...)
+camel_imapx_command_new (CamelIMAPXServer *is, const gchar *name, CamelFolder *select, const gchar *fmt, ...)
 {
 	CamelIMAPXCommand *ic;
 	static gint tag = 0;
 	va_list ap;
 
-	ic = g_malloc0(sizeof(*ic));
+	ic = g_malloc0 (sizeof (*ic));
 	ic->tag = tag++;
 	ic->name = name;
-	ic->mem = (CamelStreamMem *)camel_stream_mem_new();
+	ic->mem = (CamelStreamMem *)camel_stream_mem_new ();
 	ic->select = select;
 	ic->is = is;
-	camel_dlist_init(&ic->parts);
+	camel_dlist_init (&ic->parts);
 
 	if (fmt && fmt[0]) {
-		va_start(ap, fmt);
-		imapx_command_addv(ic, fmt, ap);
-		va_end(ap);
+		va_start (ap, fmt);
+		imapx_command_addv (ic, fmt, ap);
+		va_end (ap);
 	}
 
 	return ic;
 }
 
 void
-camel_imapx_command_add(CamelIMAPXCommand *ic, const gchar *fmt, ...)
+camel_imapx_command_add (CamelIMAPXCommand *ic, const gchar *fmt, ...)
 {
 	va_list ap;
 
-	g_assert(ic->mem);	/* gets reset on queue */
+	g_assert (ic->mem);	/* gets reset on queue */
 
 	if (fmt && fmt[0]) {
-		va_start(ap, fmt);
-		imapx_command_addv(ic, fmt, ap);
-		va_end(ap);
+		va_start (ap, fmt);
+		imapx_command_addv (ic, fmt, ap);
+		va_end (ap);
 	}
 }
 
 void
-camel_imapx_command_free(CamelIMAPXCommand *ic)
+camel_imapx_command_free (CamelIMAPXCommand *ic)
 {
 	CamelIMAPXCommandPart *cp;
 
@@ -756,32 +756,32 @@ camel_imapx_command_free(CamelIMAPXCommand *ic)
 
 	if (ic->mem)
 		g_object_unref (ic->mem);
-	imapx_free_status(ic->status);
+	imapx_free_status (ic->status);
 
-	while ((cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead(&ic->parts)))) {
-		g_free(cp->data);
+	while ((cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead (&ic->parts)))) {
+		g_free (cp->data);
 		if (cp->ob) {
 			switch (cp->type & CAMEL_IMAPX_COMMAND_MASK) {
 			case CAMEL_IMAPX_COMMAND_FILE:
 			case CAMEL_IMAPX_COMMAND_STRING:
-				g_free(cp->ob);
+				g_free (cp->ob);
 				break;
 			default:
 				g_object_unref (cp->ob);
 			}
 		}
-		g_free(cp);
+		g_free (cp);
 	}
 
 	/* Do NOT try to free the GError.  If set it should have been
 	 * propagated to the CamelIMAPXJob, so it's either NULL or the
 	 * CamelIMAPXJob owns it now. */
 
-	g_free(ic);
+	g_free (ic);
 }
 
 void
-camel_imapx_command_close(CamelIMAPXCommand *ic)
+camel_imapx_command_close (CamelIMAPXCommand *ic)
 {
 	if (ic->mem) {
 		GByteArray *byte_array;
@@ -790,7 +790,7 @@ camel_imapx_command_close(CamelIMAPXCommand *ic)
 
 		c(printf("completing command buffer is [%d] '%.*s'\n", byte_array->len, (gint)byte_array->len, byte_array->data));
 		if (byte_array->len > 0)
-			imapx_command_add_part(ic, CAMEL_IMAPX_COMMAND_SIMPLE, NULL);
+			imapx_command_add_part (ic, CAMEL_IMAPX_COMMAND_SIMPLE, NULL);
 
 		g_object_unref (ic->mem);
 		ic->mem = NULL;
@@ -803,9 +803,9 @@ imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
 {
 	CamelIMAPXCommandPart *cp;
 
-	camel_imapx_command_close(ic);
+	camel_imapx_command_close (ic);
 	cp = (CamelIMAPXCommandPart *)ic->parts.head;
-	g_assert(cp->next);
+	g_assert (cp->next);
 	ic->current = cp;
 
 	/* TODO: If we support literal+ we should be able to write the whole command out
@@ -814,7 +814,7 @@ imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
 	if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS))
 		imap->literal = ic;
 
-	camel_dlist_addtail(&imap->active, (CamelDListNode *)ic);
+	camel_dlist_addtail (&imap->active, (CamelDListNode *)ic);
 
 	g_static_rec_mutex_lock (&imap->ostream_lock);
 
@@ -834,7 +834,7 @@ imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
 	while (imap->literal == ic &&
 	       ic->current->type & CAMEL_IMAPX_COMMAND_LITERAL_PLUS) {
 		/* Sent LITERAL+ continuation immediately */
-		if (!imapx_continuation(imap, TRUE, &ic->error))
+		if (!imapx_continuation (imap, TRUE, &ic->error))
 			goto err;
 	}
 
@@ -843,7 +843,7 @@ imapx_command_start (CamelIMAPXServer *imap, CamelIMAPXCommand *ic)
 	return TRUE;
 }
 
-static gboolean duplicate_fetch_or_refresh(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+static gboolean duplicate_fetch_or_refresh (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
 	if (!ic->job)
 		return FALSE;
@@ -877,7 +877,7 @@ static gboolean duplicate_fetch_or_refresh(CamelIMAPXServer *is, CamelIMAPXComma
 	must have QUEUE lock */
 
 static void
-imapx_command_start_next(CamelIMAPXServer *is, GError **error)
+imapx_command_start_next (CamelIMAPXServer *is, GError **error)
 {
 	CamelIMAPXCommand *ic, *nc;
 	gint count = 0;
@@ -898,8 +898,8 @@ imapx_command_start_next(CamelIMAPXServer *is, GError **error)
 			if (!ic->select) {
 				c(printf("--> starting '%s'\n", ic->name));
 				pri = ic->pri;
-				camel_dlist_remove((CamelDListNode *)ic);
-				imapx_command_start(is, ic);
+				camel_dlist_remove ((CamelDListNode *)ic);
+				imapx_command_start (is, ic);
 				count++;
 			}
 			ic = nc;
@@ -941,7 +941,7 @@ imapx_command_start_next(CamelIMAPXServer *is, GError **error)
 	/* See if any queued jobs on this select first */
 	if (is->select_folder) {
 		c(printf("- we're selected on '%s', current jobs?\n",
-			 camel_folder_get_full_name(is->select_folder)));
+			 camel_folder_get_full_name (is->select_folder)));
 		for (ic = (CamelIMAPXCommand *)is->active.head;ic->next;ic=ic->next) {
 			c(printf("-  %3d '%s'\n", (gint)ic->pri, ic->name));
 			if (ic->pri > pri)
@@ -960,11 +960,11 @@ imapx_command_start_next(CamelIMAPXServer *is, GError **error)
 		while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
 			c(printf("-- %3d '%s'?\n", (gint)ic->pri, ic->name));
 			if (!ic->select || ((ic->select == is->select_folder) &&
-					    !duplicate_fetch_or_refresh(is, ic))) {
+					    !duplicate_fetch_or_refresh (is, ic))) {
 				c(printf("--> starting '%s'\n", ic->name));
 				pri = ic->pri;
-				camel_dlist_remove((CamelDListNode *)ic);
-				imapx_command_start(is, ic);
+				camel_dlist_remove ((CamelDListNode *)ic);
+				imapx_command_start (is, ic);
 				count++;
 			} else {
 				/* This job isn't for the selected folder, but we don't want to
@@ -986,19 +986,19 @@ imapx_command_start_next(CamelIMAPXServer *is, GError **error)
 	   it is complete it will re-call us if it succeeded */
 	if (ic->select) {
 		c(printf("Selecting folder '%s' for command '%s'(%p)\n",
-			 camel_folder_get_full_name(ic->select), ic->name, ic));
-		imapx_select(is, ic->select, FALSE, error);
+			 camel_folder_get_full_name (ic->select), ic->name, ic));
+		imapx_select (is, ic->select, FALSE, error);
 	} else {
 		pri = ic->pri;
 		nc = ic->next;
 		count = 0;
 		while (nc && is->literal == NULL && count < MAX_COMMANDS && ic->pri >= pri) {
 			if (!ic->select || (ic->select == is->select_folder &&
-					    !duplicate_fetch_or_refresh(is, ic))) {
+					    !duplicate_fetch_or_refresh (is, ic))) {
 				c(printf("* queueing job %3d '%s'\n", (gint)ic->pri, ic->name));
 				pri = ic->pri;
-				camel_dlist_remove((CamelDListNode *)ic);
-				imapx_command_start(is, ic);
+				camel_dlist_remove ((CamelDListNode *)ic);
+				imapx_command_start (is, ic);
 				count++;
 			}
 			ic = nc;
@@ -1019,33 +1019,33 @@ imapx_is_command_queue_empty (CamelIMAPXServer *is)
 }
 
 static void
-imapx_command_queue(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_queue (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
 	CamelIMAPXCommand *scan;
 
 	/* We enqueue in priority order, new messages have
 	   higher priority than older messages with the same priority */
 
-	camel_imapx_command_close(ic);
+	camel_imapx_command_close (ic);
 
 	c(printf("enqueue job '%.*s'\n", ((CamelIMAPXCommandPart *)ic->parts.head)->data_size, ((CamelIMAPXCommandPart *)ic->parts.head)->data));
 
-	QUEUE_LOCK(is);
+	QUEUE_LOCK (is);
 
 	if (is->state == IMAPX_SHUTDOWN) {
 		c(printf("refuse to queue job on disconnected server\n"));
 		g_set_error (
 			&ic->error, CAMEL_IMAPX_ERROR, 1,
 			"Server disconnected");
-		QUEUE_UNLOCK(is);
+		QUEUE_UNLOCK (is);
 		if (ic->complete)
-			ic->complete(is, ic);
+			ic->complete (is, ic);
 		return;
 	}
 
 	scan = (CamelIMAPXCommand *)is->queue.head;
 	if (scan->next == NULL)
-		camel_dlist_addtail(&is->queue, (CamelDListNode *)ic);
+		camel_dlist_addtail (&is->queue, (CamelDListNode *)ic);
 	else {
 		while (scan->next) {
 			if (ic->pri >= scan->pri)
@@ -1061,14 +1061,14 @@ imapx_command_queue(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 
 	imapx_command_start_next (is, NULL);
 
-	QUEUE_UNLOCK(is);
+	QUEUE_UNLOCK (is);
 
 	return;
 }
 
 /* Must have QUEUE lock */
 static CamelIMAPXCommand *
-imapx_find_command_tag(CamelIMAPXServer *imap, guint tag)
+imapx_find_command_tag (CamelIMAPXServer *imap, guint tag)
 {
 	CamelIMAPXCommand *ic = NULL;
 
@@ -1093,7 +1093,7 @@ imapx_job_matches (CamelFolder *folder, CamelIMAPXJob *job, guint32 type, const
 	switch (job->type) {
 		case IMAPX_JOB_GET_MESSAGE:
 			if (folder == job->folder &&
-			    strcmp(job->u.get_message.uid, uid) == 0)
+			    strcmp (job->u.get_message.uid, uid) == 0)
 				return TRUE;
 			break;
 		case IMAPX_JOB_FETCH_NEW_MESSAGES:
@@ -1117,7 +1117,7 @@ imapx_match_active_job (CamelIMAPXServer *is, guint32 type, const gchar *uid)
 	CamelIMAPXJob *job = NULL;
 	CamelIMAPXCommand *ic;
 
-	QUEUE_LOCK(is);
+	QUEUE_LOCK (is);
 
 	for (ic = (CamelIMAPXCommand *)is->active.head;ic->next;ic=ic->next) {
 		job = ic->job;
@@ -1129,7 +1129,7 @@ imapx_match_active_job (CamelIMAPXServer *is, guint32 type, const gchar *uid)
 	}
 	job = NULL;
 found:
-	QUEUE_UNLOCK(is);
+	QUEUE_UNLOCK (is);
 	return job;
 }
 
@@ -1140,7 +1140,7 @@ imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type,
 	CamelIMAPXJob *job = NULL;
 	gboolean found = FALSE;
 
-	QUEUE_LOCK(is);
+	QUEUE_LOCK (is);
 
 	for (node = is->jobs.head;node->next;node = job->msg.ln.next) {
 		job = (CamelIMAPXJob *) node;
@@ -1163,7 +1163,7 @@ imapx_is_job_in_queue (CamelIMAPXServer *is, CamelFolder *folder, guint32 type,
 }
 
 static void
-imapx_expunge_uid_from_summary(CamelIMAPXServer *imap, gchar *uid, gboolean unsolicited)
+imapx_expunge_uid_from_summary (CamelIMAPXServer *imap, gchar *uid, gboolean unsolicited)
 {
 	CamelMessageInfo *mi;
 	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)imap->select_folder;
@@ -1172,7 +1172,7 @@ imapx_expunge_uid_from_summary(CamelIMAPXServer *imap, gchar *uid, gboolean unso
 		ifolder->exists_on_server--;
 
 	if (imap->changes == NULL)
-		imap->changes = camel_folder_change_info_new();
+		imap->changes = camel_folder_change_info_new ();
 
 	mi = camel_folder_summary_uid (imap->select_folder->summary, uid);
 	if (mi) {
@@ -1202,7 +1202,7 @@ imapx_expunge_uid_from_summary(CamelIMAPXServer *imap, gchar *uid, gboolean unso
 
 /* handle any untagged responses */
 static gint
-imapx_untagged(CamelIMAPXServer *imap, GError **error)
+imapx_untagged (CamelIMAPXServer *imap, GError **error)
 {
 	guint id, len;
 	guchar *token, *p, c;
@@ -1212,13 +1212,13 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 
 	e(printf("got untagged response\n"));
 	id = 0;
-	tok = camel_imapx_stream_token(imap->stream, &token, &len, error);
+	tok = camel_imapx_stream_token (imap->stream, &token, &len, error);
 	if (tok < 0)
 		return -1;
 
 	if (tok == IMAPX_TOK_INT) {
-		id = strtoul((gchar *) token, NULL, 10);
-		tok = camel_imapx_stream_token(imap->stream, &token, &len, error);
+		id = strtoul ((gchar *) token, NULL, 10);
+		tok = camel_imapx_stream_token (imap->stream, &token, &len, error);
 		if (tok < 0)
 			return -1;
 	}
@@ -1238,8 +1238,8 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 	switch (imapx_tokenise ((const gchar *) token, len)) {
 	case IMAPX_CAPABILITY:
 		if (imap->cinfo)
-			imapx_free_capability(imap->cinfo);
-		imap->cinfo = imapx_parse_capability(imap->stream, error);
+			imapx_free_capability (imap->cinfo);
+		imap->cinfo = imapx_parse_capability (imap->stream, error);
 		if (imap->cinfo == NULL)
 			return -1;
 		c(printf("got capability flags %08x\n", imap->cinfo->capa));
@@ -1260,7 +1260,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			if (!uid)
 				break;
 
-			imapx_expunge_uid_from_summary(imap, uid, TRUE);
+			imapx_expunge_uid_from_summary (imap, uid, TRUE);
 		}
 
 		break;
@@ -1280,20 +1280,20 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			unsolicited = FALSE;
 			while (tok != ')') {
 				/* We expect this to be 'EARLIER' */
-				tok = camel_imapx_stream_token(imap->stream, &token, &len, error);
+				tok = camel_imapx_stream_token (imap->stream, &token, &len, error);
 				if (tok < 0)
 					return -1;
 			}
 		} else
-			camel_imapx_stream_ungettoken(imap->stream, tok, token, len);
+			camel_imapx_stream_ungettoken (imap->stream, tok, token, len);
 
-		uids = imapx_parse_uids(imap->stream, error);
+		uids = imapx_parse_uids (imap->stream, error);
 		if (uids == NULL)
 			return -1;
 		for (i = 0; i < uids->len; i++) {
 			gchar *uid = g_strdup_printf("%u", GPOINTER_TO_UINT(g_ptr_array_index (uids, i)));
 			c(printf("vanished: %s\n", uid));
-			imapx_expunge_uid_from_summary(imap, uid, unsolicited);
+			imapx_expunge_uid_from_summary (imap, uid, unsolicited);
 		}
 		g_ptr_array_free (uids, FALSE);
 		break;
@@ -1333,7 +1333,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 	case IMAPX_FLAGS: {
 		guint32 flags;
 
-		imapx_parse_flags(imap->stream, &flags, NULL, error);
+		imapx_parse_flags (imap->stream, &flags, NULL, error);
 
 		c(printf("flags: %08x\n", flags));
 		break;
@@ -1341,14 +1341,14 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 	case IMAPX_FETCH: {
 		struct _fetch_info *finfo;
 
-		finfo = imapx_parse_fetch(imap->stream, error);
+		finfo = imapx_parse_fetch (imap->stream, error);
 		if (finfo == NULL) {
-			imapx_free_fetch(finfo);
+			imapx_free_fetch (finfo);
 			return -1;
 		}
 
 		if ((finfo->got & (FETCH_BODY|FETCH_UID)) == (FETCH_BODY|FETCH_UID)) {
-			CamelIMAPXJob *job = imapx_match_active_job(imap, IMAPX_JOB_GET_MESSAGE, finfo->uid);
+			CamelIMAPXJob *job = imapx_match_active_job (imap, IMAPX_JOB_GET_MESSAGE, finfo->uid);
 
 			/* This must've been a get-message request, fill out the body stream,
 			   in the right spot */
@@ -1356,10 +1356,10 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			if (job && job->error == NULL) {
 				if (job->u.get_message.use_multi_fetch) {
 					job->u.get_message.body_offset = finfo->offset;
-					camel_seekable_stream_seek((CamelSeekableStream *)job->u.get_message.stream, finfo->offset, CAMEL_STREAM_SET, NULL);
+					camel_seekable_stream_seek ((CamelSeekableStream *)job->u.get_message.stream, finfo->offset, CAMEL_STREAM_SET, NULL);
 				}
 
-				job->u.get_message.body_len = camel_stream_write_to_stream(finfo->body, job->u.get_message.stream, &job->error);
+				job->u.get_message.body_len = camel_stream_write_to_stream (finfo->body, job->u.get_message.stream, &job->error);
 				if (job->u.get_message.body_len == -1)
 					g_prefix_error (
 						&job->error,
@@ -1382,7 +1382,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 				r.server_user_flags = finfo->user_flags;
 				finfo->user_flags = NULL;
 				r.exists = FALSE;
-				g_array_append_val(job->u.refresh_info.infos, r);
+				g_array_append_val (job->u.refresh_info.infos, r);
 			} else if (imap->select_folder) {
 				CamelFolder *folder;
 				CamelMessageInfo *mi = NULL;
@@ -1417,9 +1417,9 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 
 				if (changed) {
 					if (imap->changes == NULL)
-						imap->changes = camel_folder_change_info_new();
+						imap->changes = camel_folder_change_info_new ();
 
-					camel_folder_change_info_change_uid(imap->changes, uid);
+					camel_folder_change_info_change_uid (imap->changes, uid);
 					g_free (uid);
 				}
 
@@ -1448,9 +1448,9 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 
 				/* Do we want to save these headers for later too?  Do we care? */
 
-				mp = camel_mime_parser_new();
-				camel_mime_parser_init_with_stream(mp, finfo->header, NULL);
-				mi = camel_folder_summary_info_new_from_parser(job->folder->summary, mp);
+				mp = camel_mime_parser_new ();
+				camel_mime_parser_init_with_stream (mp, finfo->header, NULL);
+				mi = camel_folder_summary_info_new_from_parser (job->folder->summary, mp);
 				g_object_unref (mp);
 
 				if (mi) {
@@ -1474,7 +1474,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 							gint cmp = 0;
 
 							mid = (min + max)/2;
-							r = &g_array_index(infos, struct _refresh_info, mid);
+							r = &g_array_index (infos, struct _refresh_info, mid);
 							cmp = imapx_uid_cmp (finfo->uid, r->uid, NULL);
 
 							if (cmp > 0)
@@ -1506,7 +1506,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 					   message SEEN flag */
 					if (!(server_flags & CAMEL_MESSAGE_SEEN)) {
 						CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)job->folder;
-						unsigned long long uidl = strtoull(mi->uid, NULL, 10);
+						unsigned long long uidl = strtoull (mi->uid, NULL, 10);
 
 						if (uidl >= ifolder->uidnext_on_server) {
 							c(printf("Updating unread count for new message %s\n", mi->uid));
@@ -1522,7 +1522,7 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 					if (!camel_folder_summary_check_uid (job->folder->summary, mi->uid)) {
 						CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)job->folder;
 
-						camel_folder_summary_add(job->folder->summary, mi);
+						camel_folder_summary_add (job->folder->summary, mi);
 						imapx_set_message_info_flags_for_new_message (mi, server_flags, server_user_flags, job->folder);
 						camel_folder_change_info_add_uid (job->u.refresh_info.changes, mi->uid);
 
@@ -1544,19 +1544,19 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			}
 		}
 
-		imapx_free_fetch(finfo);
+		imapx_free_fetch (finfo);
 		break;
 	}
 	case IMAPX_LSUB:
 		lsub = TRUE;
 	case IMAPX_LIST: {
-		struct _list_info *linfo = imapx_parse_list(imap->stream, error);
+		struct _list_info *linfo = imapx_parse_list (imap->stream, error);
 		CamelIMAPXJob *job;
 
 		if (!linfo)
 			break;
 
-		job = imapx_match_active_job(imap, IMAPX_JOB_LIST, linfo->name);
+		job = imapx_match_active_job (imap, IMAPX_JOB_LIST, linfo->name);
 
 		// TODO: we want to make sure the names match?
 
@@ -1567,13 +1567,13 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			c(printf("list: '%s' (%c)\n", linfo->name, linfo->separator));
 		}
 
-		if (job && g_hash_table_lookup(job->u.list.folders, linfo->name) == NULL) {
+		if (job && g_hash_table_lookup (job->u.list.folders, linfo->name) == NULL) {
 			if (lsub)
 				linfo->flags |= CAMEL_FOLDER_SUBSCRIBED;
-			g_hash_table_insert(job->u.list.folders, linfo->name, linfo);
+			g_hash_table_insert (job->u.list.folders, linfo->name, linfo);
 		} else {
 			g_warning("got list response but no current listing job happening?\n");
-			imapx_free_list(linfo);
+			imapx_free_list (linfo);
 		}
 		break;
 	}
@@ -1588,14 +1588,14 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 			CamelIMAPXStoreNamespace *ns;
 			CamelIMAPXFolder *ifolder = NULL;;
 
-			ns = camel_imapx_store_summary_namespace_find_full(s, sinfo->name);
+			ns = camel_imapx_store_summary_namespace_find_full (s, sinfo->name);
 			if (ns) {
 				gchar *path_name;
 
-				path_name = camel_imapx_store_summary_full_to_path(s, sinfo->name, ns->sep);
+				path_name = camel_imapx_store_summary_full_to_path (s, sinfo->name, ns->sep);
 				c(printf("Got folder path '%s' for full '%s'\n", path_name, sinfo->name));
 				if (path_name) {
-					ifolder = (gpointer)camel_store_get_folder(imap->store, path_name, 0, error);
+					ifolder = (gpointer)camel_store_get_folder (imap->store, path_name, 0, error);
 					g_free (path_name);
 				}
 			}
@@ -1634,8 +1634,8 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 	case IMAPX_OK: case IMAPX_NO: case IMAPX_BAD:
 		/* TODO: validate which ones of these can happen as unsolicited responses */
 		/* TODO: handle bye/preauth differently */
-		camel_imapx_stream_ungettoken(imap->stream, tok, token, len);
-		sinfo = imapx_parse_status(imap->stream, error);
+		camel_imapx_stream_ungettoken (imap->stream, tok, token, len);
+		sinfo = imapx_parse_status (imap->stream, error);
 		if (sinfo == NULL)
 			return -1;
 		switch (sinfo->condition) {
@@ -1680,27 +1680,27 @@ imapx_untagged(CamelIMAPXServer *imap, GError **error)
 				imap->cinfo = sinfo->u.cinfo;
 				sinfo->u.cinfo = NULL;
 				if (cinfo)
-					imapx_free_capability(cinfo);
+					imapx_free_capability (cinfo);
 				c(printf("got capability flags %08x\n", imap->cinfo->capa));
 			}
 			break;
 		default:
 			break;
 		}
-		imapx_free_status(sinfo);
+		imapx_free_status (sinfo);
 		return 0;
 	default:
 		/* unknown response, just ignore it */
 		c(printf("unknown token: %s\n", token));
 	}
 
-	return camel_imapx_stream_skip(imap->stream, error);
+	return camel_imapx_stream_skip (imap->stream, error);
 }
 
 /* handle any continuation requests
    either data continuations, or auth continuation */
 static gint
-imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
+imapx_continuation (CamelIMAPXServer *imap, gboolean litplus, GError **error)
 {
 	CamelIMAPXCommand *ic, *newliteral = NULL;
 	CamelIMAPXCommandPart *cp;
@@ -1713,7 +1713,7 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 		camel_imapx_stream_skip (imap->stream, error);
 
 		c(printf("Got continuation response for IDLE \n"));
-		IDLE_LOCK(imap->idle);
+		IDLE_LOCK (imap->idle);
 		/* We might have actually sent the DONE already! */
 		if (imap->idle->state == IMAPX_IDLE_ISSUED)
 			imap->idle->state = IMAPX_IDLE_STARTED;
@@ -1721,18 +1721,18 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 			/* IDLE got cancelled after we sent the command, while
 			   we were waiting for this continuation. Send DONE
 			   immediately. */
-			imapx_command_idle_stop(imap, error);
+			imapx_command_idle_stop (imap, error);
 			imap->idle->state = IMAPX_IDLE_OFF;
 		} else {
 			c(printf("idle starts in wrong state %d\n",
 				 imap->idle->state));
 		}
-		IDLE_UNLOCK(imap->idle);
+		IDLE_UNLOCK (imap->idle);
 
-		QUEUE_LOCK(imap);
+		QUEUE_LOCK (imap);
 		imap->literal = NULL;
-		imapx_command_start_next(imap, error);
-		QUEUE_UNLOCK(imap);
+		imapx_command_start_next (imap, error);
+		QUEUE_UNLOCK (imap);
 
 		return 1;
 	}
@@ -1740,7 +1740,7 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 	ic = imap->literal;
 	if (!litplus) {
 		if (ic == NULL) {
-			camel_imapx_stream_skip(imap->stream, error);
+			camel_imapx_stream_skip (imap->stream, error);
 			c(printf("got continuation response with no outstanding continuation requests?\n"));
 			return 1;
 		}
@@ -1753,11 +1753,11 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 	switch (cp->type & CAMEL_IMAPX_COMMAND_MASK) {
 	case CAMEL_IMAPX_COMMAND_DATAWRAPPER:
 		c(printf("writing data wrapper to literal\n"));
-		camel_data_wrapper_write_to_stream((CamelDataWrapper *)cp->ob, (CamelStream *)imap->stream, NULL);
+		camel_data_wrapper_write_to_stream ((CamelDataWrapper *)cp->ob, (CamelStream *)imap->stream, NULL);
 		break;
 	case CAMEL_IMAPX_COMMAND_STREAM:
 		c(printf("writing stream to literal\n"));
-		camel_stream_write_to_stream((CamelStream *)cp->ob, (CamelStream *)imap->stream, NULL);
+		camel_stream_write_to_stream ((CamelStream *)cp->ob, (CamelStream *)imap->stream, NULL);
 		break;
 	case CAMEL_IMAPX_COMMAND_AUTH: {
 		gchar *resp;
@@ -1766,14 +1766,14 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 		if (camel_imapx_stream_text (imap->stream, &token, error))
 			return -1;
 
-		resp = camel_sasl_challenge_base64((CamelSasl *)cp->ob, (const gchar *) token, error);
-		g_free(token);
+		resp = camel_sasl_challenge_base64 ((CamelSasl *)cp->ob, (const gchar *) token, error);
+		g_free (token);
 		if (resp == NULL)
 			return -1;
 		c(printf("got auth continuation, feeding token '%s' back to auth mech\n", resp));
 
-		camel_stream_write((CamelStream *)imap->stream, resp, strlen(resp), NULL);
-		g_free(resp);
+		camel_stream_write ((CamelStream *)imap->stream, resp, strlen (resp), NULL);
+		g_free (resp);
 		/* we want to keep getting called until we get a status reponse from the server
 		   ignore what sasl tells us */
 		newliteral = ic;
@@ -1786,15 +1786,15 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 		c(printf("writing file '%s' to literal\n", (gchar *)cp->ob));
 
 		// FIXME: errors
-		if (cp->ob && (file = camel_stream_fs_new_with_name(cp->ob, O_RDONLY, 0, NULL))) {
-			camel_stream_write_to_stream(file, (CamelStream *)imap->stream, NULL);
+		if (cp->ob && (file = camel_stream_fs_new_with_name (cp->ob, O_RDONLY, 0, NULL))) {
+			camel_stream_write_to_stream (file, (CamelStream *)imap->stream, NULL);
 			g_object_unref (file);
 		} else if (cp->ob_size > 0) {
 			// Server is expecting data ... ummm, send it zeros?  abort?
 		}
 		break; }
 	case CAMEL_IMAPX_COMMAND_STRING:
-		camel_stream_write((CamelStream *)imap->stream, cp->ob, cp->ob_size, NULL);
+		camel_stream_write ((CamelStream *)imap->stream, cp->ob, cp->ob_size, NULL);
 		break;
 	default:
 		/* should we just ignore? */
@@ -1806,7 +1806,7 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 	}
 
 	if (!litplus)
-		camel_imapx_stream_skip(imap->stream, error);
+		camel_imapx_stream_skip (imap->stream, error);
  noskip:
 	cp = cp->next;
 	if (cp->next) {
@@ -1816,26 +1816,26 @@ imapx_continuation(CamelIMAPXServer *imap, gboolean litplus, GError **error)
 		if (cp->type & (CAMEL_IMAPX_COMMAND_CONTINUATION|CAMEL_IMAPX_COMMAND_LITERAL_PLUS)) {
 			newliteral = ic;
 		} else {
-			g_assert(cp->next->next == NULL);
+			g_assert (cp->next->next == NULL);
 		}
 	} else {
 		c(printf("%p: queueing continuation\n", ic));
 		camel_stream_printf((CamelStream *)imap->stream, "\r\n");
 	}
 
-	QUEUE_LOCK(imap);
+	QUEUE_LOCK (imap);
 	imap->literal = newliteral;
 
 	if (!litplus)
-		imapx_command_start_next(imap, error);
-	QUEUE_UNLOCK(imap);
+		imapx_command_start_next (imap, error);
+	QUEUE_UNLOCK (imap);
 
 	return 1;
 }
 
 /* handle a completion line */
 static gint
-imapx_completion(CamelIMAPXServer *imap, guchar *token, gint len, GError **error)
+imapx_completion (CamelIMAPXServer *imap, guchar *token, gint len, GError **error)
 {
 	CamelIMAPXCommand *ic;
 	guint tag;
@@ -1848,9 +1848,9 @@ imapx_completion(CamelIMAPXServer *imap, guchar *token, gint len, GError **error
 		return -1;
 	}
 
-	tag = strtoul( (const gchar *)token+1, NULL, 10);
+	tag = strtoul ( (const gchar *)token+1, NULL, 10);
 
-	if ((ic = imapx_find_command_tag(imap, tag)) == NULL) {
+	if ((ic = imapx_find_command_tag (imap, tag)) == NULL) {
 		g_set_error (
 			error, CAMEL_IMAPX_ERROR, 1,
 			"got response tag unexpectedly: %s", token);
@@ -1881,15 +1881,15 @@ imapx_completion(CamelIMAPXServer *imap, guchar *token, gint len, GError **error
 		camel_folder_change_info_clear (imap->changes);
 	}
 
-	QUEUE_LOCK(imap);
+	QUEUE_LOCK (imap);
 
-	camel_dlist_remove((CamelDListNode *)ic);
-	camel_dlist_addtail(&imap->done, (CamelDListNode *)ic);
+	camel_dlist_remove ((CamelDListNode *)ic);
+	camel_dlist_addtail (&imap->done, (CamelDListNode *)ic);
 	if (imap->literal == ic)
 		imap->literal = NULL;
 
 	if (ic->current->next->next) {
-		QUEUE_UNLOCK(imap);
+		QUEUE_UNLOCK (imap);
 		g_set_error (
 			error, CAMEL_IMAPX_ERROR, 1,
 			"command still has unsent parts? %s", ic->name);
@@ -1898,22 +1898,22 @@ imapx_completion(CamelIMAPXServer *imap, guchar *token, gint len, GError **error
 	}
 
 	camel_dlist_remove ((CamelDListNode *) ic);
-	QUEUE_UNLOCK(imap);
+	QUEUE_UNLOCK (imap);
 
-	ic->status = imapx_parse_status(imap->stream, error);
+	ic->status = imapx_parse_status (imap->stream, error);
 
 	if (ic->complete)
 		ic->complete (imap, ic);
 
-	QUEUE_LOCK(imap);
-	imapx_command_start_next(imap, error);
-	QUEUE_UNLOCK(imap);
+	QUEUE_LOCK (imap);
+	imapx_command_start_next (imap, error);
+	QUEUE_UNLOCK (imap);
 
 	return 1;
 }
 
 static void
-imapx_step(CamelIMAPXServer *is, GError **error)
+imapx_step (CamelIMAPXServer *is, GError **error)
 {
 	guint len;
 	guchar *token;
@@ -1942,21 +1942,21 @@ static gboolean
 imapx_command_run (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 /* throws IO,PARSE exception */
 {
-	camel_imapx_command_close(ic);
+	camel_imapx_command_close (ic);
 
-	QUEUE_LOCK(is);
-	imapx_command_start(is, ic);
-	QUEUE_UNLOCK(is);
+	QUEUE_LOCK (is);
+	imapx_command_start (is, ic);
+	QUEUE_UNLOCK (is);
 
 	while (ic->status == NULL && ic->error == NULL)
-		imapx_step(is, &ic->error);
+		imapx_step (is, &ic->error);
 
 	if (is->literal == ic)
 		is->literal = NULL;
 
-	QUEUE_LOCK(is);
-	camel_dlist_remove((CamelDListNode *)ic);
-	QUEUE_UNLOCK(is);
+	QUEUE_LOCK (is);
+	camel_dlist_remove ((CamelDListNode *)ic);
+	QUEUE_UNLOCK (is);
 
 	return (ic->error == NULL);
 }
@@ -1993,14 +1993,14 @@ static void
 imapx_job_done (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	QUEUE_LOCK (is);
-	camel_dlist_remove((CamelDListNode *)job);
+	camel_dlist_remove ((CamelDListNode *)job);
 	QUEUE_UNLOCK (is);
 
 	if (job->noreply) {
 		g_clear_error (&job->error);
-		g_free(job);
+		g_free (job);
 	} else
-		camel_msgport_reply((CamelMsg *) job);
+		camel_msgport_reply ((CamelMsg *) job);
 }
 
 static gboolean
@@ -2046,7 +2046,7 @@ imapx_run_job (CamelIMAPXServer *is,
 		completed = camel_msgport_pop (reply);
 		camel_msgport_destroy (reply);
 
-		g_assert(completed == (CamelMsg *)job);
+		g_assert (completed == (CamelMsg *)job);
 	}
 
 	if (job->error != NULL) {
@@ -2109,7 +2109,7 @@ imapx_command_idle_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_idle_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_idle_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 	CamelIMAPXCommandPart *cp;
@@ -2122,12 +2122,12 @@ imapx_job_idle_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->pri = job->pri;
 	ic->complete = imapx_command_idle_done;
 
-	camel_imapx_command_close(ic);
+	camel_imapx_command_close (ic);
 	cp = (CamelIMAPXCommandPart *)ic->parts.head;
 	cp->type |= CAMEL_IMAPX_COMMAND_CONTINUATION;
 
 	QUEUE_LOCK (is);
-	IDLE_LOCK(is->idle);
+	IDLE_LOCK (is->idle);
 	/* Don't issue it if the idle was cancelled already */
 	if (is->idle->state == IMAPX_IDLE_PENDING) {
 		is->idle->state = IMAPX_IDLE_ISSUED;
@@ -2136,7 +2136,7 @@ imapx_job_idle_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 		imapx_job_done (is, ic->job);
 		camel_imapx_command_free (ic);
 	}
-	IDLE_UNLOCK(is->idle);
+	IDLE_UNLOCK (is->idle);
 	QUEUE_UNLOCK (is);
 }
 
@@ -2146,14 +2146,14 @@ camel_imapx_server_idle (CamelIMAPXServer *is, CamelFolder *folder, GError **err
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0 (sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_IDLE;
 	job->start = imapx_job_idle_start;
 	job->folder = folder;
 
 	success = imapx_submit_job (is, job, error);
 
-	g_free(job);
+	g_free (job);
 
 	return success;
 }
@@ -2168,12 +2168,12 @@ imapx_server_fetch_new_messages (CamelIMAPXServer *is,
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_FETCH_NEW_MESSAGES;
 	job->start = imapx_job_fetch_new_messages_start;
 	job->folder = folder;
 	job->noreply = async;
-	job->u.refresh_info.changes = camel_folder_change_info_new();
+	job->u.refresh_info.changes = camel_folder_change_info_new ();
 	job->u.refresh_info.update_unseen = update_unseen;
 	job->op = camel_operation_registered ();
 
@@ -2196,19 +2196,19 @@ imapx_idle_thread (gpointer data)
 
 		e_flag_clear (is->idle->idle_start_watch);
 
-		IDLE_LOCK(is->idle);
+		IDLE_LOCK (is->idle);
 		while ((ifolder = (CamelIMAPXFolder *) is->select_folder) &&
 		       is->idle->state == IMAPX_IDLE_PENDING &&
 		       !is->idle->idle_exit) {
-			time_t dwelled = time(NULL) - is->idle->started;
+			time_t dwelled = time (NULL) - is->idle->started;
 
 			if (dwelled < IMAPX_IDLE_DWELL_TIME) {
-				IDLE_UNLOCK(is->idle);
-				g_usleep((IMAPX_IDLE_DWELL_TIME - dwelled) * G_USEC_PER_SEC);
-				IDLE_LOCK(is->idle);
+				IDLE_UNLOCK (is->idle);
+				g_usleep ((IMAPX_IDLE_DWELL_TIME - dwelled) * G_USEC_PER_SEC);
+				IDLE_LOCK (is->idle);
 				continue;
 			}
-			IDLE_UNLOCK(is->idle);
+			IDLE_UNLOCK (is->idle);
 			camel_imapx_server_idle (is, (gpointer)ifolder, &local_error);
 
 			if (local_error == NULL && ifolder->exists_on_server >
@@ -2220,9 +2220,9 @@ imapx_idle_thread (gpointer data)
 				/* No way to asyncronously notify UI ? */
 				g_clear_error (&local_error);
 			}
-			IDLE_LOCK(is->idle);
+			IDLE_LOCK (is->idle);
 		}
-		IDLE_UNLOCK(is->idle);
+		IDLE_UNLOCK (is->idle);
 
 		e_flag_wait (is->idle->idle_start_watch);
 
@@ -2242,7 +2242,7 @@ imapx_stop_idle (CamelIMAPXServer *is, GError **error)
 	gint stopped = FALSE;
 	time_t now;
 
-	time(&now);
+	time (&now);
 	IDLE_LOCK (idle);
 
 	switch (idle->state) {
@@ -2319,7 +2319,7 @@ imapx_start_idle (CamelIMAPXServer *is)
 	IDLE_LOCK (idle);
 
 	g_assert (idle->state == IMAPX_IDLE_OFF);
-	time(&idle->started);
+	time (&idle->started);
 	idle->state = IMAPX_IDLE_PENDING;
 
 	if (!idle->idle_thread) {
@@ -2364,7 +2364,7 @@ imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		c(printf("Select failed\n"));
 		camel_dlist_init (&failed);
 
-		QUEUE_LOCK(is);
+		QUEUE_LOCK (is);
 		cw = (CamelIMAPXCommand *)is->queue.head;
 		cn = cw->next;
 
@@ -2372,32 +2372,32 @@ imapx_command_select_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 			while (cn) {
 				if (cw->select && cw->select == is->select_pending) {
 					c(printf("Cancelling command '%s'(%p) for folder '%s'\n",
-						 cw->name, cw, camel_folder_get_full_name(cw->select)));
-					camel_dlist_remove((CamelDListNode *)cw);
-					camel_dlist_addtail(&failed, (CamelDListNode *)cw);
+						 cw->name, cw, camel_folder_get_full_name (cw->select)));
+					camel_dlist_remove ((CamelDListNode *)cw);
+					camel_dlist_addtail (&failed, (CamelDListNode *)cw);
 				}
 				cw = cn;
 				cn = cn->next;
 			}
 		}
 
-		QUEUE_UNLOCK(is);
+		QUEUE_UNLOCK (is);
 
 		cw = (CamelIMAPXCommand *)failed.head;
 		if (cw) {
 			cn = cw->next;
 			while (cn) {
 				if (ic->status)
-					cw->status = imapx_copy_status(ic->status);
+					cw->status = imapx_copy_status (ic->status);
 				if (ic->error != NULL)
 					g_propagate_error (&cw->error, ic->error);
 				else
 					g_set_error (
 						&cw->error, CAMEL_IMAPX_ERROR, 1,
 						"SELECT %s failed: %s",
-						camel_folder_get_full_name(cw->select),
+						camel_folder_get_full_name (cw->select),
 						ic->status->text? ic->status->text:"<unknown reason>");
-				cw->complete(is, cw);
+				cw->complete (is, cw);
 				cw = cn;
 				cn = cn->next;
 			}
@@ -2475,7 +2475,7 @@ imapx_select (CamelIMAPXServer *is, CamelFolder *folder, gboolean forced, GError
 	if (is->select_folder == folder && !forced)
 		return TRUE;
 
-	if (!camel_dlist_empty(&is->active))
+	if (!camel_dlist_empty (&is->active))
 		return TRUE;
 
 	is->select_pending = folder;
@@ -2506,7 +2506,7 @@ imapx_select (CamelIMAPXServer *is, CamelFolder *folder, gboolean forced, GError
 	if (is->use_qresync) {
 		CamelIMAPXSummary *isum = (CamelIMAPXSummary *)folder->summary;
 		CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)folder;
-		gint total = camel_folder_summary_count(folder->summary);
+		gint total = camel_folder_summary_count (folder->summary);
 		gchar *uid = NULL;
 
 		if (total)
@@ -2544,25 +2544,25 @@ imapx_select (CamelIMAPXServer *is, CamelFolder *folder, gboolean forced, GError
 					   indices in our folder summary -- they start from one, while
 					   the summary starts from zero. */
 					sprintf(buf, "%d", total - i + 1);
-					g_string_prepend(seqs, buf);
-					uid = camel_folder_summary_uid_from_index(folder->summary, total - i);
-					g_string_prepend(uids, uid);
-					g_free(uid);
+					g_string_prepend (seqs, buf);
+					uid = camel_folder_summary_uid_from_index (folder->summary, total - i);
+					g_string_prepend (uids, uid);
+					g_free (uid);
 				} while (i < total);
 
 				g_string_prepend(seqs, " (");
 
 				c(printf("adding QRESYNC seq/uidset %s%s\n", seqs->str, uids->str));
-				camel_imapx_command_add(ic, seqs->str);
-				camel_imapx_command_add(ic, uids->str);
+				camel_imapx_command_add (ic, seqs->str);
+				camel_imapx_command_add (ic, uids->str);
 
-				g_string_free(seqs, TRUE);
-				g_string_free(uids, TRUE);
+				g_string_free (seqs, TRUE);
+				g_string_free (uids, TRUE);
 
 			}
 			camel_imapx_command_add(ic, "))");
 		}
-		g_free(uid);
+		g_free (uid);
 	}
 
 	ic->complete = imapx_command_select_done;
@@ -2587,9 +2587,9 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
 
 	/* Put full details in the environment, in case the connection
 	   program needs them */
-	buf = camel_url_to_string(is->url, 0);
+	buf = camel_url_to_string (is->url, 0);
 	child_env[i++] = g_strdup_printf("URL=%s", buf);
-	g_free(buf);
+	g_free (buf);
 
 	child_env[i++] = g_strdup_printf("URLHOST=%s", is->url->host);
 	if (is->url->port)
@@ -2603,7 +2603,7 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
 	child_env[i] = NULL;
 
 	/* Now do %h, %u, etc. substitution in cmd */
-	buf = cmd_copy = g_strdup(cmd);
+	buf = cmd_copy = g_strdup (cmd);
 
 	full_cmd = g_strdup("");
 
@@ -2613,11 +2613,11 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
 		gchar *var;
 		gint len;
 
-		pc = strchr(buf, '%');
+		pc = strchr (buf, '%');
 	ignore:
 		if (!pc) {
 			tmp = g_strdup_printf("%s%s", full_cmd, buf);
-			g_free(full_cmd);
+			g_free (full_cmd);
 			full_cmd = tmp;
 			break;
 		}
@@ -2637,24 +2637,24 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
 		if (!var) {
 			/* If there wasn't a valid %-code, with an actual
 			   variable to insert, pretend we didn't see the % */
-			pc = strchr(pc + 1, '%');
+			pc = strchr (pc + 1, '%');
 			goto ignore;
 		}
 		tmp = g_strdup_printf("%s%.*s%s", full_cmd, len, buf, var);
-		g_free(full_cmd);
+		g_free (full_cmd);
 		full_cmd = tmp;
 		buf = pc + 2;
 	}
 
-	g_free(cmd_copy);
+	g_free (cmd_copy);
 
 	cmd_stream = camel_stream_process_new ();
 
-	ret = camel_stream_process_connect (CAMEL_STREAM_PROCESS(cmd_stream),
+	ret = camel_stream_process_connect (CAMEL_STREAM_PROCESS (cmd_stream),
 					    full_cmd, (const gchar **)child_env);
 
 	while (i)
-		g_free(child_env[--i]);
+		g_free (child_env[--i]);
 
 	if (ret == -1) {
 		if (errno == EINTR)
@@ -2675,8 +2675,8 @@ connect_to_server_process (CamelIMAPXServer *is, const gchar *cmd, GError **erro
 	}
 	g_free (full_cmd);
 
-	is->stream = (CamelIMAPXStream *) camel_imapx_stream_new(cmd_stream);
-	g_object_unref(cmd_stream);
+	is->stream = (CamelIMAPXStream *) camel_imapx_stream_new (cmd_stream);
+	g_object_unref (cmd_stream);
 	is->is_process_stream = TRUE;
 
 	return TRUE;
@@ -2708,14 +2708,14 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 
 	if (camel_url_get_param(is->url, "use_command") &&
 	    (command = camel_url_get_param(is->url, "command"))) {
-		if (!connect_to_server_process(is, command, &local_error))
+		if (!connect_to_server_process (is, command, &local_error))
 			goto exit;
 		else
 			goto connected;
 	}
 #endif
 	if (is->url->port) {
-		serv = g_alloca(16);
+		serv = g_alloca (16);
 		sprintf((gchar *) serv, "%d", is->url->port);
 		fallback_port = 0;
 	} else {
@@ -2726,14 +2726,14 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 	mode = camel_url_get_param(is->url, "use_ssl");
 	if (mode && strcmp(mode, "never") != 0) {
 		if (!strcmp(mode, "when-possible")) {
-			tcp_stream = camel_tcp_stream_ssl_new_raw(is->session, is->url->host, STARTTLS_FLAGS);
+			tcp_stream = camel_tcp_stream_ssl_new_raw (is->session, is->url->host, STARTTLS_FLAGS);
 			ssl_mode = 2;
 		} else {
 			if (is->url->port == 0) {
 				serv = "imaps";
 				fallback_port = 993;
 			}
-			tcp_stream = camel_tcp_stream_ssl_new(is->session, is->url->host, SSL_PORT_FLAGS);
+			tcp_stream = camel_tcp_stream_ssl_new (is->session, is->url->host, SSL_PORT_FLAGS);
 		}
 	} else {
 		tcp_stream = camel_tcp_stream_raw_new ();
@@ -2749,7 +2749,7 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 		g_free (socks_host);
 	}
 
-	ret = camel_tcp_stream_connect(CAMEL_TCP_STREAM(tcp_stream), is->url->host, serv, fallback_port, error);
+	ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), is->url->host, serv, fallback_port, error);
 	if (ret == -1) {
 		g_prefix_error (
 			error, _("Could not connect to %s (port %s): "),
@@ -2758,13 +2758,13 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 		return FALSE;
 	}
 
-	is->stream = (CamelIMAPXStream *) camel_imapx_stream_new(tcp_stream);
+	is->stream = (CamelIMAPXStream *) camel_imapx_stream_new (tcp_stream);
 	g_object_unref (tcp_stream);
 
 	/* Disable Nagle - we send a lot of small requests which nagle slows down */
 	sockopt.option = CAMEL_SOCKOPT_NODELAY;
 	sockopt.value.no_delay = TRUE;
-	camel_tcp_stream_setsockopt((CamelTcpStream *)tcp_stream, &sockopt);
+	camel_tcp_stream_setsockopt ((CamelTcpStream *)tcp_stream, &sockopt);
 
 	/* Set keepalive - needed for some hosts/router configurations, we're idle a lot */
 	sockopt.option = CAMEL_SOCKOPT_KEEPALIVE;
@@ -2790,16 +2790,16 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 			imapx_untagged (is, error);
 			break;
 		}
-		camel_imapx_stream_ungettoken(is->stream, tok, token, len);
+		camel_imapx_stream_ungettoken (is->stream, tok, token, len);
 		if (camel_imapx_stream_text (is->stream, &token, error))
 			return FALSE;
 		e(printf("Got unexpected line before greeting:  '%s'\n", token));
-		g_free(token);
+		g_free (token);
 	}
 
 	if (!is->cinfo) {
 		ic = camel_imapx_command_new(is, "CAPABILITY", NULL, "CAPABILITY");
-		imapx_command_run(is, ic);
+		imapx_command_run (is, ic);
 
 		if (ic->error != NULL || ic->status->result != IMAPX_OK) {
 			if (ic->error == NULL)
@@ -2810,10 +2810,10 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 			else
 				g_propagate_error (error, ic->error);
 
-			camel_imapx_command_free(ic);
+			camel_imapx_command_free (ic);
 			return FALSE;
 		}
-		camel_imapx_command_free(ic);
+		camel_imapx_command_free (ic);
 	}
 
 #ifdef CAMEL_HAVE_SSL
@@ -2841,12 +2841,12 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 			else
 				g_propagate_error (&local_error, ic->error);
 
-			camel_imapx_command_free(ic);
+			camel_imapx_command_free (ic);
 			goto exit;
 		}
 
 		/* See if we got new capabilities in the STARTTLS response */
-		imapx_free_capability(is->cinfo);
+		imapx_free_capability (is->cinfo);
 		is->cinfo = NULL;
 		if (ic->status->condition == IMAPX_CAPABILITY) {
 			is->cinfo = ic->status->u.cinfo;
@@ -2854,7 +2854,7 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 			c(printf("got capability flags %08x\n", is->cinfo->capa));
 		}
 
-		camel_imapx_command_free(ic);
+		camel_imapx_command_free (ic);
 
 		if (camel_tcp_stream_ssl_enable_ssl (CAMEL_TCP_STREAM_SSL (tcp_stream)) == -1) {
 			g_set_error (
@@ -2873,7 +2873,7 @@ imapx_connect_to_server (CamelIMAPXServer *is, GError **error)
 				goto exit;
 			}
 
-			camel_imapx_command_free(ic);
+			camel_imapx_command_free (ic);
 		}
 	}
 #endif
@@ -2886,7 +2886,7 @@ exit:
 		is->stream = NULL;
 
 		if (is->cinfo) {
-			imapx_free_capability(is->cinfo);
+			imapx_free_capability (is->cinfo);
 			is->cinfo = NULL;
 		}
 
@@ -2958,7 +2958,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 				full_prompt = g_strdup (base_prompt);
 
 			auth_domain = camel_url_get_param (service->url, "auth-domain");
-			service->url->passwd = camel_session_get_password(is->session, (CamelService *)is->store,
+			service->url->passwd = camel_session_get_password (is->session, (CamelService *)is->store,
 					auth_domain,
 					full_prompt, "password", prompt_flags, error);
 
@@ -2987,7 +2987,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 		if (ic->error == NULL && ic->status->result == IMAPX_OK) {
 			/* Forget old capabilities after login */
 			if (is->cinfo) {
-				imapx_free_capability(is->cinfo);
+				imapx_free_capability (is->cinfo);
 				is->cinfo = NULL;
 			}
 
@@ -3004,7 +3004,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 			    set with the error message */
 			if (ic->error != NULL) {
 				g_propagate_error (error, ic->error);
-				camel_imapx_command_free(ic);
+				camel_imapx_command_free (ic);
 				goto exception;
 			}
 
@@ -3013,7 +3013,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 					 ic->status->text);
 		}
 
-		camel_imapx_command_free(ic);
+		camel_imapx_command_free (ic);
 	}
 
 	/* After login we re-capa unless the server already told us */
@@ -3021,7 +3021,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 		ic = camel_imapx_command_new(is, "CAPABILITY", NULL, "CAPABILITY");
 		if (!imapx_command_run (is, ic)) {
 			g_propagate_error (error, ic->error);
-			camel_imapx_command_free(ic);
+			camel_imapx_command_free (ic);
 			goto exception;
 		}
 
@@ -3072,7 +3072,7 @@ imapx_reconnect (CamelIMAPXServer *is, GError **error)
 		CamelIMAPXStore *imapx_store = (CamelIMAPXStore *) is->store;
 
 		/* set a default namespace */
-		nsl = g_malloc0(sizeof(CamelIMAPXNamespaceList));
+		nsl = g_malloc0 (sizeof (CamelIMAPXNamespaceList));
 		ns = g_new0 (CamelIMAPXStoreNamespace, 1);
 		ns->next = NULL;
 		ns->path = g_strdup ("");
@@ -3092,7 +3092,7 @@ exception:
 	imapx_disconnect (is);
 
 	if (is->cinfo) {
-		imapx_free_capability(is->cinfo);
+		imapx_free_capability (is->cinfo);
 		is->cinfo = NULL;
 	}
 
@@ -3102,7 +3102,7 @@ exception:
 /* ********************************************************************** */
 
 static void
-imapx_command_fetch_message_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_fetch_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
 	CamelIMAPXJob *job = ic->job;
 	const gchar *full_name;
@@ -3120,7 +3120,7 @@ imapx_command_fetch_message_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		failed = TRUE;
 		job->u.get_message.body_len = -1;
 	} else  if (job->u.get_message.use_multi_fetch) {
-		gsize really_fetched = CAMEL_SEEKABLE_STREAM(job->u.get_message.stream)->position;
+		gsize really_fetched = CAMEL_SEEKABLE_STREAM (job->u.get_message.stream)->position;
 		/* Don't automatically stop when we reach the reported message
 		   size -- some crappy servers (like Microsoft Exchange) have
 		   a tendency to lie about it. Keep going (one request at a
@@ -3140,7 +3140,7 @@ imapx_command_fetch_message_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 			ic->pri = job->pri - 1;
 			job->u.get_message.fetch_offset += MULTI_SIZE;
 			job->commands++;
-			imapx_command_queue(is, ic);
+			imapx_command_queue (is, ic);
 			return;
 		}
 	}
@@ -3212,7 +3212,7 @@ imapx_job_get_message_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 			ic->pri = job->pri;
 			job->u.get_message.fetch_offset += MULTI_SIZE;
 			job->commands++;
-			imapx_command_queue(is, ic);
+			imapx_command_queue (is, ic);
 		}
 	} else {
 		ic = camel_imapx_command_new(is, "FETCH", job->folder,
@@ -3221,7 +3221,7 @@ imapx_job_get_message_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 		ic->job = job;
 		ic->pri = job->pri;
 		job->commands++;
-		imapx_command_queue(is, ic);
+		imapx_command_queue (is, ic);
 	}
 }
 
@@ -3291,7 +3291,7 @@ imapx_command_copy_messages_step_done (CamelIMAPXServer *is, CamelIMAPXCommand *
 		gint i;
 
 		for (i = 0; i < ic->status->u.copyuid.copied_uids->len; i++) {
-			guint32 uid = GPOINTER_TO_UINT(g_ptr_array_index (ic->status->u.copyuid.copied_uids, i));
+			guint32 uid = GPOINTER_TO_UINT (g_ptr_array_index (ic->status->u.copyuid.copied_uids, i));
 			gchar *str = g_strdup_printf ("%d",uid);
 			CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *) job->u.copy_messages.dest;
 
@@ -3321,7 +3321,7 @@ imapx_job_copy_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 		imapx_job_done (is, job);
 
 	g_ptr_array_sort (job->u.copy_messages.uids, (GCompareFunc) imapx_uids_array_cmp);
-	imapx_uidset_init(&job->u.copy_messages.uidset, 0, MAX_COMMAND_LEN);
+	imapx_uidset_init (&job->u.copy_messages.uidset, 0, MAX_COMMAND_LEN);
 	imapx_command_copy_messages_step_start (is, job, 0);
 }
 
@@ -3367,7 +3367,7 @@ imapx_command_append_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 				camel_folder_changed (job->folder, changes);
 				camel_folder_change_info_free (changes);
 
-				g_free(cur);
+				g_free (cur);
 			} else {
 				g_message ("but uidvalidity changed \n");
 			}
@@ -3383,8 +3383,8 @@ imapx_command_append_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 
 	camel_data_cache_remove (ifolder->cache, "new", old_uid, NULL);
 	g_free (old_uid);
-	camel_message_info_free(job->u.append_message.info);
-	g_free(job->u.append_message.path);
+	camel_message_info_free (job->u.append_message.info);
+	g_free (job->u.append_message.path);
 	g_object_unref (job->folder);
 
 	imapx_job_done (is, job);
@@ -3392,7 +3392,7 @@ imapx_command_append_message_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_append_message_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_append_message_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 
@@ -3407,7 +3407,7 @@ imapx_job_append_message_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->job = job;
 	ic->pri = job->pri;
 	job->commands++;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 }
 
 /* ********************************************************************** */
@@ -3462,7 +3462,7 @@ imapx_index_next (GPtrArray *uids, CamelFolderSummary *s, guint index)
 		if (!info)
 			continue;
 
-		if (info && (strchr(camel_message_info_uid(info), '-') != NULL)) {
+		if (info && (strchr (camel_message_info_uid (info), '-') != NULL)) {
 			camel_message_info_free (info);
 			e(printf("Ignoring offline uid '%s'\n", camel_message_info_uid(info)));
 		} else {
@@ -3475,7 +3475,7 @@ imapx_index_next (GPtrArray *uids, CamelFolderSummary *s, guint index)
 }
 
 static void
-imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_command_step_fetch_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
 	CamelIMAPXFolder *ifolder = (CamelIMAPXFolder *)ic->job->folder;
 	CamelIMAPXSummary *isum = (CamelIMAPXSummary *)ic->job->folder->summary;
@@ -3494,13 +3494,13 @@ imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		goto cleanup;
 	}
 
-	if (camel_folder_change_info_changed(job->u.refresh_info.changes)) {
+	if (camel_folder_change_info_changed (job->u.refresh_info.changes)) {
 		imapx_update_store_summary (job->folder);
 		camel_folder_summary_save_to_db (job->folder->summary, NULL);
 		camel_folder_changed (job->folder, job->u.refresh_info.changes);
 	}
 
-	camel_folder_change_info_clear(job->u.refresh_info.changes);
+	camel_folder_change_info_clear (job->u.refresh_info.changes);
 
 	if (i<infos->len) {
 		camel_imapx_command_free (ic);
@@ -3513,38 +3513,38 @@ imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 
 		for (;i<infos->len;i++) {
 			gint res;
-			struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
+			struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
 
 			if (!r->exists) {
-				res = imapx_uidset_add(&job->u.refresh_info.uidset, ic, r->uid);
+				res = imapx_uidset_add (&job->u.refresh_info.uidset, ic, r->uid);
 				if (res == 1) {
 					camel_imapx_command_add(ic, " (RFC822.SIZE RFC822.HEADER)");
 					job->u.refresh_info.index = i;
-					imapx_command_queue(is, ic);
+					imapx_command_queue (is, ic);
 					return;
 				}
 			}
 		}
 
 		job->u.refresh_info.index = i;
-		if (imapx_uidset_done(&job->u.refresh_info.uidset, ic)) {
+		if (imapx_uidset_done (&job->u.refresh_info.uidset, ic)) {
 			camel_imapx_command_add(ic, " (RFC822.SIZE RFC822.HEADER)");
-			imapx_command_queue(is, ic);
+			imapx_command_queue (is, ic);
 			return;
 		}
 	}
 
-	if (camel_folder_summary_count(job->folder->summary)) {
+	if (camel_folder_summary_count (job->folder->summary)) {
 		gchar *uid = camel_folder_summary_uid_from_index (job->folder->summary,
-						  camel_folder_summary_count(job->folder->summary) - 1);
-		unsigned long long uidl = strtoull(uid, NULL, 10);
-		g_free(uid);
+						  camel_folder_summary_count (job->folder->summary) - 1);
+		unsigned long long uidl = strtoull (uid, NULL, 10);
+		g_free (uid);
 
 		uidl++;
 
 		if (uidl > ifolder->uidnext_on_server) {
 			c(printf("Updating uidnext_on_server for '%s' to %lld\n",
-				 camel_folder_get_full_name(job->folder), uidl));
+				 camel_folder_get_full_name (job->folder), uidl));
 			ifolder->uidnext_on_server = uidl;
 		}
 	}
@@ -3552,12 +3552,12 @@ imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 
  cleanup:
 	for (i=0;i<infos->len;i++) {
-		struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
+		struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
 
 		camel_flag_list_free (&r->server_user_flags);
-		g_free(r->uid);
+		g_free (r->uid);
 	}
-	g_array_free(job->u.refresh_info.infos, TRUE);
+	g_array_free (job->u.refresh_info.infos, TRUE);
 	if (job->type == IMAPX_JOB_FETCH_NEW_MESSAGES)
 		camel_folder_change_info_free (job->u.refresh_info.changes);
 
@@ -3566,14 +3566,14 @@ imapx_command_step_fetch_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static gint
-imapx_uid_cmp(gconstpointer ap, gconstpointer bp, gpointer data)
+imapx_uid_cmp (gconstpointer ap, gconstpointer bp, gpointer data)
 {
 	const gchar *a = ap, *b = bp;
 	gchar *ae, *be;
 	unsigned long av, bv;
 
-	av = strtoul(a, &ae, 10);
-	bv = strtoul(b, &be, 10);
+	av = strtoul (a, &ae, 10);
+	bv = strtoul (b, &be, 10);
 
 	if (av < bv)
 		return -1;
@@ -3585,11 +3585,11 @@ imapx_uid_cmp(gconstpointer ap, gconstpointer bp, gpointer data)
 	if (*be == '-')
 		be++;
 
-	return strcmp(ae, be);
+	return strcmp (ae, be);
 }
 
 static void
-imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
+imapx_job_scan_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 {
 	CamelIMAPXJob *job = ic->job;
 	gint i;
@@ -3624,16 +3624,16 @@ imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		/* obtain a copy to be thread safe */
 		uids = camel_folder_summary_array (s);
 
-		qsort(infos->data, infos->len, sizeof(struct _refresh_info), imapx_refresh_info_cmp);
-		g_ptr_array_sort(uids, (GCompareFunc) imapx_uids_array_cmp);
+		qsort (infos->data, infos->len, sizeof (struct _refresh_info), imapx_refresh_info_cmp);
+		g_ptr_array_sort (uids, (GCompareFunc) imapx_uids_array_cmp);
 
 		if (uids->len)
 			s_minfo = camel_folder_summary_uid (s, g_ptr_array_index (uids, 0));
 
 		for (i=0; i<infos->len; i++) {
-			struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
+			struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
 
-			while (s_minfo && uid_cmp (camel_message_info_uid(s_minfo), r->uid, s) < 0) {
+			while (s_minfo && uid_cmp (camel_message_info_uid (s_minfo), r->uid, s) < 0) {
 				const gchar *uid = camel_message_info_uid (s_minfo);
 
 				camel_folder_change_info_remove_uid (job->u.refresh_info.changes, uid);
@@ -3647,7 +3647,7 @@ imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 			}
 
 			info = NULL;
-			if (s_minfo && uid_cmp(s_minfo->uid, r->uid, s) == 0) {
+			if (s_minfo && uid_cmp (s_minfo->uid, r->uid, s) == 0) {
 				info = (CamelIMAPXMessageInfo *)s_minfo;
 
 				if (imapx_update_message_info_flags ((CamelMessageInfo *) info, r->server_flags, r->server_user_flags, job->folder, FALSE))
@@ -3711,9 +3711,9 @@ imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 
 		imapx_update_store_summary (job->folder);
 
-		if (camel_folder_change_info_changed(job->u.refresh_info.changes))
+		if (camel_folder_change_info_changed (job->u.refresh_info.changes))
 			camel_folder_changed (job->folder, job->u.refresh_info.changes);
-		camel_folder_change_info_clear(job->u.refresh_info.changes);
+		camel_folder_change_info_clear (job->u.refresh_info.changes);
 
 		camel_folder_free_uids (job->folder, uids);
 
@@ -3722,11 +3722,11 @@ imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 			camel_operation_start (
 				job->op, _("Fetching summary information for new messages in %s"),
 				camel_folder_get_name (job->folder));
-			imapx_uidset_init(&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
+			imapx_uidset_init (&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
 			/* These are new messages which arrived since we last knew the unseen count;
 			   update it as they arrive. */
 			job->u.refresh_info.update_unseen = TRUE;
-			imapx_command_step_fetch_done(is, ic);
+			imapx_command_step_fetch_done (is, ic);
 			return;
 		}
 	} else {
@@ -3739,23 +3739,23 @@ imapx_job_scan_changes_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 	}
 
 	for (i=0;i<infos->len;i++) {
-		struct _refresh_info *r = &g_array_index(infos, struct _refresh_info, i);
+		struct _refresh_info *r = &g_array_index (infos, struct _refresh_info, i);
 
 		camel_flag_list_free (&r->server_user_flags);
-		g_free(r->uid);
+		g_free (r->uid);
 	}
 
 	/* There's no sane way to get the server-side unseen count on the
 	   select mailbox. So just work it out from the flags */
 	((CamelIMAPXFolder *)job->folder)->unread_on_server = job->folder->summary->unread_count;
 
-	g_array_free(job->u.refresh_info.infos, TRUE);
+	g_array_free (job->u.refresh_info.infos, TRUE);
 	imapx_job_done (is, job);
 	camel_imapx_command_free (ic);
 }
 
 static void
-imapx_job_scan_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_scan_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 
@@ -3768,7 +3768,7 @@ imapx_job_scan_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->job = job;
 	ic->complete = imapx_job_scan_changes_done;
 	ic->pri = job->pri;
-	job->u.refresh_info.infos = g_array_new (0, 0, sizeof(struct _refresh_info));
+	job->u.refresh_info.infos = g_array_new (0, 0, sizeof (struct _refresh_info));
 	imapx_command_queue (is, ic);
 }
 
@@ -3788,24 +3788,24 @@ imapx_command_fetch_new_messages_done (CamelIMAPXServer *is, CamelIMAPXCommand *
 		goto exception;
 	}
 
-	if (camel_folder_change_info_changed(ic->job->u.refresh_info.changes)) {
+	if (camel_folder_change_info_changed (ic->job->u.refresh_info.changes)) {
 		imapx_update_store_summary (ic->job->folder);
 		camel_folder_summary_save_to_db (ic->job->folder->summary, NULL);
 		camel_folder_changed (ic->job->folder, ic->job->u.refresh_info.changes);
-		camel_folder_change_info_clear(ic->job->u.refresh_info.changes);
+		camel_folder_change_info_clear (ic->job->u.refresh_info.changes);
 	}
 
-	if (camel_folder_summary_count(ic->job->folder->summary)) {
+	if (camel_folder_summary_count (ic->job->folder->summary)) {
 		gchar *uid = camel_folder_summary_uid_from_index (ic->job->folder->summary,
-					  camel_folder_summary_count(ic->job->folder->summary) - 1);
-		unsigned long long uidl = strtoull(uid, NULL, 10);
-		g_free(uid);
+					  camel_folder_summary_count (ic->job->folder->summary) - 1);
+		unsigned long long uidl = strtoull (uid, NULL, 10);
+		g_free (uid);
 
 		uidl++;
 
 		if (uidl > ifolder->uidnext_on_server) {
 			c(printf("Updating uidnext_on_server for '%s' to %lld\n",
-				 camel_folder_get_full_name(ic->job->folder), uidl));
+				 camel_folder_get_full_name (ic->job->folder), uidl));
 			ifolder->uidnext_on_server = uidl;
 		}
 	}
@@ -3837,8 +3837,8 @@ imapx_job_fetch_new_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	if (total > 0) {
 		unsigned long long uidl;
 		uid = camel_folder_summary_uid_from_index (folder->summary, total - 1);
-		uidl = strtoull(uid, NULL, 10);
-		g_free(uid);
+		uidl = strtoull (uid, NULL, 10);
+		g_free (uid);
 		uid = g_strdup_printf("%lld", uidl+1);
 	} else
 		uid = g_strdup ("1");
@@ -3850,8 +3850,8 @@ imapx_job_fetch_new_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	if (diff > BATCH_FETCH_COUNT) {
 		ic = camel_imapx_command_new (is, "FETCH", job->folder,
 				     "UID FETCH %s:* (UID FLAGS)", uid);
-		imapx_uidset_init(&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
-		job->u.refresh_info.infos = g_array_new (0, 0, sizeof(struct _refresh_info));
+		imapx_uidset_init (&job->u.refresh_info.uidset, BATCH_FETCH_COUNT, 0);
+		job->u.refresh_info.infos = g_array_new (0, 0, sizeof (struct _refresh_info));
 		ic->pri = job->pri;
 		ic->complete = imapx_command_step_fetch_done;
 	} else {
@@ -3915,16 +3915,16 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 		if (is_selected) {
 			/* We may not issue STATUS on the current folder. Use SELECT or NOOP instead. */
 			if (0 /* server needs SELECT not just NOOP*/) {
-				if (imapx_idle_supported(is) && imapx_in_idle(is))
-					if (!imapx_stop_idle(is, &job->error))
+				if (imapx_idle_supported (is) && imapx_in_idle (is))
+					if (!imapx_stop_idle (is, &job->error))
 						goto done;
 				/* This doesn't work -- this is an immediate command, not queued */
-				if (!imapx_select(is, folder, TRUE, &job->error))
+				if (!imapx_select (is, folder, TRUE, &job->error))
 					goto done;
 			} else {
 				/* Or maybe just NOOP, unless we're in IDLE in which case do nothing */
-				if (!imapx_idle_supported(is) || !imapx_in_idle(is)) {
-					if (!camel_imapx_server_noop(is, folder, &job->error))
+				if (!imapx_idle_supported (is) || !imapx_in_idle (is)) {
+					if (!camel_imapx_server_noop (is, folder, &job->error))
 						goto done;
 				}
 			}
@@ -3992,10 +3992,10 @@ imapx_job_refresh_info_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 
 	if (can_qresync) {
 		/* Actually we only want to select it; no need for the NOOP */
-		camel_imapx_server_noop(is, folder, &job->error);
+		camel_imapx_server_noop (is, folder, &job->error);
 	qresync_done:
 		isum->modseq = ifolder->modseq_on_server;
-		total = camel_folder_summary_count(job->folder->summary);
+		total = camel_folder_summary_count (job->folder->summary);
 		if (total != ifolder->exists_on_server ||
 		    folder->summary->unread_count != ifolder->unread_on_server ||
 		    (isum->modseq != ifolder->modseq_on_server)) {
@@ -4079,7 +4079,7 @@ imapx_command_expunge_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_expunge_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_expunge_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 
@@ -4090,7 +4090,7 @@ imapx_job_expunge_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->job = job;
 	ic->pri = job->pri;
 	ic->complete = imapx_command_expunge_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 }
 
 /* ********************************************************************** */
@@ -4113,7 +4113,7 @@ imapx_command_list_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_list_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_list_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 
@@ -4123,12 +4123,12 @@ imapx_job_list_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 	if (job->u.list.ext) {
 		/* Hm, we need a way to add atoms _without_ quoting or using literals */
 		camel_imapx_command_add(ic, " ");
-		camel_imapx_command_add(ic, job->u.list.ext);
+		camel_imapx_command_add (ic, job->u.list.ext);
 	}
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_list_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 }
 /* ********************************************************************** */
 
@@ -4137,9 +4137,9 @@ imapx_encode_folder_name (CamelIMAPXStore *istore, const gchar *folder_name)
 {
 	gchar *fname, *encoded;
 
-	fname = camel_imapx_store_summary_full_from_path(istore->summary, folder_name);
+	fname = camel_imapx_store_summary_full_from_path (istore->summary, folder_name);
 	if (fname) {
-		encoded = camel_utf8_utf7(fname);
+		encoded = camel_utf8_utf7 (fname);
 		g_free (fname);
 	} else
 		encoded = camel_utf8_utf7 (folder_name);
@@ -4181,7 +4181,7 @@ imapx_job_manage_subscription_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_subscription_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 
 	g_free (encoded_fname);
 }
@@ -4215,7 +4215,7 @@ imapx_job_create_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_create_folder_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 
 	g_free (encoded_fname);
 }
@@ -4253,7 +4253,7 @@ imapx_job_delete_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_delete_folder_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 
 	g_free (encoded_fname);
 }
@@ -4291,7 +4291,7 @@ imapx_job_rename_folder_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	ic->pri = job->pri;
 	ic->job = job;
 	ic->complete = imapx_command_rename_folder_done;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 
 	g_free (en_ofname);
 	g_free (en_nfname);
@@ -4316,7 +4316,7 @@ imapx_command_noop_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_noop_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_noop_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	CamelIMAPXCommand *ic;
 
@@ -4328,7 +4328,7 @@ imapx_job_noop_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 		ic->pri = IMAPX_PRIORITY_REFRESH_INFO;
 	else
 		ic->pri = IMAPX_PRIORITY_NOOP;
-	imapx_command_queue(is, ic);
+	imapx_command_queue (is, ic);
 }
 
 /* ********************************************************************** */
@@ -4433,7 +4433,7 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 		}
 
 		camel_folder_summary_save_to_db (job->folder->summary, &job->error);
-		camel_store_summary_save((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary);
+		camel_store_summary_save ((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary);
 
 		imapx_job_done (is, job);
 	}
@@ -4441,7 +4441,7 @@ imapx_command_sync_changes_done (CamelIMAPXServer *is, CamelIMAPXCommand *ic)
 }
 
 static void
-imapx_job_sync_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
+imapx_job_sync_changes_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 {
 	guint32 i, j;
 	struct _uidset_state ss;
@@ -4460,7 +4460,7 @@ imapx_job_sync_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 				continue;
 
 			c(printf("checking/storing %s flags '%s'\n", on?"on":"off", flags_table[j].name));
-			imapx_uidset_init(&ss, 0, 100);
+			imapx_uidset_init (&ss, 0, 100);
 			for (i = 0; i < uids->len; i++) {
 				CamelIMAPXMessageInfo *info = (CamelIMAPXMessageInfo *)camel_folder_summary_uid
 										(job->folder->summary, uids->pdata[i]);
@@ -4483,12 +4483,12 @@ imapx_job_sync_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 						ic->job = job;
 						ic->pri = job->pri;
 					}
-					send = imapx_uidset_add(&ss, ic, camel_message_info_uid(info));
+					send = imapx_uidset_add (&ss, ic, camel_message_info_uid (info));
 				}
-				if (send || (i == uids->len-1 && imapx_uidset_done(&ss, ic))) {
+				if (send || (i == uids->len-1 && imapx_uidset_done (&ss, ic))) {
 					job->commands++;
 					camel_imapx_command_add(ic, " %tFLAGS.SILENT (%t)", on?"+":"-", flags_table[j].name);
-					imapx_command_queue(is, ic);
+					imapx_command_queue (is, ic);
 					ic = NULL;
 				}
 				if (flag == CAMEL_MESSAGE_SEEN) {
@@ -4507,9 +4507,9 @@ imapx_job_sync_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 			CamelIMAPXCommand *ic = NULL;
 
 			for (j=0; j<user_set->len; j++) {
-				struct _imapx_flag_change *c = &g_array_index(user_set, struct _imapx_flag_change, j);
+				struct _imapx_flag_change *c = &g_array_index (user_set, struct _imapx_flag_change, j);
 
-				imapx_uidset_init(&ss, 0, 100);
+				imapx_uidset_init (&ss, 0, 100);
 				for (i=0; i < c->infos->len; i++) {
 					CamelIMAPXMessageInfo *info = c->infos->pdata[i];
 
@@ -4520,11 +4520,11 @@ imapx_job_sync_changes_start(CamelIMAPXServer *is, CamelIMAPXJob *job)
 						ic->pri = job->pri;
 					}
 
-					if (imapx_uidset_add(&ss, ic, camel_message_info_uid (info))
+					if (imapx_uidset_add (&ss, ic, camel_message_info_uid (info))
 					    || (i == c->infos->len-1 && imapx_uidset_done (&ss, ic))) {
 						job->commands++;
 						camel_imapx_command_add(ic, " %tFLAGS.SILENT (%t)", on?"+":"-", c->name);
-						imapx_command_queue(is, ic);
+						imapx_command_queue (is, ic);
 						ic = NULL;
 					}
 				}
@@ -4548,7 +4548,7 @@ cancel_all_jobs (CamelIMAPXServer *is, GError *error)
 	gint i = 0;
 
 	while (i < 2) {
-		QUEUE_LOCK(is);
+		QUEUE_LOCK (is);
 		if (i == 1)
 			cw = (CamelIMAPXCommand **) &is->queue.head;
 		else
@@ -4557,14 +4557,14 @@ cancel_all_jobs (CamelIMAPXServer *is, GError *error)
 		while ((*cw)->next) {
 			ic = *cw;
 			camel_dlist_remove ((CamelDListNode *)ic);
-			QUEUE_UNLOCK(is);
+			QUEUE_UNLOCK (is);
 
 			ic->error = g_error_copy (error);
 			ic->complete (is, ic);
 
-			QUEUE_LOCK(is);
+			QUEUE_LOCK (is);
 		}
-		QUEUE_UNLOCK(is);
+		QUEUE_UNLOCK (is);
 		i++;
 	}
 }
@@ -4617,9 +4617,9 @@ imapx_parser_thread (gpointer d)
 			fds[0].events = G_IO_IN;
 			fds[1].fd = camel_operation_cancel_fd (op);
 			fds[1].events = G_IO_IN;
-			res = g_poll(fds, 2, 1000*30);
+			res = g_poll (fds, 2, 1000*30);
 			if (res == -1)
-				g_usleep(1) /* ?? */ ;
+				g_usleep (1) /* ?? */ ;
 			else if (res == 0)
 				/* timed out */;
 			else if (fds[0].revents & G_IO_IN) {
@@ -4639,9 +4639,9 @@ imapx_parser_thread (gpointer d)
 
 #include <prio.h>
 
-			res = PR_Poll(pollfds, 2, PR_MillisecondsToInterval (30 * 1000));
+			res = PR_Poll (pollfds, 2, PR_MillisecondsToInterval (30 * 1000));
 			if (res == -1)
-				g_usleep(1) /* ?? */ ;
+				g_usleep (1) /* ?? */ ;
 			else if (res == 0) {
 				/* timed out */
 			} else if ((pollfds[0].out_flags & PR_POLL_READ)) {
@@ -4675,9 +4675,9 @@ imapx_parser_thread (gpointer d)
 		}
 	}
 
-	QUEUE_LOCK(is);
+	QUEUE_LOCK (is);
 	is->state = IMAPX_SHUTDOWN;
-	QUEUE_UNLOCK(is);
+	QUEUE_UNLOCK (is);
 
 	cancel_all_jobs (is, local_error);
 
@@ -4704,7 +4704,7 @@ imapx_server_finalize (GObject *object)
 
 	camel_url_free (is->url);
 
-	g_static_rec_mutex_free(&is->queue_lock);
+	g_static_rec_mutex_free (&is->queue_lock);
 	g_static_rec_mutex_free (&is->ostream_lock);
 	g_hash_table_destroy (is->uid_eflags);
 
@@ -4733,9 +4733,9 @@ imapx_server_dispose (GObject *object)
 {
 	CamelIMAPXServer *server = CAMEL_IMAPX_SERVER (object);
 
-	QUEUE_LOCK(server);
+	QUEUE_LOCK (server);
 	server->state = IMAPX_SHUTDOWN;
-	QUEUE_UNLOCK(server);
+	QUEUE_UNLOCK (server);
 
 	server->parser_quit = TRUE;
 	camel_operation_cancel (server->op);
@@ -4753,7 +4753,7 @@ imapx_server_dispose (GObject *object)
 }
 
 static void
-camel_imapx_server_class_init(CamelIMAPXServerClass *class)
+camel_imapx_server_class_init (CamelIMAPXServerClass *class)
 {
 	GObjectClass *object_class;
 
@@ -4797,10 +4797,10 @@ camel_imapx_server_class_init(CamelIMAPXServerClass *class)
 static void
 camel_imapx_server_init (CamelIMAPXServer *is)
 {
-	camel_dlist_init(&is->queue);
-	camel_dlist_init(&is->active);
-	camel_dlist_init(&is->done);
-	camel_dlist_init(&is->jobs);
+	camel_dlist_init (&is->queue);
+	camel_dlist_init (&is->active);
+	camel_dlist_init (&is->done);
+	camel_dlist_init (&is->jobs);
 
 	/* not used at the moment. Use it in future */
 	is->job_timeout = 29 * 60 * 1000 * 1000;
@@ -4818,14 +4818,14 @@ camel_imapx_server_init (CamelIMAPXServer *is)
 }
 
 CamelIMAPXServer *
-camel_imapx_server_new(CamelStore *store, CamelURL *url)
+camel_imapx_server_new (CamelStore *store, CamelURL *url)
 {
 	CamelIMAPXServer *is;
 
 	is = g_object_new (CAMEL_TYPE_IMAPX_SERVER, NULL);
 	is->session = g_object_ref (CAMEL_SERVICE (store)->session);
 	is->store = store;
-	is->url = camel_url_copy(url);
+	is->url = camel_url_copy (url);
 
 	return is;
 }
@@ -4857,7 +4857,7 @@ imapx_disconnect (CamelIMAPXServer *is)
 	}
 
 	if (is->cinfo) {
-		imapx_free_capability(is->cinfo);
+		imapx_free_capability (is->cinfo);
 		is->cinfo = NULL;
 	}
 
@@ -4889,7 +4889,7 @@ camel_imapx_server_connect (CamelIMAPXServer *is, GError **error)
 	if (!success)
 		return FALSE;
 
-	is->parser_thread = g_thread_create((GThreadFunc) imapx_parser_thread, is, TRUE, NULL);
+	is->parser_thread = g_thread_create ((GThreadFunc) imapx_parser_thread, is, TRUE, NULL);
 	return TRUE;
 }
 
@@ -4945,7 +4945,7 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, CamelOperat
 
 	tmp_stream = camel_data_cache_add (ifolder->cache, "tmp", uid, NULL);
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->pri = pri;
 	job->type = IMAPX_JOB_GET_MESSAGE;
 	job->start = imapx_job_get_message_start;
@@ -4972,7 +4972,7 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, CamelOperat
 	if (success)
 		stream = job->u.get_message.stream;
 
-	g_free(job);
+	g_free (job);
 
 	/* HACK FIXME just sleep for sometime so that the other waiting locks gets released by that time. Think of a
 	 better way..*/
@@ -4983,12 +4983,12 @@ imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, CamelOperat
 }
 
 CamelStream *
-camel_imapx_server_get_message(CamelIMAPXServer *is, CamelFolder *folder, const gchar *uid, GError **error)
+camel_imapx_server_get_message (CamelIMAPXServer *is, CamelFolder *folder, const gchar *uid, GError **error)
 {
 	CamelStream *stream;
 	CamelOperation *op = camel_operation_registered ();
 
-	stream = imapx_server_get_message(is, folder, op, uid, IMAPX_PRIORITY_GET_MESSAGE, error);
+	stream = imapx_server_get_message (is, folder, op, uid, IMAPX_PRIORITY_GET_MESSAGE, error);
 	if (op)
 		camel_operation_unref (op);
 
@@ -5023,7 +5023,7 @@ camel_imapx_server_copy_message (CamelIMAPXServer *is, CamelFolder *source, Came
 {
 	CamelIMAPXJob *job;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->pri = IMAPX_PRIORITY_APPEND_MESSAGE;
 	job->type = IMAPX_JOB_COPY_MESSAGE;
 	job->start = imapx_job_copy_messages_start;
@@ -5039,7 +5039,7 @@ camel_imapx_server_copy_message (CamelIMAPXServer *is, CamelFolder *source, Came
 }
 
 gboolean
-camel_imapx_server_append_message(CamelIMAPXServer *is, CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *mi, GError **error)
+camel_imapx_server_append_message (CamelIMAPXServer *is, CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *mi, GError **error)
 {
 	gchar *uid = NULL, *tmp = NULL;
 	CamelStream *stream, *filter;
@@ -5070,8 +5070,8 @@ camel_imapx_server_append_message(CamelIMAPXServer *is, CamelFolder *folder, Cam
 
 	filter = camel_stream_filter_new (stream);
 	g_object_unref (stream);
-	canon = camel_mime_filter_canon_new(CAMEL_MIME_FILTER_CANON_CRLF);
-	camel_stream_filter_add((CamelStreamFilter *)filter, canon);
+	canon = camel_mime_filter_canon_new (CAMEL_MIME_FILTER_CANON_CRLF);
+	camel_stream_filter_add ((CamelStreamFilter *)filter, canon);
 	res = camel_data_wrapper_write_to_stream (
 		(CamelDataWrapper *)message, filter, error);
 	g_object_unref (canon);
@@ -5085,7 +5085,7 @@ camel_imapx_server_append_message(CamelIMAPXServer *is, CamelFolder *folder, Cam
 	}
 
 	tmp = camel_data_cache_get_filename (ifolder->cache, "new", uid, NULL);
-	info = camel_folder_summary_info_new_from_message((CamelFolderSummary *)folder->summary, message, NULL);
+	info = camel_folder_summary_info_new_from_message ((CamelFolderSummary *)folder->summary, message, NULL);
 	info->uid = camel_pstring_strdup (uid);
 	((CamelMessageInfoBase *) info)->flags = ((CamelMessageInfoBase *) mi)->flags;
 	g_free (uid);
@@ -5095,7 +5095,7 @@ camel_imapx_server_append_message(CamelIMAPXServer *is, CamelFolder *folder, Cam
 	   mechanism is used for normal uploading as well as
 	   offline re-syncing when we go back online */
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->pri = IMAPX_PRIORITY_APPEND_MESSAGE;
 	job->type = IMAPX_JOB_APPEND_MESSAGE;
 	job->start = imapx_job_append_message_start;
@@ -5117,7 +5117,7 @@ camel_imapx_server_noop (CamelIMAPXServer *is, CamelFolder *folder, GError **err
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_NOOP;
 	job->start = imapx_job_noop_start;
 	job->folder = folder;
@@ -5125,7 +5125,7 @@ camel_imapx_server_noop (CamelIMAPXServer *is, CamelFolder *folder, GError **err
 
 	success = imapx_submit_job (is, job, error);
 
-	g_free(job);
+	g_free (job);
 
 	return success;
 }
@@ -5147,12 +5147,12 @@ camel_imapx_server_refresh_info (CamelIMAPXServer *is, CamelFolder *folder, GErr
 		return TRUE;
 	}
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_REFRESH_INFO;
 	job->start = imapx_job_refresh_info_start;
 	job->folder = folder;
 	job->op = camel_operation_registered ();
-	job->u.refresh_info.changes = camel_folder_change_info_new();
+	job->u.refresh_info.changes = camel_folder_change_info_new ();
 	job->pri = IMAPX_PRIORITY_REFRESH_INFO;
 
 	if (g_ascii_strcasecmp(full_name, "INBOX") == 0)
@@ -5164,20 +5164,20 @@ camel_imapx_server_refresh_info (CamelIMAPXServer *is, CamelFolder *folder, GErr
 
 	success = registered && imapx_run_job (is, job, error);
 
-	if (success && camel_folder_change_info_changed(job->u.refresh_info.changes))
+	if (success && camel_folder_change_info_changed (job->u.refresh_info.changes))
 		camel_folder_changed (folder, job->u.refresh_info.changes);
 
-	camel_folder_change_info_free(job->u.refresh_info.changes);
+	camel_folder_change_info_free (job->u.refresh_info.changes);
 
 	if (job->op)
 		camel_operation_unref (job->op);
-	g_free(job);
+	g_free (job);
 
 	return success;
 }
 
 static void
-imapx_sync_free_user(GArray *user_set)
+imapx_sync_free_user (GArray *user_set)
 {
 	gint i;
 
@@ -5194,14 +5194,14 @@ imapx_sync_free_user(GArray *user_set)
 			camel_message_info_free (info);
 		}
 
-		g_ptr_array_free(infos, TRUE);
+		g_ptr_array_free (infos, TRUE);
 		g_free (flag_change->name);
 	}
-	g_array_free(user_set, TRUE);
+	g_array_free (user_set, TRUE);
 }
 
 static gboolean
-imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, GError **error)
+imapx_server_sync_changes (CamelIMAPXServer *is, CamelFolder *folder, gint pri, GError **error)
 {
 	guint i, on_orset, off_orset;
 	GPtrArray *uids;
@@ -5258,7 +5258,7 @@ imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, G
 
 			if (uflags) {
 				if (suflags)
-					res = strcmp(uflags->name, suflags->name);
+					res = strcmp (uflags->name, suflags->name);
 				else if (uflags->name && *uflags->name)
 					res = -1;
 				else {
@@ -5279,13 +5279,13 @@ imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, G
 
 				if (res < 0) {
 					if (on_user == NULL)
-						on_user = g_array_new(FALSE, FALSE, sizeof(struct _imapx_flag_change));
+						on_user = g_array_new (FALSE, FALSE, sizeof (struct _imapx_flag_change));
 					user_set = on_user;
 					user_flag = uflags;
 					uflags = uflags->next;
 				} else {
 					if (off_user == NULL)
-						off_user = g_array_new(FALSE, FALSE, sizeof(struct _imapx_flag_change));
+						off_user = g_array_new (FALSE, FALSE, sizeof (struct _imapx_flag_change));
 					user_set = off_user;
 					user_flag = suflags;
 					suflags = suflags->next;
@@ -5293,17 +5293,17 @@ imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, G
 
 				/* Could sort this and binary search */
 				for (j = 0; j < user_set->len; j++) {
-					change = &g_array_index(user_set, struct _imapx_flag_change, j);
-					if (strcmp(change->name, user_flag->name) == 0)
+					change = &g_array_index (user_set, struct _imapx_flag_change, j);
+					if (strcmp (change->name, user_flag->name) == 0)
 						goto found;
 				}
-				add.name = g_strdup(user_flag->name);
-				add.infos = g_ptr_array_new();
-				g_array_append_val(user_set, add);
+				add.name = g_strdup (user_flag->name);
+				add.infos = g_ptr_array_new ();
+				g_array_append_val (user_set, add);
 				change = &add;
 			found:
 				camel_message_info_ref (info);
-				g_ptr_array_add(change->infos, info);
+				g_ptr_array_add (change->infos, info);
 			}
 		}
 		camel_message_info_free (info);
@@ -5326,7 +5326,7 @@ imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, G
 		goto done;
 	}
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_SYNC_CHANGES;
 	job->start = imapx_job_sync_changes_start;
 	job->pri = pri;
@@ -5343,11 +5343,11 @@ imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, gint pri, G
 
 	success = registered && imapx_run_job (is, job, error);
 
-	g_free(job);
+	g_free (job);
 
 done:
-	imapx_sync_free_user(on_user);
-	imapx_sync_free_user(off_user);
+	imapx_sync_free_user (on_user);
+	imapx_sync_free_user (off_user);
 
 	camel_folder_free_uids (folder, uids);
 
@@ -5355,14 +5355,14 @@ done:
 }
 
 gboolean
-camel_imapx_server_sync_changes(CamelIMAPXServer *is, CamelFolder *folder, GError **error)
+camel_imapx_server_sync_changes (CamelIMAPXServer *is, CamelFolder *folder, GError **error)
 {
 	return imapx_server_sync_changes (is, folder, IMAPX_PRIORITY_SYNC_CHANGES, error);
 }
 
 /* expunge-uids? */
 gboolean
-camel_imapx_server_expunge(CamelIMAPXServer *is, CamelFolder *folder, GError **error)
+camel_imapx_server_expunge (CamelIMAPXServer *is, CamelFolder *folder, GError **error)
 {
 	CamelIMAPXJob *job;
 	gboolean registered;
@@ -5376,7 +5376,7 @@ camel_imapx_server_expunge(CamelIMAPXServer *is, CamelFolder *folder, GError **e
 		return TRUE;
 	}
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_EXPUNGE;
 	job->start = imapx_job_expunge_start;
 	job->pri = IMAPX_PRIORITY_EXPUNGE;
@@ -5388,22 +5388,22 @@ camel_imapx_server_expunge(CamelIMAPXServer *is, CamelFolder *folder, GError **e
 
 	success = registered && imapx_run_job (is, job, error);
 
-	g_free(job);
+	g_free (job);
 
 	return success;
 }
 
 static guint
-imapx_name_hash(gconstpointer key)
+imapx_name_hash (gconstpointer key)
 {
 	if (g_ascii_strcasecmp(key, "INBOX") == 0)
 		return g_str_hash("INBOX");
 	else
-		return g_str_hash(key);
+		return g_str_hash (key);
 }
 
 static gint
-imapx_name_equal(gconstpointer a, gconstpointer b)
+imapx_name_equal (gconstpointer a, gconstpointer b)
 {
 	gconstpointer aname = a, bname = b;
 
@@ -5411,24 +5411,24 @@ imapx_name_equal(gconstpointer a, gconstpointer b)
 		aname = "INBOX";
 	if (g_ascii_strcasecmp(b, "INBOX") == 0)
 		bname = "INBOX";
-	return g_str_equal(aname, bname);
+	return g_str_equal (aname, bname);
 }
 
 static void
-imapx_list_flatten(gpointer k, gpointer v, gpointer d)
+imapx_list_flatten (gpointer k, gpointer v, gpointer d)
 {
 	GPtrArray *folders = d;
 
-	g_ptr_array_add(folders, v);
+	g_ptr_array_add (folders, v);
 }
 
 static gint
-imapx_list_cmp(gconstpointer ap, gconstpointer bp)
+imapx_list_cmp (gconstpointer ap, gconstpointer bp)
 {
 	struct _list_info *a = ((struct _list_info **)ap)[0];
 	struct _list_info *b = ((struct _list_info **)bp)[0];
 
-	return strcmp(a->name, b->name);
+	return strcmp (a->name, b->name);
 }
 
 GPtrArray *
@@ -5444,14 +5444,14 @@ camel_imapx_server_list (CamelIMAPXServer *is,
 
 	encoded_name = camel_utf8_utf7 (top);
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_LIST;
 	job->start = imapx_job_list_start;
 	job->pri = IMAPX_PRIORITY_LIST;
 	job->u.list.ext = ext;
 	job->u.list.flags = flags;
-	job->u.list.folders = g_hash_table_new(imapx_name_hash, imapx_name_equal);
-	job->u.list.pattern = g_alloca(strlen(encoded_name)+5);
+	job->u.list.folders = g_hash_table_new (imapx_name_hash, imapx_name_equal);
+	job->u.list.pattern = g_alloca (strlen (encoded_name)+5);
 	if (flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)
 		sprintf(job->u.list.pattern, "%s*", encoded_name);
 	else
@@ -5462,14 +5462,14 @@ camel_imapx_server_list (CamelIMAPXServer *is,
 		job->pri += 300;
 
 	if (imapx_submit_job (is, job, error)) {
-		folders = g_ptr_array_new();
-		g_hash_table_foreach(job->u.list.folders, imapx_list_flatten, folders);
-		qsort(folders->pdata, folders->len, sizeof(folders->pdata[0]), imapx_list_cmp);
+		folders = g_ptr_array_new ();
+		g_hash_table_foreach (job->u.list.folders, imapx_list_flatten, folders);
+		qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), imapx_list_cmp);
 	}
 
-	g_hash_table_destroy(job->u.list.folders);
+	g_hash_table_destroy (job->u.list.folders);
 	g_free (encoded_name);
-	g_free(job);
+	g_free (job);
 
 	return folders;
 }
@@ -5480,7 +5480,7 @@ camel_imapx_server_manage_subscription (CamelIMAPXServer *is, const gchar *folde
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_MANAGE_SUBSCRIPTION;
 	job->start = imapx_job_manage_subscription_start;
 	job->pri = IMAPX_PRIORITY_MANAGE_SUBSCRIPTION;
@@ -5500,7 +5500,7 @@ camel_imapx_server_create_folder (CamelIMAPXServer *is, const gchar *folder_name
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_CREATE_FOLDER;
 	job->start = imapx_job_create_folder_start;
 	job->pri = IMAPX_PRIORITY_CREATE_FOLDER;
@@ -5519,7 +5519,7 @@ camel_imapx_server_delete_folder (CamelIMAPXServer *is, const gchar *folder_name
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_DELETE_FOLDER;
 	job->start = imapx_job_delete_folder_start;
 	job->pri = IMAPX_PRIORITY_DELETE_FOLDER;
@@ -5538,7 +5538,7 @@ camel_imapx_server_rename_folder (CamelIMAPXServer *is, const gchar *old_name, c
 	CamelIMAPXJob *job;
 	gboolean success;
 
-	job = g_malloc0(sizeof(*job));
+	job = g_malloc0 (sizeof (*job));
 	job->type = IMAPX_JOB_RENAME_FOLDER;
 	job->start = imapx_job_rename_folder_start;
 	job->pri = IMAPX_PRIORITY_RENAME_FOLDER;
@@ -5559,7 +5559,7 @@ camel_imapx_server_get_job_queue_info (CamelIMAPXServer *is)
 	CamelDListNode *node;
 	CamelIMAPXJob *job = NULL;
 
-	QUEUE_LOCK(is);
+	QUEUE_LOCK (is);
 
 	jinfo->queue_len = camel_dlist_length (&is->jobs);
 	jinfo->folders = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
@@ -5576,7 +5576,7 @@ camel_imapx_server_get_job_queue_info (CamelIMAPXServer *is)
 	if (is->select_folder)
 		g_hash_table_insert (jinfo->folders, g_strdup (camel_folder_get_full_name (is->select_folder)), GINT_TO_POINTER (1));
 
-	QUEUE_UNLOCK(is);
+	QUEUE_UNLOCK (is);
 
 	return jinfo;
 }
diff --git a/camel/providers/imapx/camel-imapx-server.h b/camel/providers/imapx/camel-imapx-server.h
index 6e4885d..611960d 100644
--- a/camel/providers/imapx/camel-imapx-server.h
+++ b/camel/providers/imapx/camel-imapx-server.h
@@ -185,13 +185,13 @@ gboolean	camel_imapx_server_manage_subscription
 						 const gchar *folder_name,
 						 gboolean subscribe,
 						 GError **error);
-gboolean	camel_imapx_server_create_folder(CamelIMAPXServer *is,
+gboolean	camel_imapx_server_create_folder (CamelIMAPXServer *is,
 						 const gchar *folder_name,
 						 GError **error);
-gboolean	camel_imapx_server_delete_folder(CamelIMAPXServer *is,
+gboolean	camel_imapx_server_delete_folder (CamelIMAPXServer *is,
 						 const gchar *folder_name,
 						 GError **error);
-gboolean	camel_imapx_server_rename_folder(CamelIMAPXServer *is,
+gboolean	camel_imapx_server_rename_folder (CamelIMAPXServer *is,
 						 const gchar *old_name,
 						 const gchar *new_name,
 						 GError **error);
diff --git a/camel/providers/imapx/camel-imapx-store-summary.c b/camel/providers/imapx/camel-imapx-store-summary.c
index 69def14..baa6903 100644
--- a/camel/providers/imapx/camel-imapx-store-summary.c
+++ b/camel/providers/imapx/camel-imapx-store-summary.c
@@ -39,16 +39,16 @@
 
 #define CAMEL_IMAPX_STORE_SUMMARY_VERSION (0)
 
-static gint summary_header_load(CamelStoreSummary *, FILE *);
-static gint summary_header_save(CamelStoreSummary *, FILE *);
+static gint summary_header_load (CamelStoreSummary *, FILE *);
+static gint summary_header_save (CamelStoreSummary *, FILE *);
 
 /*static CamelStoreInfo * store_info_new(CamelStoreSummary *, const gchar *);*/
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static gint		 store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void		 store_info_free(CamelStoreSummary *, CamelStoreInfo *);
+static CamelStoreInfo * store_info_load (CamelStoreSummary *, FILE *);
+static gint		 store_info_save (CamelStoreSummary *, FILE *, CamelStoreInfo *);
+static void		 store_info_free (CamelStoreSummary *, CamelStoreInfo *);
 
-static const gchar *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, gint);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
+static const gchar *store_info_string (CamelStoreSummary *, const CamelStoreInfo *, gint);
+static void store_info_set_string (CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
 
 G_DEFINE_TYPE (CamelIMAPXStoreSummary, camel_imapx_store_summary, CAMEL_TYPE_STORE_SUMMARY)
 
@@ -87,7 +87,7 @@ camel_imapx_store_summary_class_init (CamelIMAPXStoreSummaryClass *class)
 static void
 camel_imapx_store_summary_init (CamelIMAPXStoreSummary *s)
 {
-	((CamelStoreSummary *)s)->store_info_size = sizeof(CamelIMAPXStoreInfo);
+	((CamelStoreSummary *)s)->store_info_size = sizeof (CamelIMAPXStoreInfo);
 	s->version = CAMEL_IMAPX_STORE_SUMMARY_VERSION;
 }
 
@@ -119,18 +119,18 @@ camel_imapx_store_summary_new (void)
  * It must be freed using camel_store_summary_info_free().
  **/
 CamelIMAPXStoreInfo *
-camel_imapx_store_summary_full_name(CamelIMAPXStoreSummary *s, const gchar *full_name)
+camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s, const gchar *full_name)
 {
 	gint count, i;
 	CamelIMAPXStoreInfo *info;
 
-	count = camel_store_summary_count((CamelStoreSummary *)s);
+	count = camel_store_summary_count ((CamelStoreSummary *)s);
 	for (i=0;i<count;i++) {
-		info = (CamelIMAPXStoreInfo *)camel_store_summary_index((CamelStoreSummary *)s, i);
+		info = (CamelIMAPXStoreInfo *)camel_store_summary_index ((CamelStoreSummary *)s, i);
 		if (info) {
-			if (strcmp(info->full_name, full_name) == 0)
+			if (strcmp (info->full_name, full_name) == 0)
 				return info;
-			camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+			camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		}
 	}
 
@@ -138,11 +138,11 @@ camel_imapx_store_summary_full_name(CamelIMAPXStoreSummary *s, const gchar *full
 }
 
 gchar *
-camel_imapx_store_summary_full_to_path(CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
+camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	gchar *path, *p;
 
-	p = path = g_strdup(full_name);
+	p = path = g_strdup (full_name);
 
 	if (dir_sep != '/') {
 		while (*p) {
@@ -157,7 +157,7 @@ camel_imapx_store_summary_full_to_path(CamelIMAPXStoreSummary *s, const gchar *f
 }
 
 gchar *
-camel_imapx_store_summary_path_to_full(CamelIMAPXStoreSummary *s, const gchar *path, gchar dir_sep)
+camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s, const gchar *path, gchar dir_sep)
 {
 	gchar *full, *f;
 	const gchar *p;
@@ -166,34 +166,34 @@ camel_imapx_store_summary_path_to_full(CamelIMAPXStoreSummary *s, const gchar *p
 	CamelIMAPXStoreNamespace *ns;
 
 	/* check to see if we have a subpath of path already defined */
-	subpath = alloca(strlen(path)+1);
-	strcpy(subpath, path);
+	subpath = alloca (strlen (path)+1);
+	strcpy (subpath, path);
 	do {
-		si = camel_store_summary_path((CamelStoreSummary *)s, subpath);
+		si = camel_store_summary_path ((CamelStoreSummary *)s, subpath);
 		if (si == NULL) {
-			last = strrchr(subpath, '/');
+			last = strrchr (subpath, '/');
 			if (last)
 				*last = 0;
 		}
 	} while (si == NULL && last);
 
 	/* path is already present, use the raw version we have */
-	if (si && strlen(subpath) == strlen(path)) {
-		f = g_strdup(camel_imapx_store_info_full_name(s, si));
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+	if (si && strlen (subpath) == strlen (path)) {
+		f = g_strdup (camel_imapx_store_info_full_name (s, si));
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		return f;
 	}
 
-	ns = camel_imapx_store_summary_namespace_find_path(s, path);
+	ns = camel_imapx_store_summary_namespace_find_path (s, path);
 
 	if (si)
-		p = path + strlen(subpath);
+		p = path + strlen (subpath);
 	else if (ns)
-		p = path + strlen(ns->path);
+		p = path + strlen (ns->path);
 	else
 		p = path;
 
-	f = full = g_strdup(p);
+	f = full = g_strdup (p);
 	if (dir_sep != '/') {
 		while (*f) {
 			if (*f == '/')
@@ -208,12 +208,12 @@ camel_imapx_store_summary_path_to_full(CamelIMAPXStoreSummary *s, const gchar *p
 	f = full;
 	if (si) {
 		full = g_strdup_printf("%s%s", camel_imapx_store_info_full_name(s, si), f);
-		g_free(f);
-		camel_store_summary_info_free((CamelStoreSummary *)s, si);
+		g_free (f);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, si);
 		f = full;
 	} else if (ns) {
 		full = g_strdup_printf("%s%s", ns->full_name, f);
-		g_free(f);
+		g_free (f);
 		f = full;
 	}
 
@@ -221,7 +221,7 @@ camel_imapx_store_summary_path_to_full(CamelIMAPXStoreSummary *s, const gchar *p
 }
 
 CamelIMAPXStoreInfo *
-camel_imapx_store_summary_add_from_full(CamelIMAPXStoreSummary *s, const gchar *full, gchar dir_sep)
+camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s, const gchar *full, gchar dir_sep)
 {
 	CamelIMAPXStoreInfo *info;
 	gchar *pathu8, *prefix;
@@ -231,30 +231,30 @@ camel_imapx_store_summary_add_from_full(CamelIMAPXStoreSummary *s, const gchar *
 
 	d(printf("adding full name '%s' '%c'\n", full, dir_sep));
 
-	len = strlen(full);
-	full_name = alloca(len+1);
-	strcpy(full_name, full);
+	len = strlen (full);
+	full_name = alloca (len+1);
+	strcpy (full_name, full);
 	if (full_name[len-1] == dir_sep)
 		full_name[len-1] = 0;
 
-	info = camel_imapx_store_summary_full_name(s, full_name);
+	info = camel_imapx_store_summary_full_name (s, full_name);
 	if (info) {
-		camel_store_summary_info_free((CamelStoreSummary *)s, (CamelStoreInfo *)info);
+		camel_store_summary_info_free ((CamelStoreSummary *)s, (CamelStoreInfo *)info);
 		d(printf("  already there\n"));
 		return info;
 	}
 
-	ns = camel_imapx_store_summary_namespace_find_full(s, full_name);
+	ns = camel_imapx_store_summary_namespace_find_full (s, full_name);
 	if (ns) {
 		d(printf("(found namespace for '%s' ns '%s') ", full_name, ns->path));
-		len = strlen(ns->full_name);
-		if (len >= strlen(full_name)) {
-			pathu8 = g_strdup(ns->path);
+		len = strlen (ns->full_name);
+		if (len >= strlen (full_name)) {
+			pathu8 = g_strdup (ns->path);
 		} else {
 			if (full_name[len] == ns->sep)
 				len++;
 
-			prefix = camel_imapx_store_summary_full_to_path(s, full_name+len, ns->sep);
+			prefix = camel_imapx_store_summary_full_to_path (s, full_name+len, ns->sep);
 			if (*ns->path) {
 				pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
 				g_free (prefix);
@@ -265,13 +265,13 @@ camel_imapx_store_summary_add_from_full(CamelIMAPXStoreSummary *s, const gchar *
 		d(printf(" (pathu8 = '%s')", pathu8));
 	} else {
 		d(printf("(Cannot find namespace for '%s')\n", full_name));
-		pathu8 = camel_imapx_store_summary_full_to_path(s, full_name, dir_sep);
+		pathu8 = camel_imapx_store_summary_full_to_path (s, full_name, dir_sep);
 	}
 
-	info = (CamelIMAPXStoreInfo *)camel_store_summary_add_from_path((CamelStoreSummary *)s, pathu8);
+	info = (CamelIMAPXStoreInfo *)camel_store_summary_add_from_path ((CamelStoreSummary *)s, pathu8);
 	if (info) {
 		d(printf("  '%s' -> '%s'\n", pathu8, full_name));
-		camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAPX_STORE_INFO_FULL_NAME, full_name);
+		camel_store_info_set_string ((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_IMAPX_STORE_INFO_FULL_NAME, full_name);
 
 		if (!g_ascii_strcasecmp(full_name, "inbox"))
 			info->info.flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
@@ -287,14 +287,14 @@ camel_imapx_store_summary_add_from_full(CamelIMAPXStoreSummary *s, const gchar *
 /* should this be const? */
 /* TODO: deprecate/merge this function with path_to_full */
 gchar *
-camel_imapx_store_summary_full_from_path(CamelIMAPXStoreSummary *s, const gchar *path)
+camel_imapx_store_summary_full_from_path (CamelIMAPXStoreSummary *s, const gchar *path)
 {
 	CamelIMAPXStoreNamespace *ns;
 	gchar *name = NULL;
 
-	ns = camel_imapx_store_summary_namespace_find_path(s, path);
+	ns = camel_imapx_store_summary_namespace_find_path (s, path);
 	if (ns)
-		name = camel_imapx_store_summary_path_to_full(s, path, ns->sep);
+		name = camel_imapx_store_summary_path_to_full (s, path, ns->sep);
 
 	d(printf("looking up path %s -> %s\n", path, name?name:"not found"));
 
@@ -302,20 +302,20 @@ camel_imapx_store_summary_full_from_path(CamelIMAPXStoreSummary *s, const gchar
 }
 
 /* TODO: this api needs some more work */
-CamelIMAPXStoreNamespace *camel_imapx_store_summary_namespace_new(CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
+CamelIMAPXStoreNamespace *camel_imapx_store_summary_namespace_new (CamelIMAPXStoreSummary *s, const gchar *full_name, gchar dir_sep)
 {
 	CamelIMAPXStoreNamespace *ns;
 	gchar *p, *o, c;
 	gint len;
 
-	ns = g_malloc0(sizeof(*ns));
-	ns->full_name = g_strdup(full_name);
-	len = strlen(ns->full_name)-1;
+	ns = g_malloc0 (sizeof (*ns));
+	ns->full_name = g_strdup (full_name);
+	len = strlen (ns->full_name)-1;
 	if (len >= 0 && ns->full_name[len] == dir_sep)
 		ns->full_name[len] = 0;
 	ns->sep = dir_sep;
 
-	o = p = ns->path = camel_imapx_store_summary_full_to_path(s, ns->full_name, dir_sep);
+	o = p = ns->path = camel_imapx_store_summary_full_to_path (s, ns->full_name, dir_sep);
 	while ((c = *p++)) {
 		if (c != '#') {
 			if (c == '/')
@@ -328,16 +328,16 @@ CamelIMAPXStoreNamespace *camel_imapx_store_summary_namespace_new(CamelIMAPXStor
 	return ns;
 }
 
-void camel_imapx_store_summary_namespace_set(CamelIMAPXStoreSummary *s, CamelIMAPXStoreNamespace *ns)
+void camel_imapx_store_summary_namespace_set (CamelIMAPXStoreSummary *s, CamelIMAPXStoreNamespace *ns)
 {
 	d(printf("Setting namesapce to '%s' '%c' -> '%s'\n", ns->full_name, ns->sep, ns->path));
 
 	/* CHEN not needed  */
-	camel_store_summary_touch((CamelStoreSummary *)s);
+	camel_store_summary_touch ((CamelStoreSummary *)s);
 }
 
 CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_path(CamelIMAPXStoreSummary *s, const gchar *path)
+camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s, const gchar *path)
 {
 	gint len;
 	CamelIMAPXStoreNamespace *ns;
@@ -346,9 +346,9 @@ camel_imapx_store_summary_namespace_find_path(CamelIMAPXStoreSummary *s, const g
 	/* CHEN TODO */
 	ns = s->namespaces->personal;
 	while (ns) {
-		len = strlen(ns->path);
+		len = strlen (ns->path);
 		if (len == 0
-		    || (strncmp(ns->path, path, len) == 0
+		    || (strncmp (ns->path, path, len) == 0
 			&& (path[len] == '/' || path[len] == 0)))
 			break;
 		ns = NULL;
@@ -359,7 +359,7 @@ camel_imapx_store_summary_namespace_find_path(CamelIMAPXStoreSummary *s, const g
 }
 
 CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_full(CamelIMAPXStoreSummary *s, const gchar *full)
+camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s, const gchar *full)
 {
 	gint len = 0;
 	CamelIMAPXStoreNamespace *ns;
@@ -369,10 +369,10 @@ camel_imapx_store_summary_namespace_find_full(CamelIMAPXStoreSummary *s, const g
 	ns = s->namespaces->personal;
 	while (ns) {
 		if (ns->full_name)
-			len = strlen(ns->full_name);
+			len = strlen (ns->full_name);
 		d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
 		if (len == 0
-		    || (strncmp(ns->full_name, full, len) == 0
+		    || (strncmp (ns->full_name, full, len) == 0
 			&& (full[len] == ns->sep || full[len] == 0)))
 			break;
 		ns = NULL;
@@ -383,14 +383,14 @@ camel_imapx_store_summary_namespace_find_full(CamelIMAPXStoreSummary *s, const g
 }
 
 static CamelIMAPXNamespaceList *
-namespace_load(CamelStoreSummary *s, FILE *in)
+namespace_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelIMAPXStoreNamespace *ns, *tail;
 	CamelIMAPXNamespaceList *nsl;
 	guint32 i, j;
 	gint32 n;
 
-	nsl = g_malloc0(sizeof(CamelIMAPXNamespaceList));
+	nsl = g_malloc0 (sizeof (CamelIMAPXNamespaceList));
 	nsl->personal = NULL;
 	nsl->shared = NULL;
 	nsl->other = NULL;
@@ -447,7 +447,7 @@ exception:
 }
 
 static gint
-namespace_save(CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl)
+namespace_save (CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl)
 {
 	CamelIMAPXStoreNamespace *ns, *cur = NULL;
 	guint32 i, n;
@@ -490,7 +490,7 @@ namespace_save(CamelStoreSummary *s, FILE *out, CamelIMAPXNamespaceList *nsl)
 }
 
 static gint
-summary_header_load(CamelStoreSummary *s, FILE *in)
+summary_header_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelIMAPXStoreSummary *is = (CamelIMAPXStoreSummary *)s;
 	CamelStoreSummaryClass *store_summary_class;
@@ -499,8 +499,8 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 	camel_imapx_namespace_list_clear (is->namespaces);
 
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
-	if (store_summary_class->summary_header_load((CamelStoreSummary *)s, in) == -1
-	    || camel_file_util_decode_fixed_int32(in, &version) == -1)
+	if (store_summary_class->summary_header_load ((CamelStoreSummary *)s, in) == -1
+	    || camel_file_util_decode_fixed_int32 (in, &version) == -1)
 		return -1;
 
 	is->version = version;
@@ -511,48 +511,48 @@ summary_header_load(CamelStoreSummary *s, FILE *in)
 	}
 
 	/* note file format can be expanded to contain more namespaces, but only 1 at the moment */
-	if (camel_file_util_decode_fixed_int32(in, &capabilities) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, &capabilities) == -1)
 		return -1;
 
 	is->capabilities = capabilities;
 
 	/* namespaces */
-	if ((is->namespaces = namespace_load(s, in)) == NULL)
+	if ((is->namespaces = namespace_load (s, in)) == NULL)
 		return -1;
 
 	return 0;
 }
 
 static gint
-summary_header_save(CamelStoreSummary *s, FILE *out)
+summary_header_save (CamelStoreSummary *s, FILE *out)
 {
 	CamelIMAPXStoreSummary *is = (CamelIMAPXStoreSummary *)s;
 	CamelStoreSummaryClass *store_summary_class;
 
 	/* always write as latest version */
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
-	if (store_summary_class->summary_header_save((CamelStoreSummary *)s, out) == -1
-	    || camel_file_util_encode_fixed_int32(out, CAMEL_IMAPX_STORE_SUMMARY_VERSION) == -1
-	    || camel_file_util_encode_fixed_int32(out, is->capabilities) == -1)
+	if (store_summary_class->summary_header_save ((CamelStoreSummary *)s, out) == -1
+	    || camel_file_util_encode_fixed_int32 (out, CAMEL_IMAPX_STORE_SUMMARY_VERSION) == -1
+	    || camel_file_util_encode_fixed_int32 (out, is->capabilities) == -1)
 		return -1;
 
-	if (is->namespaces && namespace_save(s, out, is->namespaces) == -1)
+	if (is->namespaces && namespace_save (s, out, is->namespaces) == -1)
 		return -1;
 
 	return 0;
 }
 
 static CamelStoreInfo *
-store_info_load(CamelStoreSummary *s, FILE *in)
+store_info_load (CamelStoreSummary *s, FILE *in)
 {
 	CamelIMAPXStoreInfo *mi;
 	CamelStoreSummaryClass *store_summary_class;
 
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
-	mi = (CamelIMAPXStoreInfo *)store_summary_class->store_info_load(s, in);
+	mi = (CamelIMAPXStoreInfo *)store_summary_class->store_info_load (s, in);
 	if (mi) {
-		if (camel_file_util_decode_string(in, &mi->full_name) == -1) {
-			camel_store_summary_info_free(s, (CamelStoreInfo *)mi);
+		if (camel_file_util_decode_string (in, &mi->full_name) == -1) {
+			camel_store_summary_info_free (s, (CamelStoreInfo *)mi);
 			mi = NULL;
 		} else {
 			/* NB: this is done again for compatability */
@@ -565,33 +565,33 @@ store_info_load(CamelStoreSummary *s, FILE *in)
 }
 
 static gint
-store_info_save(CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
+store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
 {
 	CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *)mi;
 	CamelStoreSummaryClass *store_summary_class;
 
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
-	if (store_summary_class->store_info_save(s, out, mi) == -1
-	    || camel_file_util_encode_string(out, isi->full_name) == -1)
+	if (store_summary_class->store_info_save (s, out, mi) == -1
+	    || camel_file_util_encode_string (out, isi->full_name) == -1)
 		return -1;
 
 	return 0;
 }
 
 static void
-store_info_free(CamelStoreSummary *s, CamelStoreInfo *mi)
+store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
 {
 	CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *)mi;
 	CamelStoreSummaryClass *store_summary_class;
 
-	g_free(isi->full_name);
+	g_free (isi->full_name);
 
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
-	store_summary_class->store_info_free(s, mi);
+	store_summary_class->store_info_free (s, mi);
 }
 
 static const gchar *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 {
 	CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *)mi;
 	CamelStoreSummaryClass *store_summary_class;
@@ -606,17 +606,17 @@ store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 	case CAMEL_IMAPX_STORE_INFO_FULL_NAME:
 		return isi->full_name;
 	default:
-		return store_summary_class->store_info_string(s, mi, type);
+		return store_summary_class->store_info_string (s, mi, type);
 	}
 }
 
 static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
 {
 	CamelIMAPXStoreInfo *isi = (CamelIMAPXStoreInfo *)mi;
 	CamelStoreSummaryClass *store_summary_class;
 
-	g_assert(mi != NULL);
+	g_assert (mi != NULL);
 
 	store_summary_class = CAMEL_STORE_SUMMARY_CLASS (camel_imapx_store_summary_parent_class);
 
@@ -624,12 +624,12 @@ store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const
 	case CAMEL_IMAPX_STORE_INFO_FULL_NAME:
 		d(printf("Set full name %s -> %s\n", isi->full_name, str));
 		camel_store_summary_lock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
-		g_free(isi->full_name);
-		isi->full_name = g_strdup(str);
+		g_free (isi->full_name);
+		isi->full_name = g_strdup (str);
 		camel_store_summary_unlock (s, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
 		break;
 	default:
-		store_summary_class->store_info_set_string(s, mi, type, str);
+		store_summary_class->store_info_set_string (s, mi, type, str);
 		break;
 	}
 }
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index fa8e27f..0f2fd40 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -55,16 +55,16 @@
 G_DEFINE_TYPE (CamelIMAPXStore, camel_imapx_store, CAMEL_TYPE_OFFLINE_STORE)
 
 static guint
-imapx_name_hash(gconstpointer key)
+imapx_name_hash (gconstpointer key)
 {
 	if (g_ascii_strcasecmp(key, "INBOX") == 0)
 		return g_str_hash("INBOX");
 	else
-		return g_str_hash(key);
+		return g_str_hash (key);
 }
 
 static gint
-imapx_name_equal(gconstpointer a, gconstpointer b)
+imapx_name_equal (gconstpointer a, gconstpointer b)
 {
 	gconstpointer aname = a, bname = b;
 
@@ -72,7 +72,7 @@ imapx_name_equal(gconstpointer a, gconstpointer b)
 		aname = "INBOX";
 	if (g_ascii_strcasecmp(b, "INBOX") == 0)
 		bname = "INBOX";
-	return g_str_equal(aname, bname);
+	return g_str_equal (aname, bname);
 }
 
 static void
@@ -85,7 +85,7 @@ imapx_parse_receiving_options (CamelIMAPXStore *istore, CamelURL *url)
 
 	if (camel_url_get_param (url, "override_namespace") && camel_url_get_param (url, "namespace")) {
 		istore->rec_options |= IMAPX_OVERRIDE_NAMESPACE;
-		g_free(istore->namespace);
+		g_free (istore->namespace);
 		istore->namespace = g_strdup (camel_url_get_param (url, "namespace"));
 	}
 
@@ -127,7 +127,7 @@ imapx_store_finalize (GObject *object)
 	/* force disconnect so we dont have it run later, after we've cleaned up some stuff */
 	/* SIGH */
 
-	camel_service_disconnect((CamelService *)imapx_store, TRUE, NULL);
+	camel_service_disconnect ((CamelService *)imapx_store, TRUE, NULL);
 	if (imapx_store->con_man) {
 		g_object_unref (imapx_store->con_man);
 		imapx_store->con_man = NULL;
@@ -144,7 +144,7 @@ imapx_store_finalize (GObject *object)
 }
 
 static gboolean
-imapx_construct(CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error)
+imapx_construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error)
 {
 	gchar *summary;
 	CamelIMAPXStore *store = (CamelIMAPXStore *)service;
@@ -159,17 +159,17 @@ imapx_construct(CamelService *service, CamelSession *session, CamelProvider *pro
 								   CAMEL_URL_HIDE_AUTH));
 	imapx_parse_receiving_options (store, service->url);
 
-	store->summary = camel_imapx_store_summary_new();
-	store->storage_path = camel_session_get_storage_path(session, service, error);
+	store->summary = camel_imapx_store_summary_new ();
+	store->storage_path = camel_session_get_storage_path (session, service, error);
 
 	if (store->storage_path == NULL)
 		return FALSE;
 
 	summary = g_build_filename(store->storage_path, ".ev-store-summary", NULL);
-	camel_store_summary_set_filename((CamelStoreSummary *)store->summary, summary);
+	camel_store_summary_set_filename ((CamelStoreSummary *)store->summary, summary);
 	/* FIXME: need to remove params, passwords, etc */
-	camel_store_summary_set_uri_base((CamelStoreSummary *)store->summary, service->url);
-	camel_store_summary_load((CamelStoreSummary *)store->summary);
+	camel_store_summary_set_uri_base ((CamelStoreSummary *)store->summary, service->url);
+	camel_store_summary_load ((CamelStoreSummary *)store->summary);
 
 	g_free (summary);
 
@@ -197,7 +197,7 @@ imapx_query_auth_types (CamelService *service, GError **error)
 
 	camel_service_lock (service, CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	server = camel_imapx_server_new((CamelStore *)istore, service->url);
+	server = camel_imapx_server_new ((CamelStore *)istore, service->url);
 
 	connected = server->stream != NULL;
 	if (!connected)
@@ -260,9 +260,9 @@ imapx_connect (CamelService *service, GError **error)
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)service;
 	CamelIMAPXServer *server;
 
-	server = camel_imapx_store_get_server(istore, NULL, error);
+	server = camel_imapx_store_get_server (istore, NULL, error);
 	if (server) {
-		g_object_unref(server);
+		g_object_unref (server);
 		return TRUE;
 	}
 
@@ -291,7 +291,7 @@ imapx_disconnect (CamelService *service, gboolean clean, GError **error)
 }
 
 static CamelFolder *
-imapx_get_junk(CamelStore *store, GError **error)
+imapx_get_junk (CamelStore *store, GError **error)
 {
 	CamelFolder *folder;
 	CamelStoreClass *store_class;
@@ -304,7 +304,7 @@ imapx_get_junk(CamelStore *store, GError **error)
 		gchar *state = g_build_filename(((CamelIMAPXStore *)store)->storage_path, "system", "Junk.cmeta", NULL);
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -326,7 +326,7 @@ imapx_get_trash (CamelStore *store, GError **error)
 		gchar *state = g_build_filename(((CamelIMAPXStore *)store)->storage_path, "system", "Trash.cmeta", NULL);
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -341,7 +341,7 @@ imapx_noop (CamelStore *store, GError **error)
 	GSList *servers = NULL, *l;
 	gboolean success = FALSE;
 
-	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return TRUE;
 
 	servers = camel_imapx_conn_manager_get_connections (istore->con_man);
@@ -351,7 +351,7 @@ imapx_noop (CamelStore *store, GError **error)
 
 		/* we just return last noops value, technically not correct though */
 		success = camel_imapx_server_noop (server, NULL, error);
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	g_slist_free (servers);
@@ -388,7 +388,7 @@ get_folder_offline (CamelStore *store, const gchar *folder_name,
 	CamelFolder *new_folder = NULL;
 	CamelStoreInfo *si;
 
-	si = camel_store_summary_path((CamelStoreSummary *)imapx_store->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)imapx_store->summary, folder_name);
 	if (si) {
 		gchar *folder_dir, *storage_path;
 
@@ -404,12 +404,12 @@ get_folder_offline (CamelStore *store, const gchar *folder_name,
 
 		storage_path = g_strdup_printf("%s/folders", imapx_store->storage_path);
 		folder_dir = imapx_path_to_physical (storage_path, folder_name);
-		g_free(storage_path);
+		g_free (storage_path);
 		/* FIXME */
 		new_folder = camel_imapx_folder_new (store, folder_dir, folder_name, error);
 
-		g_free(folder_dir);
-		camel_store_summary_info_free((CamelStoreSummary *)imapx_store->summary, si);
+		g_free (folder_dir);
+		camel_store_summary_info_free ((CamelStoreSummary *)imapx_store->summary, si);
 	} else {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
@@ -425,7 +425,7 @@ imapx_get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GE
 {
 	CamelFolder *folder;
 
-	folder = get_folder_offline(store, folder_name, flags, NULL);
+	folder = get_folder_offline (store, folder_name, flags, NULL);
 	if (folder == NULL) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
@@ -446,7 +446,7 @@ imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
 	CamelFolderInfo *fi;
 
 	fi = camel_folder_info_new ();
-	fi->full_name = g_strdup(folder_name);
+	fi->full_name = g_strdup (folder_name);
 	fi->unread = -1;
 	fi->total = -1;
 
@@ -454,7 +454,7 @@ imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
 	g_free (url->path);
 	url->path = g_strdup_printf ("/%s", folder_name);
 	fi->uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
-	camel_url_free(url);
+	camel_url_free (url);
 	name = strrchr (fi->full_name, '/');
 	if (name == NULL)
 		name = fi->full_name;
@@ -478,11 +478,11 @@ imapx_build_folder_info (CamelIMAPXStore *imapx_store, const gchar *folder_name)
 }
 
 static void
-fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
+fill_fi (CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 {
 	CamelFolder *folder;
 
-	folder = camel_object_bag_peek(store->folders, fi->full_name);
+	folder = camel_object_bag_peek (store->folders, fi->full_name);
 	if (folder) {
 		CamelIMAPXSummary *ims;
 
@@ -503,18 +503,18 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 /* imap needs to treat inbox case insensitive */
 /* we'll assume the names are normalized already */
 static guint
-folder_hash(gconstpointer ap)
+folder_hash (gconstpointer ap)
 {
 	const gchar *a = ap;
 
 	if (g_ascii_strcasecmp(a, "INBOX") == 0)
 		a = "INBOX";
 
-	return g_str_hash(a);
+	return g_str_hash (a);
 }
 
 static gint
-folder_eq(gconstpointer ap, gconstpointer bp)
+folder_eq (gconstpointer ap, gconstpointer bp)
 {
 	const gchar *a = ap;
 	const gchar *b = bp;
@@ -524,11 +524,11 @@ folder_eq(gconstpointer ap, gconstpointer bp)
 	if (g_ascii_strcasecmp(b, "INBOX") == 0)
 		b = "INBOX";
 
-	return g_str_equal(a, b);
+	return g_str_equal (a, b);
 }
 
 static gboolean
-imapx_match_pattern(CamelIMAPXStoreNamespace *ns, const gchar *pattern, const gchar *name)
+imapx_match_pattern (CamelIMAPXStoreNamespace *ns, const gchar *pattern, const gchar *name)
 {
 	gchar p, n, dir_sep;
 
@@ -562,20 +562,20 @@ imapx_unmark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_nam
 {
 	CamelStoreInfo *si;
 
-	si = camel_store_summary_path((CamelStoreSummary *)istore->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, folder_name);
 	if (si) {
 		if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
 			si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-			camel_store_summary_touch((CamelStoreSummary *)istore->summary);
-			camel_store_summary_save((CamelStoreSummary *)istore->summary);
+			camel_store_summary_touch ((CamelStoreSummary *)istore->summary);
+			camel_store_summary_save ((CamelStoreSummary *)istore->summary);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
 	}
 
 	if (emit_signal) {
 		CamelFolderInfo *fi;
 
-		fi = imapx_build_folder_info(istore, folder_name);
+		fi = imapx_build_folder_info (istore, folder_name);
 		camel_store_folder_unsubscribed (CAMEL_STORE (istore), fi);
 		camel_folder_info_free (fi);
 	}
@@ -586,20 +586,20 @@ imapx_mark_folder_subscribed (CamelIMAPXStore *istore, const gchar *folder_name,
 {
 	CamelStoreInfo *si;
 
-	si = camel_store_summary_path((CamelStoreSummary *)istore->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, folder_name);
 	if (si) {
 		if ((si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) == 0) {
 			si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-			camel_store_summary_touch((CamelStoreSummary *)istore->summary);
-			camel_store_summary_save((CamelStoreSummary *)istore->summary);
+			camel_store_summary_touch ((CamelStoreSummary *)istore->summary);
+			camel_store_summary_save ((CamelStoreSummary *)istore->summary);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
 	}
 
 	if (emit_signal) {
 		CamelFolderInfo *fi;
 
-		fi = imapx_build_folder_info(istore, folder_name);
+		fi = imapx_build_folder_info (istore, folder_name);
 		camel_store_folder_subscribed (CAMEL_STORE (istore), fi);
 		camel_folder_info_free (fi);
 	}
@@ -612,7 +612,7 @@ imapx_subscribe_folder (CamelStore *store, const gchar *folder_name, gboolean em
 	CamelIMAPXServer *server;
 	gboolean success;
 
-	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return TRUE;
 
 	server = camel_imapx_store_get_server (istore, NULL, error);
@@ -620,7 +620,7 @@ imapx_subscribe_folder (CamelStore *store, const gchar *folder_name, gboolean em
 		return FALSE;
 
 	success = camel_imapx_server_manage_subscription (server, folder_name, TRUE, error);
-	g_object_unref(server);
+	g_object_unref (server);
 
 	if (success)
 		imapx_mark_folder_subscribed (istore, folder_name, emit_signal);
@@ -635,7 +635,7 @@ imapx_unsubscribe_folder (CamelStore *store, const gchar *folder_name, gboolean
 	CamelIMAPXServer *server;
 	gboolean success;
 
-	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return TRUE;
 
 	server = camel_imapx_store_get_server (istore, NULL, error);
@@ -643,7 +643,7 @@ imapx_unsubscribe_folder (CamelStore *store, const gchar *folder_name, gboolean
 		return FALSE;
 
 	success = camel_imapx_server_manage_subscription (server, folder_name, FALSE, error);
-	g_object_unref(server);
+	g_object_unref (server);
 
 	if (success)
 		imapx_unmark_folder_subscribed (istore, folder_name, emit_signal);
@@ -687,17 +687,17 @@ imapx_delete_folder_from_cache (CamelIMAPXStore *istore, const gchar *folder_nam
 	g_rmdir (folder_dir);
 
 	state_file = g_strdup_printf("%s/subfolders", folder_dir);
-	g_rmdir(state_file);
-	g_free(state_file);
+	g_rmdir (state_file);
+	g_free (state_file);
 
 	g_rmdir (folder_dir);
 	g_free (folder_dir);
 
  event:
-	camel_store_summary_remove_path((CamelStoreSummary *)istore->summary, folder_name);
-	camel_store_summary_save((CamelStoreSummary *)istore->summary);
+	camel_store_summary_remove_path ((CamelStoreSummary *)istore->summary, folder_name);
+	camel_store_summary_save ((CamelStoreSummary *)istore->summary);
 
-	fi = imapx_build_folder_info(istore, folder_name);
+	fi = imapx_build_folder_info (istore, folder_name);
 	camel_store_folder_deleted (CAMEL_STORE (istore), fi);
 	camel_folder_info_free (fi);
 }
@@ -723,7 +723,7 @@ imapx_delete_folder (CamelStore *store, const gchar *folder_name, GError **error
 		return FALSE;
 
 	success = camel_imapx_server_delete_folder (server, folder_name, error);
-	g_object_unref(server);
+	g_object_unref (server);
 
 	if (success)
 		imapx_delete_folder_from_cache (istore, folder_name);
@@ -736,31 +736,31 @@ rename_folder_info (CamelIMAPXStore *istore, const gchar *old_name, const gchar
 {
 	gint i, count;
 	CamelStoreInfo *si;
-	gint olen = strlen(old_name);
+	gint olen = strlen (old_name);
 	const gchar *path;
 	gchar *npath, *nfull;
 
-	count = camel_store_summary_count((CamelStoreSummary *)istore->summary);
+	count = camel_store_summary_count ((CamelStoreSummary *)istore->summary);
 	for (i=0;i<count;i++) {
-		si = camel_store_summary_index((CamelStoreSummary *)istore->summary, i);
+		si = camel_store_summary_index ((CamelStoreSummary *)istore->summary, i);
 		if (si == NULL)
 			continue;
-		path = camel_store_info_path(istore->summary, si);
-		if (strncmp(path, old_name, olen) == 0) {
-			if (strlen(path) > olen)
+		path = camel_store_info_path (istore->summary, si);
+		if (strncmp (path, old_name, olen) == 0) {
+			if (strlen (path) > olen)
 				npath = g_strdup_printf("%s/%s", new_name, path+olen+1);
 			else
-				npath = g_strdup(new_name);
-			nfull = camel_imapx_store_summary_path_to_full(istore->summary, npath, istore->dir_sep);
+				npath = g_strdup (new_name);
+			nfull = camel_imapx_store_summary_path_to_full (istore->summary, npath, istore->dir_sep);
 
-			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_STORE_INFO_PATH, npath);
-			camel_store_info_set_string((CamelStoreSummary *)istore->summary, si, CAMEL_IMAPX_STORE_INFO_FULL_NAME, nfull);
+			camel_store_info_set_string ((CamelStoreSummary *)istore->summary, si, CAMEL_STORE_INFO_PATH, npath);
+			camel_store_info_set_string ((CamelStoreSummary *)istore->summary, si, CAMEL_IMAPX_STORE_INFO_FULL_NAME, nfull);
 
-			camel_store_summary_touch((CamelStoreSummary *)istore->summary);
-			g_free(nfull);
-			g_free(npath);
+			camel_store_summary_touch ((CamelStoreSummary *)istore->summary);
+			g_free (nfull);
+			g_free (npath);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
 	}
 }
 
@@ -788,7 +788,7 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, GErr
 	server = camel_imapx_store_get_server(istore, "INBOX", error);
 	if (server) {
 		success = camel_imapx_server_rename_folder (server, old, new, error);
-		g_object_unref(server);
+		g_object_unref (server);
 	}
 
 	if (!success) {
@@ -797,7 +797,7 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, GErr
 	}
 
 	/* rename summary, and handle broken server */
-	rename_folder_info(istore, old, new);
+	rename_folder_info (istore, old, new);
 
 	if (istore->rec_options & IMAPX_SUBSCRIPTIONS)
 		success = imapx_subscribe_folder (store, new, FALSE, error);
@@ -805,7 +805,7 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, GErr
 	storage_path = g_strdup_printf("%s/folders", istore->storage_path);
 	oldpath = imapx_path_to_physical (storage_path, old);
 	newpath = imapx_path_to_physical (storage_path, new);
-	g_free(storage_path);
+	g_free (storage_path);
 
 	/* So do we care if this didn't work?  Its just a cache? */
 	if (g_rename (oldpath, newpath) == -1) {
@@ -839,7 +839,7 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 		return NULL;
 	}
 
-	server = camel_imapx_store_get_server(istore, NULL, error);
+	server = camel_imapx_store_get_server (istore, NULL, error);
 	if (!server)
 		return NULL;
 
@@ -852,23 +852,23 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 	else
 		dir_sep = '/';
 
-	if (strchr(folder_name, dir_sep)) {
+	if (strchr (folder_name, dir_sep)) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
 			CAMEL_FOLDER_ERROR_INVALID_PATH,
 			_("The folder name \"%s\" is invalid because it contains the character \"%c\""),
 			folder_name, dir_sep);
-		g_object_unref(server);
+		g_object_unref (server);
 		return NULL;
 	}
 
-	parent_real = camel_imapx_store_summary_full_from_path(istore->summary, parent_name);
+	parent_real = camel_imapx_store_summary_full_from_path (istore->summary, parent_name);
 	if (parent_real == NULL) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
 			CAMEL_FOLDER_ERROR_INVALID_STATE,
 			_("Unknown parent folder: %s"), parent_name);
-		g_object_unref(server);
+		g_object_unref (server);
 		return NULL;
 	}
 
@@ -878,7 +878,7 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 			error, CAMEL_FOLDER_ERROR,
 			CAMEL_FOLDER_ERROR_INVALID_STATE,
 			_("The parent folder is not allowed to contain subfolders"));
-		g_object_unref(server);
+		g_object_unref (server);
 		return NULL;
 	}
 
@@ -887,23 +887,23 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 
 	real_name = camel_imapx_store_summary_path_to_full (istore->summary, folder_name, dir_sep);
 	full_name = imapx_concat (istore, parent_real, real_name);
-	g_free(real_name);
+	g_free (real_name);
 
 	success = camel_imapx_server_create_folder (server, full_name, error);
-	g_object_unref(server);
+	g_object_unref (server);
 
 	if (success) {
 		CamelIMAPXStoreInfo *si;
 
-		si = camel_imapx_store_summary_add_from_full(istore->summary, full_name, dir_sep);
-		camel_store_summary_save((CamelStoreSummary *)istore->summary);
-		fi = imapx_build_folder_info(istore, camel_store_info_path(istore->summary, si));
+		si = camel_imapx_store_summary_add_from_full (istore->summary, full_name, dir_sep);
+		camel_store_summary_save ((CamelStoreSummary *)istore->summary);
+		fi = imapx_build_folder_info (istore, camel_store_info_path (istore->summary, si));
 		fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 		camel_store_folder_created (store, fi);
 	}
 
 	g_free (full_name);
-	g_free(parent_real);
+	g_free (parent_real);
 
 	return fi;
 }
@@ -931,14 +931,14 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 	/* get starting point */
 	if (top[0] == 0) {
 		if (imapx_store->namespace && imapx_store->namespace[0]) {
-			name = g_strdup(imapx_store->summary->namespaces->personal->full_name);
+			name = g_strdup (imapx_store->summary->namespaces->personal->full_name);
 			top = imapx_store->summary->namespaces->personal->path;
 		} else
 			name = g_strdup("");
 	} else {
-		name = camel_imapx_store_summary_full_from_path(imapx_store->summary, top);
+		name = camel_imapx_store_summary_full_from_path (imapx_store->summary, top);
 		if (name == NULL)
-			name = camel_imapx_store_summary_path_to_full(imapx_store->summary, top, imapx_store->dir_sep);
+			name = camel_imapx_store_summary_path_to_full (imapx_store->summary, top, imapx_store->dir_sep);
 	}
 
 	pattern = imapx_concat(imapx_store, name, "*");
@@ -948,8 +948,8 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 	 * the moment. So let it do the right thing by bailing out if it's
 	 * not a folder we're explicitly interested in. */
 
-	for (i=0;i<camel_store_summary_count((CamelStoreSummary *)imapx_store->summary);i++) {
-		CamelStoreInfo *si = camel_store_summary_index((CamelStoreSummary *)imapx_store->summary, i);
+	for (i=0;i<camel_store_summary_count ((CamelStoreSummary *)imapx_store->summary);i++) {
+		CamelStoreInfo *si = camel_store_summary_index ((CamelStoreSummary *)imapx_store->summary, i);
 		const gchar *full_name;
 		CamelIMAPXStoreNamespace *ns;
 
@@ -973,7 +973,7 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 			|| (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)
 			|| (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIPTION_LIST) != 0)) {
 
-			fi = imapx_build_folder_info(imapx_store, camel_store_info_path((CamelStoreSummary *)imapx_store->summary, si));
+			fi = imapx_build_folder_info (imapx_store, camel_store_info_path ((CamelStoreSummary *)imapx_store->summary, si));
 			fi->unread = si->unread;
 			fi->total = si->total;
 			fi->flags = si->flags;
@@ -990,26 +990,26 @@ get_folder_info_offline (CamelStore *store, const gchar *top,
 			}
 
 			if (si->flags & CAMEL_FOLDER_NOSELECT) {
-				CamelURL *url = camel_url_new(fi->uri, NULL);
+				CamelURL *url = camel_url_new (fi->uri, NULL);
 
 				camel_url_set_param (url, "noselect", "yes");
-				g_free(fi->uri);
+				g_free (fi->uri);
 				fi->uri = camel_url_to_string (url, 0);
 				camel_url_free (url);
 			} else {
-				fill_fi((CamelStore *)imapx_store, fi, 0);
+				fill_fi ((CamelStore *)imapx_store, fi, 0);
 			}
 			if (!fi->child)
 				fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 			g_ptr_array_add (folders, fi);
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)imapx_store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)imapx_store->summary, si);
 	}
-	g_free(pattern);
+	g_free (pattern);
 
 	fi = camel_folder_info_build (folders, top, '/', TRUE);
 	g_ptr_array_free (folders, TRUE);
-	g_free(name);
+	g_free (name);
 
 	return fi;
 }
@@ -1033,13 +1033,13 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
 			if (sfi)
 				sfi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
 
-			g_free(path);
+			g_free (path);
 			continue;
 		}
 
 		si = camel_imapx_store_summary_add_from_full (istore->summary, li->name, li->separator);
 		if (!si) {
-			g_object_unref(server);
+			g_object_unref (server);
 			continue;
 		}
 
@@ -1055,12 +1055,12 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
 		}
 
 		fi = camel_folder_info_new ();
-		fi->full_name = g_strdup(camel_store_info_path(istore->summary, si));
+		fi->full_name = g_strdup (camel_store_info_path (istore->summary, si));
 		if (!g_ascii_strcasecmp(fi->full_name, "inbox")) {
 			li->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_TYPE_INBOX;
 			fi->name = g_strdup (_("Inbox"));
 		} else
-			fi->name = g_strdup(camel_store_info_name(istore->summary, si));
+			fi->name = g_strdup (camel_store_info_name (istore->summary, si));
 
 		/* HACK: some servers report noinferiors for all folders (uw-imapd)
 		   We just translate this into nochildren, and let the imap layer enforce
@@ -1070,9 +1070,9 @@ add_folders_to_summary (CamelIMAPXStore *istore, CamelIMAPXServer *server, GPtrA
 		fi->flags = li->flags;
 
 		url = camel_url_new (istore->base_url, NULL);
-		path = alloca(strlen(fi->full_name)+2);
+		path = alloca (strlen (fi->full_name)+2);
 		sprintf(path, "/%s", fi->full_name);
-		camel_url_set_path(url, path);
+		camel_url_set_path (url, path);
 
 		if (li->flags & CAMEL_FOLDER_NOSELECT || fi->name[0] == 0)
 			camel_url_set_param (url, "noselect", "yes");
@@ -1094,9 +1094,9 @@ free_list (gpointer data, gpointer user_data)
 }
 
 static void
-imapx_get_folders_free(gpointer k, gpointer v, gpointer d)
+imapx_get_folders_free (gpointer k, gpointer v, gpointer d)
 {
-	camel_folder_info_free(v);
+	camel_folder_info_free (v);
 }
 
 static gboolean
@@ -1200,11 +1200,11 @@ fetch_folders_for_namespaces (CamelIMAPXStore *istore, const gchar *pattern, gbo
 		}
 	}
  out:
-	g_object_unref(server);
+	g_object_unref (server);
 	return folders;
 
 exception:
-	g_object_unref(server);
+	g_object_unref (server);
 	g_hash_table_destroy (folders);
 	return NULL;
 }
@@ -1236,10 +1236,10 @@ sync_folders (CamelIMAPXStore *istore, const gchar *pattern, gboolean sync, GErr
 		}
 
 		if (!pattern || !*pattern || imapx_match_pattern (camel_imapx_store_summary_namespace_find_full (istore->summary, full_name), pattern, full_name)) {
-			if ((fi = g_hash_table_lookup(folders_from_server, camel_store_info_path(istore->summary, si))) != NULL) {
+			if ((fi = g_hash_table_lookup (folders_from_server, camel_store_info_path (istore->summary, si))) != NULL) {
 				if (((fi->flags ^ si->flags) & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)) {
 					si->flags = (si->flags & ~CAMEL_FOLDER_SUBSCRIBED) | (fi->flags & CAMEL_FOLDER_SUBSCRIBED);
-					camel_store_summary_touch((CamelStoreSummary *)istore->summary);
+					camel_store_summary_touch ((CamelStoreSummary *)istore->summary);
 
 					camel_store_folder_created (CAMEL_STORE (istore), fi);
 					camel_store_folder_subscribed (CAMEL_STORE (istore), fi);
@@ -1259,7 +1259,7 @@ sync_folders (CamelIMAPXStore *istore, const gchar *pattern, gboolean sync, GErr
 				i--;
 			}
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
 	}
 
 	g_hash_table_foreach (folders_from_server, imapx_get_folders_free, NULL);
@@ -1281,10 +1281,10 @@ imapx_refresh_finfo (CamelSession *session, CamelSessionThreadMsg *msg)
 	struct _imapx_refresh_msg *m = (struct _imapx_refresh_msg *)msg;
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)m->store;
 
-	if (CAMEL_OFFLINE_STORE(istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
+	if (CAMEL_OFFLINE_STORE (istore)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
 		return;
 
-	if (!camel_service_connect((CamelService *)istore, &m->error))
+	if (!camel_service_connect ((CamelService *)istore, &m->error))
 		return;
 
 	/* look in all namespaces */
@@ -1293,7 +1293,7 @@ imapx_refresh_finfo (CamelSession *session, CamelSessionThreadMsg *msg)
 }
 
 static void
-imapx_refresh_free(CamelSession *session, CamelSessionThreadMsg *msg)
+imapx_refresh_free (CamelSession *session, CamelSessionThreadMsg *msg)
 {
 	struct _imapx_refresh_msg *m = (struct _imapx_refresh_msg *)msg;
 
@@ -1318,12 +1318,12 @@ discover_inbox (CamelStore *store)
 			sync_folders (istore, "INBOX", TRUE, NULL);
 
 		if (si)
-			camel_store_summary_info_free((CamelStoreSummary *) istore->summary, si);
+			camel_store_summary_info_free ((CamelStoreSummary *) istore->summary, si);
 	}
 }
 
 static CamelFolderInfo *
-imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **error)
+imapx_get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error)
 {
 	CamelIMAPXStore *istore = (CamelIMAPXStore *)store;
 	CamelFolderInfo * fi= NULL;
@@ -1335,7 +1335,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError
 
 	g_mutex_lock (istore->get_finfo_lock);
 
-	if (CAMEL_OFFLINE_STORE(store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
+	if (CAMEL_OFFLINE_STORE (store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		fi = get_folder_info_offline (store, top, flags, error);
 
 		g_mutex_unlock (istore->get_finfo_lock);
@@ -1352,9 +1352,9 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError
 			struct _imapx_refresh_msg *m;
 
 			istore->last_refresh_time = time (NULL);
-			m = camel_session_thread_msg_new(((CamelService *)store)->session, &imapx_refresh_ops, sizeof(*m));
+			m = camel_session_thread_msg_new (((CamelService *)store)->session, &imapx_refresh_ops, sizeof (*m));
 			m->store = g_object_ref (store);
-			camel_session_thread_queue(((CamelService *)store)->session, &m->msg, 0);
+			camel_session_thread_queue (((CamelService *)store)->session, &m->msg, 0);
 		}
 
 		fi = get_folder_info_offline (store, top, flags, error);
@@ -1362,7 +1362,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError
 		return fi;
 	}
 
-	if (!camel_service_connect((CamelService *)store, error)) {
+	if (!camel_service_connect ((CamelService *)store, error)) {
 		g_mutex_unlock (istore->get_finfo_lock);
 		return NULL;
 	}
@@ -1377,14 +1377,14 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError
 		gchar *name;
 		gint i;
 
-		name = camel_imapx_store_summary_full_from_path(istore->summary, top);
+		name = camel_imapx_store_summary_full_from_path (istore->summary, top);
 		if (name == NULL)
-			name = camel_imapx_store_summary_path_to_full(istore->summary, top, istore->dir_sep);
+			name = camel_imapx_store_summary_path_to_full (istore->summary, top, istore->dir_sep);
 
-		i = strlen(name);
-		pattern = g_alloca(i+5);
-		strcpy(pattern, name);
-		g_free(name);
+		i = strlen (name);
+		pattern = g_alloca (i+5);
+		strcpy (pattern, name);
+		g_free (name);
 	} else {
 		pattern = g_alloca (1);
 		pattern[0] = '\0';
@@ -1395,7 +1395,7 @@ imapx_get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError
 		return NULL;
 	}
 
-	camel_store_summary_save((CamelStoreSummary *) istore->summary);
+	camel_store_summary_save ((CamelStoreSummary *) istore->summary);
 
 	/* ensure the INBOX is subscribed if lsub was preferred*/
 	if (initial_setup && istore->rec_options & IMAPX_SUBSCRIPTIONS)
@@ -1448,17 +1448,17 @@ imapx_folder_is_subscribed (CamelStore *store,
 	CamelStoreInfo *si;
 	gint is_subscribed = FALSE;
 
-	si = camel_store_summary_path((CamelStoreSummary *)istore->summary, folder_name);
+	si = camel_store_summary_path ((CamelStoreSummary *)istore->summary, folder_name);
 	if (si) {
 		is_subscribed = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
-		camel_store_summary_info_free((CamelStoreSummary *)istore->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)istore->summary, si);
 	}
 
 	return is_subscribed;
 }
 
 static void
-camel_imapx_store_class_init(CamelIMAPXStoreClass *class)
+camel_imapx_store_class_init (CamelIMAPXStoreClass *class)
 {
 	GObjectClass *object_class;
 	CamelServiceClass *service_class;
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c
index 5f9a235..74300dc 100644
--- a/camel/providers/imapx/camel-imapx-stream.c
+++ b/camel/providers/imapx/camel-imapx-stream.c
@@ -47,7 +47,7 @@ imapx_stream_fill (CamelIMAPXStream *is,
 
 	if (is->source) {
 		left = is->end - is->ptr;
-		memcpy(is->buf, is->ptr, left);
+		memcpy (is->buf, is->ptr, left);
 		is->end = is->buf + left;
 		is->ptr = is->buf;
 		left = camel_stream_read (
@@ -64,7 +64,7 @@ imapx_stream_fill (CamelIMAPXStream *is,
 			   if we *know* there are data to receive. So set the error
 			   accordingly */
 			if (!left)
-				g_set_error(error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
+				g_set_error (error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 					    _("Source stream returned no data"));
 			return -1;
 		}
@@ -118,12 +118,12 @@ imapx_stream_read (CamelStream *stream,
 
 	max = is->end - is->ptr;
 	if (max > 0) {
-		max = MIN(max, is->literal);
-		max = MIN(max, n);
-		memcpy(buffer, is->ptr, max);
+		max = MIN (max, is->literal);
+		max = MIN (max, n);
+		memcpy (buffer, is->ptr, max);
 		is->ptr += max;
 	} else {
-		max = MIN(is->literal, n);
+		max = MIN (is->literal, n);
 		max = camel_stream_read (is->source, buffer, max, error);
 		if (max <= 0)
 			return max;
@@ -244,7 +244,7 @@ static void camel_imapx_stream_grow (CamelIMAPXStream *is, guint len, guchar **b
  * Returns: the stream
  **/
 CamelStream *
-camel_imapx_stream_new(CamelStream *source)
+camel_imapx_stream_new (CamelStream *source)
 {
 	CamelIMAPXStream *is;
 
@@ -269,7 +269,7 @@ camel_imapx_error_quark (void)
 
 /* Returns if there is any data buffered that is ready for processing */
 gint
-camel_imapx_stream_buffered(CamelIMAPXStream *is)
+camel_imapx_stream_buffered (CamelIMAPXStream *is)
 {
 	return is->end - is->ptr;
 }
@@ -277,7 +277,7 @@ camel_imapx_stream_buffered(CamelIMAPXStream *is)
 #if 0
 
 static gint
-skip_ws(CamelIMAPXStream *is, guchar *pp, guchar *pe)
+skip_ws (CamelIMAPXStream *is, guchar *pp, guchar *pe)
 {
 	register guchar c, *p;
 	guchar *e;
@@ -288,7 +288,7 @@ skip_ws(CamelIMAPXStream *is, guchar *pp, guchar *pe)
 	do {
 		while (p >= e ) {
 			is->ptr = p;
-			if (imapx_stream_fill(is, NULL) == IMAPX_TOK_ERROR)
+			if (imapx_stream_fill (is, NULL) == IMAPX_TOK_ERROR)
 				return IMAPX_TOK_ERROR;
 			p = is->ptr;
 			e = is->end;
@@ -306,12 +306,12 @@ skip_ws(CamelIMAPXStream *is, guchar *pp, guchar *pe)
 /* FIXME: these should probably handle it themselves,
    and get rid of the token interface? */
 gint
-camel_imapx_stream_atom(CamelIMAPXStream *is, guchar **data, guint *lenp, GError **error)
+camel_imapx_stream_atom (CamelIMAPXStream *is, guchar **data, guint *lenp, GError **error)
 {
 	guchar *p, c;
 
 	/* this is only 'approximate' atom */
-	switch (camel_imapx_stream_token(is, data, lenp, NULL)) {
+	switch (camel_imapx_stream_token (is, data, lenp, NULL)) {
 	case IMAPX_TOK_TOKEN:
 		p = *data;
 		while ((c = *p))
@@ -329,27 +329,27 @@ camel_imapx_stream_atom(CamelIMAPXStream *is, guchar **data, guint *lenp, GError
 
 /* gets an atom, a quoted_string, or a literal */
 gint
-camel_imapx_stream_astring(CamelIMAPXStream *is, guchar **data, GError **error)
+camel_imapx_stream_astring (CamelIMAPXStream *is, guchar **data, GError **error)
 {
 	guchar *p, *start;
 	guint len, inlen;
 	gint ret;
 
-	switch (camel_imapx_stream_token(is, data, &len, NULL)) {
+	switch (camel_imapx_stream_token (is, data, &len, NULL)) {
 	case IMAPX_TOK_TOKEN:
 	case IMAPX_TOK_INT:
 	case IMAPX_TOK_STRING:
 		return 0;
 	case IMAPX_TOK_LITERAL:
 		if (len >= is->bufsize)
-			camel_imapx_stream_grow(is, len, NULL, NULL);
+			camel_imapx_stream_grow (is, len, NULL, NULL);
 		p = is->tokenbuf;
-		camel_imapx_stream_set_literal(is, len);
+		camel_imapx_stream_set_literal (is, len);
 		do {
-			ret = camel_imapx_stream_getl(is, &start, &inlen);
+			ret = camel_imapx_stream_getl (is, &start, &inlen);
 			if (ret < 0)
 				return ret;
-			memcpy(p, start, inlen);
+			memcpy (p, start, inlen);
 			p += inlen;
 		} while (ret > 0);
 		*p = 0;
@@ -367,25 +367,25 @@ camel_imapx_stream_astring(CamelIMAPXStream *is, guchar **data, GError **error)
 
 /* check for NIL or (small) quoted_string or literal */
 gint
-camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, GError **error)
+camel_imapx_stream_nstring (CamelIMAPXStream *is, guchar **data, GError **error)
 {
 	guchar *p, *start;
 	guint len, inlen;
 	gint ret;
 
-	switch (camel_imapx_stream_token(is, data, &len, NULL)) {
+	switch (camel_imapx_stream_token (is, data, &len, NULL)) {
 	case IMAPX_TOK_STRING:
 		return 0;
 	case IMAPX_TOK_LITERAL:
 		if (len >= is->bufsize)
-			camel_imapx_stream_grow(is, len, NULL, NULL);
+			camel_imapx_stream_grow (is, len, NULL, NULL);
 		p = is->tokenbuf;
-		camel_imapx_stream_set_literal(is, len);
+		camel_imapx_stream_set_literal (is, len);
 		do {
-			ret = camel_imapx_stream_getl(is, &start, &inlen);
+			ret = camel_imapx_stream_getl (is, &start, &inlen);
 			if (ret < 0)
 				return ret;
-			memcpy(p, start, inlen);
+			memcpy (p, start, inlen);
 			p += inlen;
 		} while (ret > 0);
 		*p = 0;
@@ -393,7 +393,7 @@ camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, GError **error)
 		return 0;
 	case IMAPX_TOK_TOKEN:
 		p = *data;
-		if (toupper(p[0]) == 'N' && toupper(p[1]) == 'I' && toupper(p[2]) == 'L' && p[3] == 0) {
+		if (toupper (p[0]) == 'N' && toupper (p[1]) == 'I' && toupper (p[2]) == 'L' && p[3] == 0) {
 			*data = NULL;
 			return 0;
 		}
@@ -409,7 +409,7 @@ camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, GError **error)
 
 /* parse an nstring as a stream */
 gint
-camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, GError **error)
+camel_imapx_stream_nstring_stream (CamelIMAPXStream *is, CamelStream **stream, GError **error)
 /* throws IO,PARSE exception */
 {
 	guchar *token;
@@ -419,25 +419,25 @@ camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, GE
 
 	*stream = NULL;
 
-	switch (camel_imapx_stream_token(is, &token, &len, NULL)) {
+	switch (camel_imapx_stream_token (is, &token, &len, NULL)) {
 		case IMAPX_TOK_STRING:
-			mem = camel_stream_mem_new_with_buffer((gchar *)token, len);
+			mem = camel_stream_mem_new_with_buffer ((gchar *)token, len);
 			*stream = mem;
 			break;
 		case IMAPX_TOK_LITERAL:
 			/* if len is big, we could automatically use a file backing */
-			camel_imapx_stream_set_literal(is, len);
-			mem = camel_stream_mem_new();
-			if (camel_stream_write_to_stream((CamelStream *)is, mem, error) == -1) {
+			camel_imapx_stream_set_literal (is, len);
+			mem = camel_stream_mem_new ();
+			if (camel_stream_write_to_stream ((CamelStream *)is, mem, error) == -1) {
 				g_object_unref (mem);
 				ret = -1;
 				break;
 			}
-			camel_stream_reset(mem, NULL);
+			camel_stream_reset (mem, NULL);
 			*stream = mem;
 			break;
 		case IMAPX_TOK_TOKEN:
-			if (toupper(token[0]) == 'N' && toupper(token[1]) == 'I' && toupper(token[2]) == 'L' && token[3] == 0) {
+			if (toupper (token[0]) == 'N' && toupper (token[1]) == 'I' && toupper (token[2]) == 'L' && token[3] == 0) {
 				*stream = NULL;
 				break;
 			}
@@ -450,23 +450,23 @@ camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, GE
 }
 
 guint64
-camel_imapx_stream_number(CamelIMAPXStream *is, GError **error)
+camel_imapx_stream_number (CamelIMAPXStream *is, GError **error)
 {
 	guchar *token;
 	guint len;
 
-	if (camel_imapx_stream_token(is, &token, &len, NULL) != IMAPX_TOK_INT) {
+	if (camel_imapx_stream_token (is, &token, &len, NULL) != IMAPX_TOK_INT) {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "expecting number");
 		return 0;
 	}
 
-	return strtoull((gchar *)token, 0, 10);
+	return strtoull ((gchar *)token, 0, 10);
 }
 
 gint
-camel_imapx_stream_text(CamelIMAPXStream *is, guchar **text, GError **error)
+camel_imapx_stream_text (CamelIMAPXStream *is, guchar **text, GError **error)
 {
-	GByteArray *build = g_byte_array_new();
+	GByteArray *build = g_byte_array_new ();
 	guchar *token;
 	guint len;
 	gint tok;
@@ -476,7 +476,7 @@ camel_imapx_stream_text(CamelIMAPXStream *is, guchar **text, GError **error)
 			case IMAPX_TOK_TOKEN:
 			case IMAPX_TOK_STRING:
 			case IMAPX_TOK_INT:
-				g_byte_array_append(build, (guint8 *) is->unget_token, is->unget_len);
+				g_byte_array_append (build, (guint8 *) is->unget_token, is->unget_len);
 				g_byte_array_append(build, (guint8 *) " ", 1);
 			default: /* invalid, but we'll ignore */
 				break;
@@ -485,20 +485,20 @@ camel_imapx_stream_text(CamelIMAPXStream *is, guchar **text, GError **error)
 	}
 
 	do {
-		tok = camel_imapx_stream_gets(is, &token, &len);
+		tok = camel_imapx_stream_gets (is, &token, &len);
 		if (tok < 0) {
 			g_set_error (error, CAMEL_IMAPX_ERROR, 1, "io error: %s", strerror(errno));
 			*text = NULL;
-			g_byte_array_free(build, TRUE);
+			g_byte_array_free (build, TRUE);
 			return -1;
 		}
 		if (len)
-			g_byte_array_append(build, token, len);
+			g_byte_array_append (build, token, len);
 	} while (tok > 0);
 
 	g_byte_array_append(build, (guint8 *) "", 1);
 	*text = build->data;
-	g_byte_array_free(build, FALSE);
+	g_byte_array_free (build, FALSE);
 
 	return 0;
 }
@@ -506,7 +506,7 @@ camel_imapx_stream_text(CamelIMAPXStream *is, guchar **text, GError **error)
 /* Get one token from the imap stream */
 camel_imapx_token_t
 /* throws IO,PARSE exception */
-camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError **error)
+camel_imapx_stream_token (CamelIMAPXStream *is, guchar **data, guint *len, GError **error)
 {
 	register guchar c, *oe;
 	guchar *o, *p, *e;
@@ -540,7 +540,7 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 	} while (c == ' ' || c == '\r');
 
 	/*strchr("\n*()[]+", c)*/
-	if (imapx_is_token_char(c)) {
+	if (imapx_is_token_char (c)) {
 		is->ptr = p;
 		t(printf("token '%c'\n", c));
 		return c;
@@ -550,7 +550,7 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 		while (1) {
 			while (p < e) {
 				c = *p++;
-				if (isdigit(c) && literal < (UINT_MAX/10)) {
+				if (isdigit (c) && literal < (UINT_MAX/10)) {
 					literal = literal * 10 + (c - '0');
 				} else if (c == '}') {
 					while (1) {
@@ -571,7 +571,7 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 						e = is->end;
 					}
 				} else {
-					if (isdigit(c)) {
+					if (isdigit (c)) {
 						io(printf("Protocol error: literal too big\n"));
 					} else {
 						io(printf("Protocol error: literal contains invalid gchar %02x '%c'\n", c, isprint(c)?c:c));
@@ -613,7 +613,7 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 					goto protocol_error;
 				}
 				if (o >= oe) {
-					camel_imapx_stream_grow(is, 0, &p, &o);
+					camel_imapx_stream_grow (is, 0, &p, &o);
 					oe = is->tokenbuf + is->bufsize - 1;
 					e = is->end;
 				}
@@ -628,13 +628,13 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 	} else {
 		o = is->tokenbuf;
 		oe = is->tokenbuf + is->bufsize - 1;
-		digits = isdigit(c);
+		digits = isdigit (c);
 		*o++ = c;
 		while (1) {
 			while (p < e) {
 				c = *p++;
 				/*if (strchr(" \r\n*()[]+", c) != NULL) {*/
-				if (imapx_is_notid_char(c)) {
+				if (imapx_is_notid_char (c)) {
 					if (c == ' ' || c == '\r')
 						is->ptr = p;
 					else
@@ -647,11 +647,11 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError
 				}
 
 				if (o >= oe) {
-					camel_imapx_stream_grow(is, 0, &p, &o);
+					camel_imapx_stream_grow (is, 0, &p, &o);
 					oe = is->tokenbuf + is->bufsize - 1;
 					e = is->end;
 				}
-				digits &= isdigit(c);
+				digits &= isdigit (c);
 				*o++ = c;
 			}
 			is->ptr = p;
@@ -676,7 +676,7 @@ protocol_error:
 }
 
 void
-camel_imapx_stream_ungettoken(CamelIMAPXStream *is, camel_imapx_token_t tok, guchar *token, guint len)
+camel_imapx_stream_ungettoken (CamelIMAPXStream *is, camel_imapx_token_t tok, guchar *token, guint len)
 {
 	/*printf("ungettoken: '%c' '%s'\n", tok, token);*/
 	is->unget_tok = tok;
@@ -686,7 +686,7 @@ camel_imapx_stream_ungettoken(CamelIMAPXStream *is, camel_imapx_token_t tok, guc
 }
 
 /* returns -1 on error, 0 if last lot of data, >0 if more remaining */
-gint camel_imapx_stream_gets(CamelIMAPXStream *is, guchar **start, guint *len)
+gint camel_imapx_stream_gets (CamelIMAPXStream *is, guchar **start, guint *len)
 {
 	gint max;
 	guchar *end;
@@ -695,13 +695,13 @@ gint camel_imapx_stream_gets(CamelIMAPXStream *is, guchar **start, guint *len)
 
 	max = is->end - is->ptr;
 	if (max == 0) {
-		max = imapx_stream_fill(is, NULL);
+		max = imapx_stream_fill (is, NULL);
 		if (max <= 0)
 			return max;
 	}
 
 	*start = is->ptr;
-	end = memchr(is->ptr, '\n', max);
+	end = memchr (is->ptr, '\n', max);
 	if (end)
 		max = (end - is->ptr) + 1;
 	*start = is->ptr;
@@ -711,13 +711,13 @@ gint camel_imapx_stream_gets(CamelIMAPXStream *is, guchar **start, guint *len)
 	return end == NULL?1:0;
 }
 
-void camel_imapx_stream_set_literal(CamelIMAPXStream *is, guint literal)
+void camel_imapx_stream_set_literal (CamelIMAPXStream *is, guint literal)
 {
 	is->literal = literal;
 }
 
 /* returns -1 on erorr, 0 if last data, >0 if more data left */
-gint camel_imapx_stream_getl(CamelIMAPXStream *is, guchar **start, guint *len)
+gint camel_imapx_stream_getl (CamelIMAPXStream *is, guchar **start, guint *len)
 {
 	gint max;
 
@@ -726,12 +726,12 @@ gint camel_imapx_stream_getl(CamelIMAPXStream *is, guchar **start, guint *len)
 	if (is->literal > 0) {
 		max = is->end - is->ptr;
 		if (max == 0) {
-			max = imapx_stream_fill(is, NULL);
+			max = imapx_stream_fill (is, NULL);
 			if (max <= 0)
 				return max;
 		}
 
-		max = MIN(max, is->literal);
+		max = MIN (max, is->literal);
 		*start = is->ptr;
 		*len = max;
 		is->ptr += max;
@@ -746,17 +746,17 @@ gint camel_imapx_stream_getl(CamelIMAPXStream *is, guchar **start, guint *len)
 
 /* skip the rest of the line of tokens */
 gint
-camel_imapx_stream_skip(CamelIMAPXStream *is, GError **error)
+camel_imapx_stream_skip (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guchar *token;
 	guint len;
 
 	do {
-		tok = camel_imapx_stream_token(is, &token, &len, error);
+		tok = camel_imapx_stream_token (is, &token, &len, error);
 		if (tok == IMAPX_TOK_LITERAL) {
-			camel_imapx_stream_set_literal(is, len);
-			while ((tok = camel_imapx_stream_getl(is, &token, &len)) > 0) {
+			camel_imapx_stream_set_literal (is, len);
+			while ((tok = camel_imapx_stream_getl (is, &token, &len)) > 0) {
 				io(printf("Skip literal data '%.*s'\n", (gint)len, token));
 			}
 		}
diff --git a/camel/providers/imapx/camel-imapx-summary.c b/camel/providers/imapx/camel-imapx-summary.c
index 18440e1..40cec91 100644
--- a/camel/providers/imapx/camel-imapx-summary.c
+++ b/camel/providers/imapx/camel-imapx-summary.c
@@ -55,7 +55,7 @@ static CamelMessageContentInfo * content_info_from_db (CamelFolderSummary *s, Ca
 G_DEFINE_TYPE (CamelIMAPXSummary, camel_imapx_summary, CAMEL_TYPE_FOLDER_SUMMARY)
 
 static CamelMessageInfo *
-imapx_message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
+imapx_message_info_clone (CamelFolderSummary *s, const CamelMessageInfo *mi)
 {
 	CamelIMAPXMessageInfo *to;
 	CamelFolderSummaryClass *folder_summary_class;
@@ -65,11 +65,11 @@ imapx_message_info_clone(CamelFolderSummary *s, const CamelMessageInfo *mi)
 		camel_imapx_summary_parent_class);
 
 	to = (CamelIMAPXMessageInfo *)
-		folder_summary_class->message_info_clone(s, mi);
+		folder_summary_class->message_info_clone (s, mi);
 	to->server_flags = from->server_flags;
 
 	/* FIXME: parent clone should do this */
-	to->info.content = camel_folder_summary_content_info_new(s);
+	to->info.content = camel_folder_summary_content_info_new (s);
 
 	return (CamelMessageInfo *)to;
 }
@@ -242,14 +242,14 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 
 	/* Legacy version */
 	if (s->version == 0x30c) {
-		ret = camel_file_util_decode_uint32(in, &validity);
+		ret = camel_file_util_decode_uint32 (in, &validity);
 		if (!ret)
 			ims->validity = validity;
 		return ret;
 	}
 
 	/* Version 1 */
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &ims->version) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->version) == -1)
 		return -1;
 
 	if (ims->version == 2) {
@@ -260,7 +260,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 			return -1;
 	}
 
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &validity) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &validity) == -1)
 		return -1;
 	ims->validity = validity;
 
@@ -278,7 +278,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in)
 static CamelFIRecord *
 summary_header_to_db (CamelFolderSummary *s, GError **error)
 {
-	CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY(s);
+	CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
 	CamelFolderSummaryClass *folder_summary_class;
 	struct _CamelFIRecord *fir;
 
@@ -343,7 +343,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 
 	return info;
 error:
-	camel_message_info_free(info);
+	camel_message_info_free (info);
 	return NULL;
 }
 
@@ -432,12 +432,12 @@ content_info_to_db (CamelFolderSummary *s, CamelMessageContentInfo *info, CamelM
 	if (info->type) {
 		oldr = mir->cinfo;
 		mir->cinfo = oldr ? g_strdup_printf("%s 1", oldr) : g_strdup ("1");
-		g_free(oldr);
+		g_free (oldr);
 		return folder_summary_class->content_info_to_db (s, info, mir);
 	} else {
 		oldr = mir->cinfo;
 		mir->cinfo = oldr ? g_strdup_printf("%s 0", oldr) : g_strdup ("0");
-		g_free(oldr);
+		g_free (oldr);
 		return 0;
 	}
 }
@@ -455,20 +455,20 @@ camel_imapx_summary_add_offline (CamelFolderSummary *summary, const gchar *uid,
 	mi = (CamelIMAPXMessageInfo *)camel_folder_summary_info_new_from_message (summary, message, NULL);
 
 	/* Copy flags 'n' tags */
-	mi->info.flags = camel_message_info_flags(info);
+	mi->info.flags = camel_message_info_flags (info);
 
-	flag = camel_message_info_user_flags(info);
+	flag = camel_message_info_user_flags (info);
 	while (flag) {
-		camel_message_info_set_user_flag((CamelMessageInfo *)mi, flag->name, TRUE);
+		camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flag->name, TRUE);
 		flag = flag->next;
 	}
-	tag = camel_message_info_user_tags(info);
+	tag = camel_message_info_user_tags (info);
 	while (tag) {
-		camel_message_info_set_user_tag((CamelMessageInfo *)mi, tag->name, tag->value);
+		camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tag->name, tag->value);
 		tag = tag->next;
 	}
 
-	mi->info.size = camel_message_info_size(info);
+	mi->info.size = camel_message_info_size (info);
 	mi->info.uid = camel_pstring_strdup (uid);
 
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
@@ -480,8 +480,8 @@ camel_imapx_summary_add_offline_uncached (CamelFolderSummary *summary, const gch
 {
 	CamelIMAPXMessageInfo *mi;
 
-	mi = camel_message_info_clone(info);
-	mi->info.uid = camel_pstring_strdup(uid);
+	mi = camel_message_info_clone (info);
+	mi->info.uid = camel_pstring_strdup (uid);
 
 	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
 }
diff --git a/camel/providers/imapx/camel-imapx-utils.c b/camel/providers/imapx/camel-imapx-utils.c
index 0e78c6c..e852393 100644
--- a/camel/providers/imapx/camel-imapx-utils.c
+++ b/camel/providers/imapx/camel-imapx-utils.c
@@ -24,20 +24,20 @@ extern gint camel_verbose_debug;
 		camel_imapx_debug_flags |= CAMEL_IMAPX_DEBUG_ ## flag;	\
 	} while (0)
 
-static void camel_imapx_set_debug_flags(void)
+static void camel_imapx_set_debug_flags (void)
 {
 	if (camel_verbose_debug || camel_debug("imapx")) {
 		camel_imapx_debug_flags = CAMEL_IMAPX_DEBUG_ALL;
 		return;
 	}
 
-	debug_set_flag(command);
-	debug_set_flag(debug);
-	debug_set_flag(extra);
-	debug_set_flag(io);
-	debug_set_flag(token);
-	debug_set_flag(parse);
-	debug_set_flag(conman);
+	debug_set_flag (command);
+	debug_set_flag (debug);
+	debug_set_flag (extra);
+	debug_set_flag (io);
+	debug_set_flag (token);
+	debug_set_flag (parse);
+	debug_set_flag (conman);
 }
 
 #include "camel-imapx-tokenise.h"
@@ -49,7 +49,7 @@ __inline
 camel_imapx_id_t
 imapx_tokenise (register const gchar *str, register guint len)
 {
-	struct _imapx_keyword *k = imapx_tokenise_struct(str, len);
+	struct _imapx_keyword *k = imapx_tokenise_struct (str, len);
 
 	if (k)
 		return k->id;
@@ -79,7 +79,7 @@ static struct {
    shoudl this be part of imapx-driver? */
 /* mabye this should be a stream op? */
 void
-imapx_parse_flags(CamelIMAPXStream *stream, guint32 *flagsp, CamelFlag **user_flagsp, GError **error)
+imapx_parse_flags (CamelIMAPXStream *stream, guint32 *flagsp, CamelFlag **user_flagsp, GError **error)
 /* throws IO,PARSE exception */
 {
 	gint tok, i;
@@ -89,22 +89,22 @@ imapx_parse_flags(CamelIMAPXStream *stream, guint32 *flagsp, CamelFlag **user_fl
 
 	*flagsp = flags;
 
-	tok = camel_imapx_stream_token(stream, &token, &len, NULL);
+	tok = camel_imapx_stream_token (stream, &token, &len, NULL);
 	if (tok == '(') {
 		do {
-			tok = camel_imapx_stream_token(stream, &token, &len, NULL);
+			tok = camel_imapx_stream_token (stream, &token, &len, NULL);
 			if (tok == IMAPX_TOK_TOKEN || tok == IMAPX_TOK_INT) {
 				gchar *upper = g_ascii_strup ((gchar *) token, len);
 
 				for (i = 0; i < G_N_ELEMENTS (flag_table); i++)
-					if (!strcmp(upper, flag_table[i].name)) {
+					if (!strcmp (upper, flag_table[i].name)) {
 						flags |= flag_table[i].flag;
 						goto found;
 					}
 				if (user_flagsp) {
 					const gchar *flag_name = rename_label_flag ((gchar *) token, strlen ((gchar *) token), TRUE);
 
-					camel_flag_set(user_flagsp, flag_name, TRUE);
+					camel_flag_set (user_flagsp, flag_name, TRUE);
 
 				}
 			found:
@@ -159,7 +159,7 @@ rename_label_flag (const gchar *flag, gint len, gboolean server_to_evo)
 }
 
 void
-imapx_write_flags(CamelStream *stream, guint32 flags, CamelFlag *user_flags, GError **error)
+imapx_write_flags (CamelStream *stream, guint32 flags, CamelFlag *user_flags, GError **error)
 /* throws IO exception */
 {
 	gint i;
@@ -177,7 +177,7 @@ imapx_write_flags(CamelStream *stream, guint32 flags, CamelFlag *user_flags, GEr
 				return;
 			}
 			first = FALSE;
-			if (camel_stream_write (stream, flag_table[i].name, strlen(flag_table[i].name), error) == -1) {
+			if (camel_stream_write (stream, flag_table[i].name, strlen (flag_table[i].name), error) == -1) {
 				return;
 			}
 
@@ -192,7 +192,7 @@ imapx_write_flags(CamelStream *stream, guint32 flags, CamelFlag *user_flags, GEr
 			return;
 		}
 		first = FALSE;
-		if (camel_stream_write(stream, flag_name, strlen (flag_name), error) == -1) {
+		if (camel_stream_write (stream, flag_name, strlen (flag_name), error) == -1) {
 			return;
 		}
 
@@ -215,7 +215,7 @@ imapx_update_user_flags (CamelMessageInfo *info, CamelFlag *server_user_flags)
 	if (camel_flag_get (&binfo->user_flags, "$has_cal"))
 		set_cal = TRUE;
 
-	changed = camel_flag_list_copy(&binfo->user_flags, &server_user_flags);
+	changed = camel_flag_list_copy (&binfo->user_flags, &server_user_flags);
 	camel_flag_list_copy (&xinfo->server_user_flags, &server_user_flags);
 
 	/* reset the calendar flag if it was set in messageinfo before */
@@ -328,7 +328,7 @@ imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info, guint32 se
 			folder->summary->visible_count -= junk ? junk : deleted;
 
 		folder->summary->saved_count++;
-		camel_folder_summary_touch(folder->summary);
+		camel_folder_summary_touch (folder->summary);
 	}
 
 	binfo->flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
@@ -400,7 +400,7 @@ imapx_update_store_summary (CamelFolder *folder)
 
 /*
 capability_data ::= "CAPABILITY" SPACE [1#capability SPACE] "IMAP4rev1"
-                   [SPACE 1#capability]
+                  [SPACE 1#capability]
                     ;; IMAP4rev1 servers which offer RFC 1730
                     ;; compatibility MUST list "IMAP4" as the first
                     ;; capability.
@@ -425,7 +425,7 @@ struct {
 };
 
 struct _capability_info *
-imapx_parse_capability(CamelIMAPXStream *stream, GError **error)
+imapx_parse_capability (CamelIMAPXStream *stream, GError **error)
 {
 	gint tok, i;
 	guint len;
@@ -434,16 +434,16 @@ imapx_parse_capability(CamelIMAPXStream *stream, GError **error)
 	struct _capability_info * cinfo;
 	GError *local_error = NULL;
 
-	cinfo = g_malloc0(sizeof(*cinfo));
+	cinfo = g_malloc0 (sizeof (*cinfo));
 	cinfo->auth_types = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
 
 	/* FIXME: handle auth types */
-	while ((tok = camel_imapx_stream_token(stream, &token, &len, &local_error)) != '\n' &&
+	while ((tok = camel_imapx_stream_token (stream, &token, &len, &local_error)) != '\n' &&
 		local_error == NULL) {
 		switch (tok) {
 			case ']':
 				/* Put it back so that imapx_untagged() isn't unhappy */
-				camel_imapx_stream_ungettoken(stream, tok, token, len);
+				camel_imapx_stream_ungettoken (stream, tok, token, len);
 				return cinfo;
 			case 43:
 				token = (guchar *) g_strconcat ((gchar *)token, "+", NULL);
@@ -462,7 +462,7 @@ imapx_parse_capability(CamelIMAPXStream *stream, GError **error)
 			case IMAPX_TOK_INT:
 				d(printf(" cap: '%s'\n", token));
 				for (i = 0; i < G_N_ELEMENTS (capa_table); i++)
-					if (!strcmp((gchar *) token, capa_table[i].name))
+					if (!strcmp ((gchar *) token, capa_table[i].name))
 						cinfo->capa |= capa_table[i].flag;
 				if (free_token) {
 					g_free (token);
@@ -478,17 +478,17 @@ imapx_parse_capability(CamelIMAPXStream *stream, GError **error)
 
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
-		imapx_free_capability(cinfo);
+		imapx_free_capability (cinfo);
 		cinfo = NULL;
 	}
 
 	return cinfo;
 }
 
-void imapx_free_capability(struct _capability_info *cinfo)
+void imapx_free_capability (struct _capability_info *cinfo)
 {
 	g_hash_table_destroy (cinfo->auth_types);
-	g_free(cinfo);
+	g_free (cinfo);
 }
 
 struct _CamelIMAPXNamespaceList *
@@ -501,7 +501,7 @@ imapx_parse_namespace_list (CamelIMAPXStream *stream, GError **error)
 	guchar *token;
 	gint n = 0;
 
-	nsl = g_malloc0(sizeof(CamelIMAPXNamespaceList));
+	nsl = g_malloc0 (sizeof (CamelIMAPXNamespaceList));
 	nsl->personal = NULL;
 	nsl->shared = NULL;
 	nsl->other = NULL;
@@ -609,14 +609,14 @@ body_extension  ::= nstring / number / "(" 1#body_extension ")"
                     ;; revisions of this specification.
 
 body_ext_1part  ::= body_fld_md5[SPACE body_fld_dsp
-                   [SPACE body_fld_lang
-                   [SPACE 1#body_extension]]]
+                  [SPACE body_fld_lang
+                  [SPACE 1#body_extension]]]
                     ;; MUST NOT be returned on non-extensible
                     ;; "BODY" fetch
 
 body_ext_mpart  ::= body_fld_param
-                   [SPACE body_fld_dsp SPACE body_fld_lang
-                   [SPACE 1#body_extension]]
+                  [SPACE body_fld_dsp SPACE body_fld_lang
+                  [SPACE 1#body_extension]]
                     ;; MUST NOT be returned on non-extensible
                     ;; "BODY" fetch
 
@@ -644,13 +644,13 @@ body_fld_octets ::= number
 body_fld_param  ::= "(" 1#(string SPACE string) ")" / nil
 
 body_type_1part ::= (body_type_basic / body_type_msg / body_type_text)
-                   [SPACE body_ext_1part]
+                  [SPACE body_ext_1part]
 
 body_type_basic ::= media_basic SPACE body_fields
                     ;; MESSAGE subtype MUST NOT be "RFC822"
 
 body_type_mpart ::= 1*body SPACE media_subtype
-                   [SPACE body_ext_mpart]
+                  [SPACE body_ext_mpart]
 
 body_type_msg   ::= media_message SPACE body_fields SPACE envelope
                     SPACE body SPACE body_fld_lines
@@ -697,7 +697,7 @@ media_text      ::= <"> "TEXT" <"> SPACE media_subtype
                     ;; Defined in[MIME-IMT]
 
  ( "type" "subtype"  body_fields [envelope body body_fld_lines]
-                                [body_fld_lines]
+                               [body_fld_lines]
 
  (("TEXT" "PLAIN" ("CHARSET"
                      "US-ASCII") NIL NIL "7BIT" 1152 23)("TEXT" "PLAIN"
@@ -716,27 +716,27 @@ struct _body_fields {
 	};*/
 
 void
-imapx_free_body(struct _CamelMessageContentInfo *cinfo)
+imapx_free_body (struct _CamelMessageContentInfo *cinfo)
 {
 	struct _CamelMessageContentInfo *list, *next;
 
 	list = cinfo->childs;
 	while (list) {
 		next = list->next;
-		imapx_free_body(list);
+		imapx_free_body (list);
 		list = next;
 	}
 
 	if (cinfo->type)
-		camel_content_type_unref(cinfo->type);
-	g_free(cinfo->id);
-	g_free(cinfo->description);
-	g_free(cinfo->encoding);
-	g_free(cinfo);
+		camel_content_type_unref (cinfo->type);
+	g_free (cinfo->id);
+	g_free (cinfo->description);
+	g_free (cinfo->encoding);
+	g_free (cinfo);
 }
 
 gboolean
-imapx_parse_param_list(CamelIMAPXStream *is, struct _camel_header_param **plist, GError **error)
+imapx_parse_param_list (CamelIMAPXStream *is, struct _camel_header_param **plist, GError **error)
 {
 	gint tok;
 	guint len;
@@ -746,19 +746,19 @@ imapx_parse_param_list(CamelIMAPXStream *is, struct _camel_header_param **plist,
 	p(printf("body_fld_param\n"));
 
 	/* body_fld_param  ::= "(" 1#(string SPACE string) ")" / nil */
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok == '(') {
 		while (1) {
-			tok = camel_imapx_stream_token(is, &token, &len, NULL);
+			tok = camel_imapx_stream_token (is, &token, &len, NULL);
 			if (tok == ')')
 				break;
-			camel_imapx_stream_ungettoken(is, tok, token, len);
+			camel_imapx_stream_ungettoken (is, tok, token, len);
 
-			camel_imapx_stream_astring(is, &token, NULL);
+			camel_imapx_stream_astring (is, &token, NULL);
 			param = alloca (strlen ((gchar *) token)+1);
-			strcpy(param, (gchar *) token);
-			camel_imapx_stream_astring(is, &token, NULL);
-			camel_header_set_param(plist, param, (gchar *) token);
+			strcpy (param, (gchar *) token);
+			camel_imapx_stream_astring (is, &token, NULL);
+			camel_header_set_param (plist, param, (gchar *) token);
 		}
 	} /* else check nil?  no need */
 
@@ -766,7 +766,7 @@ imapx_parse_param_list(CamelIMAPXStream *is, struct _camel_header_param **plist,
 }
 
 struct _CamelContentDisposition *
-imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
+imapx_parse_ext_optional (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
@@ -778,29 +778,29 @@ imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
 	/* although the grammars are different, they can be parsed the same way */
 
 	/* body_ext_1part  ::= body_fld_md5 [SPACE body_fld_dsp
-	  [SPACE body_fld_lang
-	  [SPACE 1#body_extension]]]
+	 [SPACE body_fld_lang
+	 [SPACE 1#body_extension]]]
 	   ;; MUST NOT be returned on non-extensible
 	   ;; "BODY" fetch */
 
 	/* body_ext_mpart  ::= body_fld_param
-	  [SPACE body_fld_dsp SPACE body_fld_lang
-	  [SPACE 1#body_extension]]
+	 [SPACE body_fld_dsp SPACE body_fld_lang
+	 [SPACE 1#body_extension]]
 	   ;; MUST NOT be returned on non-extensible
 	   ;; "BODY" fetch */
 
 	/* body_fld_dsp    ::= "(" string SPACE body_fld_param ")" / nil */
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	switch (tok) {
 		case '(':
-			dinfo = g_malloc0(sizeof(*dinfo));
+			dinfo = g_malloc0 (sizeof (*dinfo));
 			dinfo->refcount = 1;
 			/* should be string */
-			camel_imapx_stream_astring(is, &token, NULL);
+			camel_imapx_stream_astring (is, &token, NULL);
 
-			dinfo->disposition = g_strdup((gchar *) token);
-			imapx_parse_param_list(is, &dinfo->params, NULL);
+			dinfo->disposition = g_strdup ((gchar *) token);
+			imapx_parse_param_list (is, &dinfo->params, NULL);
 		case IMAPX_TOK_TOKEN:
 			d(printf("body_fld_dsp: NIL\n"));
 			break;
@@ -815,11 +815,11 @@ imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
 
 	/* we just drop the lang string/list, save it somewhere? */
 
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 	switch (tok) {
 		case '(':
 			while (1) {
-				tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+				tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 				if (tok == ')') {
 					break;
 				} else if (tok != IMAPX_TOK_STRING) {
@@ -838,8 +838,8 @@ imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
 			break;
 		case IMAPX_TOK_LITERAL:
 			/* we have a literal string */
-			camel_imapx_stream_set_literal(is, len);
-			while ((tok = camel_imapx_stream_getl(is, &token, &len)) > 0) {
+			camel_imapx_stream_set_literal (is, len);
+			while ((tok = camel_imapx_stream_getl (is, &token, &len)) > 0) {
 				d(printf("Skip literal data '%.*s'\n", (gint)len, token));
 			}
 			break;
@@ -849,7 +849,7 @@ imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		if (dinfo)
-			camel_content_disposition_unref(dinfo);
+			camel_content_disposition_unref (dinfo);
 		dinfo = NULL;
 	}
 
@@ -857,7 +857,7 @@ imapx_parse_ext_optional(CamelIMAPXStream *is, GError **error)
 }
 
 struct _CamelMessageContentInfo *
-imapx_parse_body_fields(CamelIMAPXStream *is, GError **error)
+imapx_parse_body_fields (CamelIMAPXStream *is, GError **error)
 {
 	guchar *token;
 	gchar  *type;
@@ -870,37 +870,37 @@ imapx_parse_body_fields(CamelIMAPXStream *is, GError **error)
 
 	p(printf("body_fields\n"));
 
-	cinfo = g_malloc0(sizeof(*cinfo));
+	cinfo = g_malloc0 (sizeof (*cinfo));
 
 	/* this should be string not astring */
-	if (camel_imapx_stream_astring(is, &token, error))
+	if (camel_imapx_stream_astring (is, &token, error))
 		goto error;
-	type = alloca(strlen( (gchar *) token)+1);
-	strcpy(type, (gchar *) token);
-	if (camel_imapx_stream_astring(is, &token, error))
+	type = alloca (strlen ( (gchar *) token)+1);
+	strcpy (type, (gchar *) token);
+	if (camel_imapx_stream_astring (is, &token, error))
 		goto error;
-	cinfo->type = camel_content_type_new(type, (gchar *) token);
-	if (!imapx_parse_param_list(is, &cinfo->type->params, error))
+	cinfo->type = camel_content_type_new (type, (gchar *) token);
+	if (!imapx_parse_param_list (is, &cinfo->type->params, error))
 		goto error;
 
 	/* body_fld_id     ::= nstring */
-	if (!camel_imapx_stream_nstring(is, &token, error))
+	if (!camel_imapx_stream_nstring (is, &token, error))
 		goto error;
-	cinfo->id = g_strdup((gchar *) token);
+	cinfo->id = g_strdup ((gchar *) token);
 
 	/* body_fld_desc   ::= nstring */
-	if (!camel_imapx_stream_nstring(is, &token, error))
+	if (!camel_imapx_stream_nstring (is, &token, error))
 		goto error;
-	cinfo->description = g_strdup((gchar *) token);
+	cinfo->description = g_strdup ((gchar *) token);
 
 	/* body_fld_enc    ::= (<"> ("7BIT" / "8BIT" / "BINARY" / "BASE64"/
 	   "QUOTED-PRINTABLE") <">) / string */
-	if (camel_imapx_stream_astring(is, &token, error))
+	if (camel_imapx_stream_astring (is, &token, error))
 		goto error;
-	cinfo->encoding = g_strdup((gchar *) token);
+	cinfo->encoding = g_strdup ((gchar *) token);
 
 	/* body_fld_octets ::= number */
-	cinfo->size = camel_imapx_stream_number(is, &local_error);
+	cinfo->size = camel_imapx_stream_number (is, &local_error);
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		goto error;
@@ -908,12 +908,12 @@ imapx_parse_body_fields(CamelIMAPXStream *is, GError **error)
 
 	return cinfo;
 error:
-	imapx_free_body(cinfo);
+	imapx_free_body (cinfo);
 	return cinfo;
 }
 
 struct _camel_header_address *
-imapx_parse_address_list(CamelIMAPXStream *is, GError **error)
+imapx_parse_address_list (CamelIMAPXStream *is, GError **error)
 /* throws PARSE,IO exception */
 {
 	gint tok;
@@ -925,29 +925,29 @@ imapx_parse_address_list(CamelIMAPXStream *is, GError **error)
 
 	/* "(" 1*address ")" / nil */
 
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 	if (tok == '(') {
 		while (1) {
 			struct _camel_header_address *addr, *group = NULL;
 
 			/* address         ::= "(" addr_name SPACE addr_adl SPACE addr_mailbox
 			   SPACE addr_host ")" */
-			tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+			tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 			if (tok == ')')
 				break;
 			if (tok != '(') {
 				g_clear_error (&local_error);
-				camel_header_address_list_clear(&list);
+				camel_header_address_list_clear (&list);
 				g_set_error (error, CAMEL_IMAPX_ERROR, 1, "missing '(' for address");
 				return NULL;
 			}
 
-			addr = camel_header_address_new();
+			addr = camel_header_address_new ();
 			addr->type = CAMEL_HEADER_ADDRESS_NAME;
-			tok = camel_imapx_stream_nstring(is, &token, &local_error);
-			addr->name = g_strdup((gchar *) token);
+			tok = camel_imapx_stream_nstring (is, &token, &local_error);
+			addr->name = g_strdup ((gchar *) token);
 			/* we ignore the route, nobody uses it in the real world */
-			tok = camel_imapx_stream_nstring(is, &token, &local_error);
+			tok = camel_imapx_stream_nstring (is, &token, &local_error);
 
 			/* [RFC-822] group syntax is indicated by a special
 			   form of address structure in which the host name
@@ -957,31 +957,31 @@ imapx_parse_address_list(CamelIMAPXStream *is, GError **error)
 			   non-NIL, this is a start of group marker, and the
 			   mailbox name field holds the group name phrase. */
 
-			tok = camel_imapx_stream_nstring(is,(guchar **) &mbox, &local_error);
-			mbox = g_strdup(mbox);
-			tok = camel_imapx_stream_nstring(is, &host, &local_error);
+			tok = camel_imapx_stream_nstring (is,(guchar **) &mbox, &local_error);
+			mbox = g_strdup (mbox);
+			tok = camel_imapx_stream_nstring (is, &host, &local_error);
 			if (host == NULL) {
 				if (mbox == NULL) {
 					group = NULL;
 				} else {
 					d(printf("adding group '%s'\n", mbox));
-					g_free(addr->name);
+					g_free (addr->name);
 					addr->name = mbox;
 					addr->type = CAMEL_HEADER_ADDRESS_GROUP;
-					camel_header_address_list_append(&list, addr);
+					camel_header_address_list_append (&list, addr);
 					group = addr;
 				}
 			} else {
 				addr->v.addr = g_strdup_printf("%s%s%s", mbox? mbox:"", host?"@":"", host?(gchar *)host:"");
-				g_free(mbox);
+				g_free (mbox);
 				d(printf("adding address '%s'\n", addr->v.addr));
 				if (group != NULL)
-					camel_header_address_add_member(group, addr);
+					camel_header_address_add_member (group, addr);
 				else
-					camel_header_address_list_append(&list, addr);
+					camel_header_address_list_append (&list, addr);
 			}
 			do {
-				tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+				tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 			} while (tok != ')');
 		}
 	} else {
@@ -996,7 +996,7 @@ imapx_parse_address_list(CamelIMAPXStream *is, GError **error)
 }
 
 struct _CamelMessageInfo *
-imapx_parse_envelope(CamelIMAPXStream *is, GError **error)
+imapx_parse_envelope (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
@@ -1013,36 +1013,36 @@ imapx_parse_envelope(CamelIMAPXStream *is, GError **error)
 
 	p(printf("envelope\n"));
 
-	minfo = (CamelMessageInfoBase *)camel_message_info_new(NULL);
+	minfo = (CamelMessageInfoBase *)camel_message_info_new (NULL);
 
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 	if (tok != '(') {
 		g_clear_error (&local_error);
-		camel_message_info_free(minfo);
+		camel_message_info_free (minfo);
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "envelope: expecting '('");
 		return NULL;
 	}
 
 	/* env_date        ::= nstring */
-	camel_imapx_stream_nstring(is, &token, &local_error);
-	minfo->date_sent = camel_header_decode_date((gchar *) token, NULL);
+	camel_imapx_stream_nstring (is, &token, &local_error);
+	minfo->date_sent = camel_header_decode_date ((gchar *) token, NULL);
 
 	/* env_subject     ::= nstring */
-	tok = camel_imapx_stream_nstring(is, &token, &local_error);
-	minfo->subject = camel_pstring_strdup((gchar *) token);
+	tok = camel_imapx_stream_nstring (is, &token, &local_error);
+	minfo->subject = camel_pstring_strdup ((gchar *) token);
 
 	/* we merge from/sender into from, append should probably merge more smartly? */
 
 	/* env_from        ::= "(" 1*address ")" / nil */
-	addr_from = imapx_parse_address_list(is, &local_error);
+	addr_from = imapx_parse_address_list (is, &local_error);
 
 	/* env_sender      ::= "(" 1*address ")" / nil */
-	addr = imapx_parse_address_list(is, &local_error);
+	addr = imapx_parse_address_list (is, &local_error);
 	if (addr_from) {
-		camel_header_address_list_clear(&addr);
+		camel_header_address_list_clear (&addr);
 #if 0
 		if (addr)
-			camel_header_address_list_append_list(&addr_from, &addr);
+			camel_header_address_list_append_list (&addr_from, &addr);
 #endif
 	} else {
 		if (addr)
@@ -1050,56 +1050,56 @@ imapx_parse_envelope(CamelIMAPXStream *is, GError **error)
 	}
 
 	if (addr_from) {
-		addrstr = camel_header_address_list_format(addr_from);
-		minfo->from = camel_pstring_strdup(addrstr);
-		g_free(addrstr);
-		camel_header_address_list_clear(&addr_from);
+		addrstr = camel_header_address_list_format (addr_from);
+		minfo->from = camel_pstring_strdup (addrstr);
+		g_free (addrstr);
+		camel_header_address_list_clear (&addr_from);
 	}
 
 	/* we dont keep reply_to */
 
 	/* env_reply_to    ::= "(" 1*address ")" / nil */
-	addr = imapx_parse_address_list(is, &local_error);
-	camel_header_address_list_clear(&addr);
+	addr = imapx_parse_address_list (is, &local_error);
+	camel_header_address_list_clear (&addr);
 
 	/* env_to          ::= "(" 1*address ")" / nil */
-	addr = imapx_parse_address_list(is, &local_error);
+	addr = imapx_parse_address_list (is, &local_error);
 	if (addr) {
-		addrstr = camel_header_address_list_format(addr);
-		minfo->to = camel_pstring_strdup(addrstr);
-		g_free(addrstr);
-		camel_header_address_list_clear(&addr);
+		addrstr = camel_header_address_list_format (addr);
+		minfo->to = camel_pstring_strdup (addrstr);
+		g_free (addrstr);
+		camel_header_address_list_clear (&addr);
 	}
 
 	/* env_cc          ::= "(" 1*address ")" / nil */
-	addr = imapx_parse_address_list(is, &local_error);
+	addr = imapx_parse_address_list (is, &local_error);
 	if (addr) {
-		addrstr = camel_header_address_list_format(addr);
-		minfo->cc = camel_pstring_strdup(addrstr);
-		g_free(addrstr);
-		camel_header_address_list_clear(&addr);
+		addrstr = camel_header_address_list_format (addr);
+		minfo->cc = camel_pstring_strdup (addrstr);
+		g_free (addrstr);
+		camel_header_address_list_clear (&addr);
 	}
 
 	/* we dont keep bcc either */
 
 	/* env_bcc         ::= "(" 1*address ")" / nil */
-	addr = imapx_parse_address_list(is, &local_error);
-	camel_header_address_list_clear(&addr);
+	addr = imapx_parse_address_list (is, &local_error);
+	camel_header_address_list_clear (&addr);
 
 	/* FIXME: need to put in-reply-to into references hash list */
 
 	/* env_in_reply_to ::= nstring */
-	tok = camel_imapx_stream_nstring(is, &token, &local_error);
+	tok = camel_imapx_stream_nstring (is, &token, &local_error);
 
 	/* FIXME: need to put message-id into message-id hash */
 
 	/* env_message_id  ::= nstring */
-	tok = camel_imapx_stream_nstring(is, &token, &local_error);
+	tok = camel_imapx_stream_nstring (is, &token, &local_error);
 
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 	if (tok != ')') {
 		g_clear_error (&local_error);
-		camel_message_info_free(minfo);
+		camel_message_info_free (minfo);
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "expecting ')'");
 		return NULL;
 	}
@@ -1112,7 +1112,7 @@ imapx_parse_envelope(CamelIMAPXStream *is, GError **error)
 }
 
 struct _CamelMessageContentInfo *
-imapx_parse_body(CamelIMAPXStream *is, GError **error)
+imapx_parse_body (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
@@ -1127,62 +1127,62 @@ imapx_parse_body(CamelIMAPXStream *is, GError **error)
 
 	p(printf("body\n"));
 
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 	if (tok != '(') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "body: expecting '('");
 		return NULL;
 	}
 
 	/* 1*body (optional for multiparts) */
-	tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-	camel_imapx_stream_ungettoken(is, tok, token, len);
+	tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+	camel_imapx_stream_ungettoken (is, tok, token, len);
 	if (tok == '(') {
 		/* body_type_mpart ::= 1*body SPACE media_subtype
-		  [SPACE body_ext_mpart] */
+		 [SPACE body_ext_mpart] */
 
-		cinfo = g_malloc0(sizeof(*cinfo));
+		cinfo = g_malloc0 (sizeof (*cinfo));
 		last = (struct _CamelMessageContentInfo *)&cinfo->childs;
 		do {
-			subinfo = imapx_parse_body(is, &local_error);
+			subinfo = imapx_parse_body (is, &local_error);
 			last->next = subinfo;
 			last = subinfo;
 			subinfo->parent = cinfo;
-			tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-			camel_imapx_stream_ungettoken(is, tok, token, len);
+			tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+			camel_imapx_stream_ungettoken (is, tok, token, len);
 		} while (tok == '(');
 
 		d(printf("media_subtype\n"));
 
-		camel_imapx_stream_astring(is, &token, &local_error);
+		camel_imapx_stream_astring (is, &token, &local_error);
 		cinfo->type = camel_content_type_new("multipart", (gchar *) token);
 
 		/* body_ext_mpart  ::= body_fld_param
-		  [SPACE body_fld_dsp SPACE body_fld_lang
-		  [SPACE 1#body_extension]]
+		 [SPACE body_fld_dsp SPACE body_fld_lang
+		 [SPACE 1#body_extension]]
 		   ;; MUST NOT be returned on non-extensible
 		   ;; "BODY" fetch */
 
 		d(printf("body_ext_mpart\n"));
 
-		tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-		camel_imapx_stream_ungettoken(is, tok, token, len);
+		tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+		camel_imapx_stream_ungettoken (is, tok, token, len);
 		if (tok == '(') {
-			imapx_parse_param_list(is, &cinfo->type->params, &local_error);
+			imapx_parse_param_list (is, &cinfo->type->params, &local_error);
 
 			/* body_fld_dsp    ::= "(" string SPACE body_fld_param ")" / nil */
 
-			tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-			camel_imapx_stream_ungettoken(is, tok, token, len);
+			tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+			camel_imapx_stream_ungettoken (is, tok, token, len);
 			if (tok == '(' || tok == IMAPX_TOK_TOKEN) {
-				dinfo = imapx_parse_ext_optional(is, &local_error);
+				dinfo = imapx_parse_ext_optional (is, &local_error);
 				/* other extension fields?, soaked up below */
 			} else {
-				camel_imapx_stream_ungettoken(is, tok, token, len);
+				camel_imapx_stream_ungettoken (is, tok, token, len);
 			}
 		}
 	} else {
 		/* body_type_1part ::= (body_type_basic / body_type_msg / body_type_text)
-		  [SPACE body_ext_1part]
+		 [SPACE body_ext_1part]
 
 		   body_type_basic ::= media_basic SPACE body_fields
 		   body_type_text  ::= media_text SPACE body_fields SPACE body_fld_lines
@@ -1191,19 +1191,19 @@ imapx_parse_body(CamelIMAPXStream *is, GError **error)
 
 		d(printf("Single part body\n"));
 
-		cinfo = imapx_parse_body_fields(is, &local_error);
+		cinfo = imapx_parse_body_fields (is, &local_error);
 
 		d(printf("envelope?\n"));
 
 		/* do we have an envelope following */
-		tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-		camel_imapx_stream_ungettoken(is, tok, token, len);
+		tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+		camel_imapx_stream_ungettoken (is, tok, token, len);
 		if (tok == '(') {
 			/* what do we do with the envelope?? */
-			minfo = imapx_parse_envelope(is, &local_error);
+			minfo = imapx_parse_envelope (is, &local_error);
 			/* what do we do with the message content info?? */
-			//((CamelMessageInfoBase *)minfo)->content = imapx_parse_body(is);
-			camel_message_info_free(minfo);
+			//((CamelMessageInfoBase *)minfo)->content = imapx_parse_body (is);
+			camel_message_info_free (minfo);
 			minfo = NULL;
 			d(printf("Scanned envelope - what do i do with it?\n"));
 		}
@@ -1211,32 +1211,32 @@ imapx_parse_body(CamelIMAPXStream *is, GError **error)
 		d(printf("fld_lines?\n"));
 
 		/* do we have fld_lines following? */
-		tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+		tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 		if (tok == IMAPX_TOK_INT) {
 			d(printf("field lines: %s\n", token));
-			tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+			tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 		}
-		camel_imapx_stream_ungettoken(is, tok, token, len);
+		camel_imapx_stream_ungettoken (is, tok, token, len);
 
 		/* body_ext_1part  ::= body_fld_md5 [SPACE body_fld_dsp
-		  [SPACE body_fld_lang
-		  [SPACE 1#body_extension]]]
+		 [SPACE body_fld_lang
+		 [SPACE 1#body_extension]]]
 		   ;; MUST NOT be returned on non-extensible
 		   ;; "BODY" fetch */
 
 		d(printf("extension data?\n"));
 
 		if (tok != ')') {
-			camel_imapx_stream_nstring(is, &token, &local_error);
+			camel_imapx_stream_nstring (is, &token, &local_error);
 
 			d(printf("md5: %s\n", token?(gchar *)token:"NIL"));
 
 			/* body_fld_dsp    ::= "(" string SPACE body_fld_param ")" / nil */
 
-			tok = camel_imapx_stream_token(is, &token, &len, &local_error);
-			camel_imapx_stream_ungettoken(is, tok, token, len);
+			tok = camel_imapx_stream_token (is, &token, &len, &local_error);
+			camel_imapx_stream_ungettoken (is, tok, token, len);
 			if (tok == '(' || tok == IMAPX_TOK_TOKEN) {
-				dinfo = imapx_parse_ext_optional(is, &local_error);
+				dinfo = imapx_parse_ext_optional (is, &local_error);
 				/* then other extension fields, soaked up below */
 			}
 		}
@@ -1245,7 +1245,7 @@ imapx_parse_body(CamelIMAPXStream *is, GError **error)
 	/* soak up any other extension fields that may be present */
 	/* there should only be simple tokens, no lists */
 	do {
-		tok = camel_imapx_stream_token(is, &token, &len, &local_error);
+		tok = camel_imapx_stream_token (is, &token, &len, &local_error);
 		if (tok != ')') {
 			d(printf("Dropping extension data '%s'\n", token));
 		}
@@ -1255,23 +1255,23 @@ imapx_parse_body(CamelIMAPXStream *is, GError **error)
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
 		if (cinfo)
-			imapx_free_body(cinfo);
+			imapx_free_body (cinfo);
 		if (dinfo)
-			camel_content_disposition_unref(dinfo);
+			camel_content_disposition_unref (dinfo);
 		if (minfo)
-			camel_message_info_free(minfo);
+			camel_message_info_free (minfo);
 		return NULL;
 	}
 
 	/* FIXME: do something with the disposition, currently we have no way to pass it out? */
 	if (dinfo)
-		camel_content_disposition_unref(dinfo);
+		camel_content_disposition_unref (dinfo);
 
 	return cinfo;
 }
 
 gchar *
-imapx_parse_section(CamelIMAPXStream *is, GError **error)
+imapx_parse_section (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
@@ -1289,18 +1289,18 @@ imapx_parse_section(CamelIMAPXStream *is, GError **error)
 	  SPACE header_list / "TEXT"
 	*/
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != '[') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "section: expecting '['");
 		return NULL;
 	}
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok == IMAPX_TOK_INT || tok == IMAPX_TOK_TOKEN)
-		section = g_strdup((gchar *) token);
+		section = g_strdup ((gchar *) token);
 	else if (tok == ']') {
 		section = g_strdup("");
-		camel_imapx_stream_ungettoken(is, tok, token, len);
+		camel_imapx_stream_ungettoken (is, tok, token, len);
 	} else {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "section: expecting token");
 		return NULL;
@@ -1310,10 +1310,10 @@ imapx_parse_section(CamelIMAPXStream *is, GError **error)
 	   header_fld_name ::= astring */
 
 	/* we dont need the header specifiers */
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok == '(') {
 		do {
-			tok = camel_imapx_stream_token(is, &token, &len, NULL);
+			tok = camel_imapx_stream_token (is, &token, &len, NULL);
 			if (tok == IMAPX_TOK_STRING || tok == IMAPX_TOK_TOKEN || tok == IMAPX_TOK_INT) {
 				/* ?do something? */
 			} else if (tok != ')') {
@@ -1322,12 +1322,12 @@ imapx_parse_section(CamelIMAPXStream *is, GError **error)
 				return NULL;
 			}
 		} while (tok != ')');
-		tok = camel_imapx_stream_token(is, &token, &len, NULL);
+		tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	}
 
 	if (tok != ']') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "section: expecting ']'");
-		g_free(section);
+		g_free (section);
 		return NULL;
 	}
 
@@ -1335,23 +1335,23 @@ imapx_parse_section(CamelIMAPXStream *is, GError **error)
 }
 
 static guint64
-imapx_parse_modseq(CamelIMAPXStream *is, GError **error)
+imapx_parse_modseq (CamelIMAPXStream *is, GError **error)
 {
 	guint64 ret;
 	gint tok;
 	guint len;
 	guchar *token;
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != '(') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "fetch: expecting '('");
 		return 0;
 	}
-	ret = camel_imapx_stream_number(is, error);
+	ret = camel_imapx_stream_number (is, error);
 	if (ret == 0)
 		return 0;
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != ')') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "fetch: expecting '('");
 		return 0;
@@ -1360,7 +1360,7 @@ imapx_parse_modseq(CamelIMAPXStream *is, GError **error)
 }
 
 void
-imapx_free_fetch(struct _fetch_info *finfo)
+imapx_free_fetch (struct _fetch_info *finfo)
 {
 	if (finfo == NULL)
 		return;
@@ -1372,19 +1372,19 @@ imapx_free_fetch(struct _fetch_info *finfo)
 	if (finfo->header)
 		g_object_unref (finfo->header);
 	if (finfo->minfo)
-		camel_message_info_free(finfo->minfo);
+		camel_message_info_free (finfo->minfo);
 	if (finfo->cinfo)
-		imapx_free_body(finfo->cinfo);
-	camel_flag_list_free(&finfo->user_flags);
-	g_free(finfo->date);
-	g_free(finfo->section);
-	g_free(finfo->uid);
-	g_free(finfo);
+		imapx_free_body (finfo->cinfo);
+	camel_flag_list_free (&finfo->user_flags);
+	g_free (finfo->date);
+	g_free (finfo->section);
+	g_free (finfo->uid);
+	g_free (finfo);
 }
 
 /* debug, dump one out */
 void
-imapx_dump_fetch(struct _fetch_info *finfo)
+imapx_dump_fetch (struct _fetch_info *finfo)
 {
 	CamelStream *sout;
 	gint fd;
@@ -1395,30 +1395,30 @@ imapx_dump_fetch(struct _fetch_info *finfo)
 		return;
 	}
 
-	fd = dup(1);
-	sout = camel_stream_fs_new_with_fd(fd);
+	fd = dup (1);
+	sout = camel_stream_fs_new_with_fd (fd);
 	if (finfo->body) {
 		camel_stream_printf(sout, "Body content:\n");
-		camel_stream_write_to_stream(finfo->body, sout, NULL);
-		camel_stream_reset(finfo->body, NULL);
+		camel_stream_write_to_stream (finfo->body, sout, NULL);
+		camel_stream_reset (finfo->body, NULL);
 	}
 	if (finfo->text) {
 		camel_stream_printf(sout, "Text content:\n");
-		camel_stream_write_to_stream(finfo->text, sout, NULL);
-		camel_stream_reset(finfo->text, NULL);
+		camel_stream_write_to_stream (finfo->text, sout, NULL);
+		camel_stream_reset (finfo->text, NULL);
 	}
 	if (finfo->header) {
 		camel_stream_printf(sout, "Header content:\n");
-		camel_stream_write_to_stream(finfo->header, sout, NULL);
-		camel_stream_reset(finfo->header, NULL);
+		camel_stream_write_to_stream (finfo->header, sout, NULL);
+		camel_stream_reset (finfo->header, NULL);
 	}
 	if (finfo->minfo) {
 		camel_stream_printf(sout, "Message Info:\n");
-		camel_message_info_dump(finfo->minfo);
+		camel_message_info_dump (finfo->minfo);
 	}
 	if (finfo->cinfo) {
 		camel_stream_printf(sout, "Content Info:\n");
-		//camel_content_info_dump(finfo->cinfo, 0);
+		//camel_content_info_dump (finfo->cinfo, 0);
 	}
 	if (finfo->got & FETCH_SIZE)
 		camel_stream_printf(sout, "Size: %d\n", (gint)finfo->size);
@@ -1436,97 +1436,97 @@ imapx_dump_fetch(struct _fetch_info *finfo)
 }
 
 struct _fetch_info *
-imapx_parse_fetch(CamelIMAPXStream *is, GError **error)
+imapx_parse_fetch (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
 	guchar *token, *p, c;
 	struct _fetch_info *finfo;
 
-	finfo = g_malloc0(sizeof(*finfo));
+	finfo = g_malloc0 (sizeof (*finfo));
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != '(') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "fetch: expecting '('");
 		g_free (finfo);
 		return NULL;
 	}
 
-	while ((tok = camel_imapx_stream_token(is, &token, &len, NULL)) == IMAPX_TOK_TOKEN) {
+	while ((tok = camel_imapx_stream_token (is, &token, &len, NULL)) == IMAPX_TOK_TOKEN) {
 
 		p = token;
 		while ((c=*p))
 			*p++ = toupper(c);
 
-		switch (imapx_tokenise((gchar *) token, len)) {
+		switch (imapx_tokenise ((gchar *) token, len)) {
 			case IMAPX_ENVELOPE:
-				finfo->minfo = imapx_parse_envelope(is, NULL);
+				finfo->minfo = imapx_parse_envelope (is, NULL);
 				finfo->got |= FETCH_MINFO;
 				break;
 			case IMAPX_FLAGS:
-				imapx_parse_flags(is, &finfo->flags, &finfo->user_flags, NULL);
+				imapx_parse_flags (is, &finfo->flags, &finfo->user_flags, NULL);
 				finfo->got |= FETCH_FLAGS;
 				break;
 			case IMAPX_INTERNALDATE:
-				camel_imapx_stream_nstring(is, &token, NULL);
+				camel_imapx_stream_nstring (is, &token, NULL);
 				/* TODO: convert to camel format? */
-				finfo->date = g_strdup((gchar *) token);
+				finfo->date = g_strdup ((gchar *) token);
 				finfo->got |= FETCH_DATE;
 				break;
 			case IMAPX_RFC822_HEADER:
-				camel_imapx_stream_nstring_stream(is, &finfo->header, NULL);
+				camel_imapx_stream_nstring_stream (is, &finfo->header, NULL);
 				finfo->got |= FETCH_HEADER;
 				break;
 			case IMAPX_RFC822_TEXT:
-				camel_imapx_stream_nstring_stream(is, &finfo->text, NULL);
+				camel_imapx_stream_nstring_stream (is, &finfo->text, NULL);
 				finfo->got |= FETCH_TEXT;
 				break;
 			case IMAPX_RFC822_SIZE:
-				finfo->size = camel_imapx_stream_number(is, NULL);
+				finfo->size = camel_imapx_stream_number (is, NULL);
 				finfo->got |= FETCH_SIZE;
 				break;
 			case IMAPX_BODYSTRUCTURE:
-				finfo->cinfo = imapx_parse_body(is, NULL);
+				finfo->cinfo = imapx_parse_body (is, NULL);
 				finfo->got |= FETCH_CINFO;
 				break;
 			case IMAPX_MODSEQ:
-				finfo->modseq = imapx_parse_modseq(is, NULL);
+				finfo->modseq = imapx_parse_modseq (is, NULL);
 				finfo->got |= FETCH_MODSEQ;
 				break;
 			case IMAPX_BODY:
-				tok = camel_imapx_stream_token(is, &token, &len, NULL);
-				camel_imapx_stream_ungettoken(is, tok, token, len);
+				tok = camel_imapx_stream_token (is, &token, &len, NULL);
+				camel_imapx_stream_ungettoken (is, tok, token, len);
 				if (tok == '(') {
-					finfo->cinfo = imapx_parse_body(is, NULL);
+					finfo->cinfo = imapx_parse_body (is, NULL);
 					finfo->got |= FETCH_CINFO;
 				} else if (tok == '[') {
-					finfo->section = imapx_parse_section(is, NULL);
+					finfo->section = imapx_parse_section (is, NULL);
 					finfo->got |= FETCH_SECTION;
-					tok = camel_imapx_stream_token(is, &token, &len, NULL);
+					tok = camel_imapx_stream_token (is, &token, &len, NULL);
 					if (token[0] == '<') {
-						finfo->offset = strtoul((gchar *) token+1, NULL, 10);
+						finfo->offset = strtoul ((gchar *) token+1, NULL, 10);
 					} else {
-						camel_imapx_stream_ungettoken(is, tok, token, len);
+						camel_imapx_stream_ungettoken (is, tok, token, len);
 					}
-					camel_imapx_stream_nstring_stream(is, &finfo->body, NULL);
+					camel_imapx_stream_nstring_stream (is, &finfo->body, NULL);
 					finfo->got |= FETCH_BODY;
 				} else {
 					g_set_error (error, CAMEL_IMAPX_ERROR, 1, "unknown body response");
-					imapx_free_fetch(finfo);
+					imapx_free_fetch (finfo);
 					return NULL;
 				}
 				break;
 			case IMAPX_UID:
-				tok = camel_imapx_stream_token(is, &token, &len, NULL);
+				tok = camel_imapx_stream_token (is, &token, &len, NULL);
 				if (tok != IMAPX_TOK_INT) {
 					g_set_error (error, CAMEL_IMAPX_ERROR, 1, "uid not integer");
 				}
 
-				finfo->uid = g_strdup((gchar *) token);
+				finfo->uid = g_strdup ((gchar *) token);
 				finfo->got |= FETCH_UID;
 				break;
 			default:
-				imapx_free_fetch(finfo);
+				imapx_free_fetch (finfo);
 				g_set_error (error, CAMEL_IMAPX_ERROR, 1, "unknown body response");
 				return NULL;
 		}
@@ -1549,7 +1549,7 @@ imapx_parse_status_info (struct _CamelIMAPXStream *is, GError **error)
 	guint len;
 	guchar *token;
 
-	sinfo = g_malloc0 (sizeof(*sinfo));
+	sinfo = g_malloc0 (sizeof (*sinfo));
 
 	/* skip the folder name */
 	if (camel_imapx_stream_astring (is, &token, error)) {
@@ -1558,15 +1558,15 @@ imapx_parse_status_info (struct _CamelIMAPXStream *is, GError **error)
 	}
 	sinfo->name = camel_utf7_utf8 ((gchar *)token);
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != '(') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "parse status info: expecting '('");
 		g_free (sinfo);
 		return NULL;
 	}
 
-	while ((tok = camel_imapx_stream_token(is, &token, &len, NULL)) == IMAPX_TOK_TOKEN) {
-		switch (imapx_tokenise((gchar *) token, len)) {
+	while ((tok = camel_imapx_stream_token (is, &token, &len, NULL)) == IMAPX_TOK_TOKEN) {
+		switch (imapx_tokenise ((gchar *) token, len)) {
 			case IMAPX_MESSAGES:
 				sinfo->messages = camel_imapx_stream_number (is, NULL);
 				break;
@@ -1650,16 +1650,16 @@ imapx_parse_uids (CamelIMAPXStream *is, GError **error)
 /* rfc 2060 section 7.1 Status Responses */
 /* shoudl this start after [ or before the [? token_unget anyone? */
 struct _status_info *
-imapx_parse_status(CamelIMAPXStream *is, GError **error)
+imapx_parse_status (CamelIMAPXStream *is, GError **error)
 {
 	gint tok;
 	guint len;
 	guchar *token;
 	struct _status_info *sinfo;
 
-	sinfo = g_malloc0(sizeof(*sinfo));
+	sinfo = g_malloc0 (sizeof (*sinfo));
 
-	camel_imapx_stream_atom(is, &token, &len, NULL);
+	camel_imapx_stream_atom (is, &token, &len, NULL);
 
 	/*
 	   resp_cond_auth  ::= ("OK" / "PREAUTH") SPACE resp_text
@@ -1671,7 +1671,7 @@ imapx_parse_status(CamelIMAPXStream *is, GError **error)
 	   ;; Status condition
 	 */
 
-	sinfo->result = imapx_tokenise((gchar *) token, len);
+	sinfo->result = imapx_tokenise ((gchar *) token, len);
 	switch (sinfo->result) {
 		case IMAPX_OK:
 		case IMAPX_NO:
@@ -1685,10 +1685,10 @@ imapx_parse_status(CamelIMAPXStream *is, GError **error)
 			return NULL;
 	}
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok == '[') {
-		camel_imapx_stream_atom(is, &token, &len, NULL);
-		sinfo->condition = imapx_tokenise((gchar *) token, len);
+		camel_imapx_stream_atom (is, &token, &len, NULL);
+		sinfo->condition = imapx_tokenise ((gchar *) token, len);
 
 		/* parse any details */
 		switch (sinfo->condition) {
@@ -1700,39 +1700,39 @@ imapx_parse_status(CamelIMAPXStream *is, GError **error)
 			case IMAPX_CLOSED:
 				break;
 			case IMAPX_APPENDUID:
-				sinfo->u.appenduid.uidvalidity = camel_imapx_stream_number(is, NULL);
-				sinfo->u.appenduid.uid = camel_imapx_stream_number(is, NULL);
+				sinfo->u.appenduid.uidvalidity = camel_imapx_stream_number (is, NULL);
+				sinfo->u.appenduid.uid = camel_imapx_stream_number (is, NULL);
 				break;
 			case IMAPX_COPYUID:
-				sinfo->u.copyuid.uidvalidity = camel_imapx_stream_number(is, NULL);
+				sinfo->u.copyuid.uidvalidity = camel_imapx_stream_number (is, NULL);
 				sinfo->u.copyuid.uids = imapx_parse_uids (is, NULL);
 				sinfo->u.copyuid.copied_uids = imapx_parse_uids (is, NULL);
 				break;
 			case IMAPX_NEWNAME:
 				/* the rfc doesn't specify the bnf for this */
-				camel_imapx_stream_astring(is, &token, NULL);
-				sinfo->u.newname.oldname = g_strdup((gchar *) token);
-				camel_imapx_stream_astring(is, &token, NULL);
-				sinfo->u.newname.newname = g_strdup((gchar *) token);
+				camel_imapx_stream_astring (is, &token, NULL);
+				sinfo->u.newname.oldname = g_strdup ((gchar *) token);
+				camel_imapx_stream_astring (is, &token, NULL);
+				sinfo->u.newname.newname = g_strdup ((gchar *) token);
 				break;
 			case IMAPX_PERMANENTFLAGS:
 				/* we only care about \* for permanent flags, not user flags */
-				imapx_parse_flags(is, &sinfo->u.permanentflags, NULL, NULL);
+				imapx_parse_flags (is, &sinfo->u.permanentflags, NULL, NULL);
 				break;
 			case IMAPX_UIDVALIDITY:
-				sinfo->u.uidvalidity = camel_imapx_stream_number(is, NULL);
+				sinfo->u.uidvalidity = camel_imapx_stream_number (is, NULL);
 				break;
 			case IMAPX_UIDNEXT:
 				sinfo->u.uidnext = camel_imapx_stream_number (is, NULL);
 				break;
 			case IMAPX_UNSEEN:
-				sinfo->u.unseen = camel_imapx_stream_number(is, NULL);
+				sinfo->u.unseen = camel_imapx_stream_number (is, NULL);
 				break;
 			case IMAPX_HIGHESTMODSEQ:
-				sinfo->u.highestmodseq = camel_imapx_stream_number(is, NULL);
+				sinfo->u.highestmodseq = camel_imapx_stream_number (is, NULL);
 				break;
 			case IMAPX_CAPABILITY:
-				sinfo->u.cinfo = imapx_parse_capability(is, NULL);
+				sinfo->u.cinfo = imapx_parse_capability (is, NULL);
 				break;
 			default:
 				sinfo->condition = IMAPX_UNKNOWN;
@@ -1741,49 +1741,49 @@ imapx_parse_status(CamelIMAPXStream *is, GError **error)
 
 		/* ignore anything we dont know about */
 		do {
-			tok = camel_imapx_stream_token(is, &token, &len, NULL);
+			tok = camel_imapx_stream_token (is, &token, &len, NULL);
 			if (tok == '\n') {
 				g_set_error (error, CAMEL_IMAPX_ERROR, 1, "server response truncated");
-				imapx_free_status(sinfo);
+				imapx_free_status (sinfo);
 				return NULL;
 			}
 		} while (tok != ']');
 	} else {
-		camel_imapx_stream_ungettoken(is, tok, token, len);
+		camel_imapx_stream_ungettoken (is, tok, token, len);
 	}
 
 	/* and take the human readable response */
-	camel_imapx_stream_text(is, (guchar **)&sinfo->text, NULL);
+	camel_imapx_stream_text (is, (guchar **)&sinfo->text, NULL);
 
 	return sinfo;
 }
 
 struct _status_info *
-imapx_copy_status(struct _status_info *sinfo)
+imapx_copy_status (struct _status_info *sinfo)
 {
 	struct _status_info *out;
 
-	out = g_malloc(sizeof(*out));
-	memcpy(out, sinfo, sizeof(*out));
-	out->text = g_strdup(out->text);
+	out = g_malloc (sizeof (*out));
+	memcpy (out, sinfo, sizeof (*out));
+	out->text = g_strdup (out->text);
 	if (out->condition == IMAPX_NEWNAME) {
-		out->u.newname.oldname = g_strdup(out->u.newname.oldname);
-		out->u.newname.newname = g_strdup(out->u.newname.newname);
+		out->u.newname.oldname = g_strdup (out->u.newname.oldname);
+		out->u.newname.newname = g_strdup (out->u.newname.newname);
 	}
 
 	return out;
 }
 
 void
-imapx_free_status(struct _status_info *sinfo)
+imapx_free_status (struct _status_info *sinfo)
 {
 	if (sinfo == NULL)
 		return;
 
 	switch (sinfo->condition) {
 	case IMAPX_NEWNAME:
-		g_free(sinfo->u.newname.oldname);
-		g_free(sinfo->u.newname.newname);
+		g_free (sinfo->u.newname.oldname);
+		g_free (sinfo->u.newname.newname);
 		break;
 	case IMAPX_COPYUID:
 		g_ptr_array_free (sinfo->u.copyuid.uids, FALSE);
@@ -1791,14 +1791,14 @@ imapx_free_status(struct _status_info *sinfo)
 		break;
 	case IMAPX_CAPABILITY:
 		if (sinfo->u.cinfo)
-			imapx_free_capability(sinfo->u.cinfo);
+			imapx_free_capability (sinfo->u.cinfo);
 		break;
 	default:
 		break;
 	}
 
-	g_free(sinfo->text);
-	g_free(sinfo);
+	g_free (sinfo->text);
+	g_free (sinfo);
 }
 
 /* FIXME: use tokeniser? */
@@ -1815,7 +1815,7 @@ static struct {
 };
 
 struct _list_info *
-imapx_parse_list(CamelIMAPXStream *is, GError **error)
+imapx_parse_list (CamelIMAPXStream *is, GError **error)
 /* throws io, parse */
 {
 	gint tok, i;
@@ -1823,51 +1823,51 @@ imapx_parse_list(CamelIMAPXStream *is, GError **error)
 	guchar *token, *p, c;
 	struct _list_info * linfo;
 
-	linfo = g_malloc0(sizeof(*linfo));
+	linfo = g_malloc0 (sizeof (*linfo));
 
 	/* mailbox_list    ::= "(" #("\Marked" / "\Noinferiors" /
 	   "\Noselect" / "\Unmarked" / flag_extension) ")"
 	   SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox */
 
-	tok = camel_imapx_stream_token(is, &token, &len, NULL);
+	tok = camel_imapx_stream_token (is, &token, &len, NULL);
 	if (tok != '(') {
 		g_set_error (error, CAMEL_IMAPX_ERROR, 1, "list: expecting '('");
 		g_free (linfo);
 		return NULL;
 	}
 
-	while ((tok = camel_imapx_stream_token(is, &token, &len, NULL)) != ')') {
+	while ((tok = camel_imapx_stream_token (is, &token, &len, NULL)) != ')') {
 		if (tok == IMAPX_TOK_STRING || tok == IMAPX_TOK_TOKEN) {
 			p = token;
 			while ((c=*p))
 				*p++ = toupper(c);
 			for (i = 0; i < G_N_ELEMENTS (list_flag_table); i++)
-				if (!strcmp((gchar *) token, list_flag_table[i].name))
+				if (!strcmp ((gchar *) token, list_flag_table[i].name))
 					linfo->flags |= list_flag_table[i].flag;
 		} else {
-			imapx_free_list(linfo);
+			imapx_free_list (linfo);
 			g_set_error (error, CAMEL_IMAPX_ERROR, 1, "list: execting flag or ')'");
 			return NULL;
 		}
 	}
 
-	camel_imapx_stream_nstring(is, &token, NULL);
+	camel_imapx_stream_nstring (is, &token, NULL);
 	linfo->separator = token?*token:0;
-	camel_imapx_stream_astring(is, &token, NULL);
+	camel_imapx_stream_astring (is, &token, NULL);
 	linfo->name = camel_utf7_utf8 ((gchar *) token);
 
 	return linfo;
 }
 
 gchar *
-imapx_list_get_path(struct _list_info *li)
+imapx_list_get_path (struct _list_info *li)
 {
 	gchar *path, *p;
 	gint c;
 	const gchar *f;
 
 	if (li->separator != 0 && li->separator != '/') {
-		p = path = alloca(strlen(li->name)*3+1);
+		p = path = alloca (strlen (li->name)*3+1);
 		f = li->name;
 		while ((c = *f++ & 0xff)) {
 			if (c == li->separator)
@@ -1881,15 +1881,15 @@ imapx_list_get_path(struct _list_info *li)
 	} else
 		path = li->name;
 
-	return camel_utf7_utf8(path);
+	return camel_utf7_utf8 (path);
 }
 
 void
-imapx_free_list(struct _list_info *linfo)
+imapx_free_list (struct _list_info *linfo)
 {
 	if (linfo) {
-		g_free(linfo->name);
-		g_free(linfo);
+		g_free (linfo->name);
+		g_free (linfo);
 	}
 }
 
@@ -1965,7 +1965,7 @@ guchar imapx_specials[256] = {
 #define token_specials "\n*()[]+"
 #define notid_specials "\x20\r\n()[]+"
 
-void imapx_utils_init(void)
+void imapx_utils_init (void)
 {
 	gint i;
 	guchar v;
@@ -1979,20 +1979,20 @@ void imapx_utils_init(void)
 				if (i != '"' && i != '\\')
 					v |= IMAPX_TYPE_QUOTED_CHAR;
 			}
-			if (i> 0x20 && i <0x7f && strchr(atom_specials, i) == NULL)
+			if (i> 0x20 && i <0x7f && strchr (atom_specials, i) == NULL)
 				v |= IMAPX_TYPE_ATOM_CHAR;
-			if (strchr(token_specials, i) != NULL)
+			if (strchr (token_specials, i) != NULL)
 				v |= IMAPX_TYPE_TOKEN_CHAR;
-			if (strchr(notid_specials, i) != NULL)
+			if (strchr (notid_specials, i) != NULL)
 				v |= IMAPX_TYPE_NOTID_CHAR;
 		}
 
 		imapx_specials[i] = v;
 	}
-	camel_imapx_set_debug_flags();
+	camel_imapx_set_debug_flags ();
 }
 
-guchar imapx_is_mask(const gchar *p)
+guchar imapx_is_mask (const gchar *p)
 {
 	guchar v = 0xff;
 
@@ -2007,11 +2007,11 @@ guchar imapx_is_mask(const gchar *p)
 gchar *
 imapx_path_to_physical (const gchar *prefix, const gchar *vpath)
 {
-	GString *out = g_string_new(prefix);
+	GString *out = g_string_new (prefix);
 	const gchar *p = vpath;
 	gchar c, *res;
 
-	g_string_append_c(out, '/');
+	g_string_append_c (out, '/');
 	p = vpath;
 	while ((c = *p++)) {
 		if (c == '/') {
@@ -2019,11 +2019,11 @@ imapx_path_to_physical (const gchar *prefix, const gchar *vpath)
 			while (*p == '/')
 				p++;
 		} else
-			g_string_append_c(out, c);
+			g_string_append_c (out, c);
 	}
 
 	res = out->str;
-	g_string_free(out, FALSE);
+	g_string_free (out, FALSE);
 
 	return res;
 }
diff --git a/camel/providers/imapx/camel-imapx-utils.h b/camel/providers/imapx/camel-imapx-utils.h
index b0032c6..6722be2 100644
--- a/camel/providers/imapx/camel-imapx-utils.h
+++ b/camel/providers/imapx/camel-imapx-utils.h
@@ -57,7 +57,7 @@ typedef enum _camel_imapx_id_t {
 } camel_imapx_id_t;
 
 /* str MUST be in upper case, tokenised using gperf function */
-camel_imapx_id_t imapx_tokenise(register const gchar *str, register guint len);
+camel_imapx_id_t imapx_tokenise (register const gchar *str, register guint len);
 
 /* this flag should be part of imapfoldersummary */
 enum {
@@ -67,8 +67,8 @@ enum {
 /* ********************************************************************** */
 
 GPtrArray *imapx_parse_uids (struct _CamelIMAPXStream *is, GError **error);
-void imapx_parse_flags(struct _CamelIMAPXStream *stream, guint32 *flagsp, struct _CamelFlag **user_flagsp, GError **error);
-void imapx_write_flags(CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags, GError **error);
+void imapx_parse_flags (struct _CamelIMAPXStream *stream, guint32 *flagsp, struct _CamelFlag **user_flagsp, GError **error);
+void imapx_write_flags (CamelStream *stream, guint32 flags, struct _CamelFlag *user_flags, GError **error);
 gboolean imapx_update_message_info_flags (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags, CamelFolder *folder, gboolean unsolicited);
 void imapx_set_message_info_flags_for_new_message (CamelMessageInfo *info, guint32 server_flags, CamelFlag *server_user_flags,
 							CamelFolder *folder);
@@ -96,17 +96,17 @@ struct _capability_info {
 	GHashTable *auth_types;
 };
 
-struct _capability_info *imapx_parse_capability(struct _CamelIMAPXStream *stream, GError **error);
-void imapx_free_capability(struct _capability_info *);
+struct _capability_info *imapx_parse_capability (struct _CamelIMAPXStream *stream, GError **error);
+void imapx_free_capability (struct _capability_info *);
 
-gboolean imapx_parse_param_list(struct _CamelIMAPXStream *is, struct _camel_header_param **plist, GError **error) /* IO,PARSE */;
-struct _CamelContentDisposition *imapx_parse_ext_optional(struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
-struct _CamelMessageContentInfo *imapx_parse_body_fields(struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
-struct _camel_header_address *imapx_parse_address_list(struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
-struct _CamelMessageInfo *imapx_parse_envelope(struct _CamelIMAPXStream *is, GError **error) /* IO, PARSE */;
-struct _CamelMessageContentInfo *imapx_parse_body(struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
-gchar *imapx_parse_section(struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
-void imapx_free_body(struct _CamelMessageContentInfo *cinfo);
+gboolean imapx_parse_param_list (struct _CamelIMAPXStream *is, struct _camel_header_param **plist, GError **error) /* IO,PARSE */;
+struct _CamelContentDisposition *imapx_parse_ext_optional (struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
+struct _CamelMessageContentInfo *imapx_parse_body_fields (struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
+struct _camel_header_address *imapx_parse_address_list (struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
+struct _CamelMessageInfo *imapx_parse_envelope (struct _CamelIMAPXStream *is, GError **error) /* IO, PARSE */;
+struct _CamelMessageContentInfo *imapx_parse_body (struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
+gchar *imapx_parse_section (struct _CamelIMAPXStream *is, GError **error) /* IO,PARSE */;
+void imapx_free_body (struct _CamelMessageContentInfo *cinfo);
 
 /* ********************************************************************** */
 /* all the possible stuff we might get from a fetch request */
@@ -141,9 +141,9 @@ struct _fetch_info {
 #define FETCH_UID (1<<10)
 #define FETCH_MODSEQ (1<<11)
 
-struct _fetch_info *imapx_parse_fetch(struct _CamelIMAPXStream *is, GError **error);
-void imapx_free_fetch(struct _fetch_info *finfo);
-void imapx_dump_fetch(struct _fetch_info *finfo);
+struct _fetch_info *imapx_parse_fetch (struct _CamelIMAPXStream *is, GError **error);
+void imapx_free_fetch (struct _fetch_info *finfo);
+void imapx_dump_fetch (struct _fetch_info *finfo);
 
 /* ********************************************************************** */
 
@@ -176,9 +176,9 @@ struct _status_info {
 	gchar *text;
 };
 
-struct _status_info *imapx_parse_status(struct _CamelIMAPXStream *is, GError **error);
-struct _status_info *imapx_copy_status(struct _status_info *sinfo);
-void imapx_free_status(struct _status_info *sinfo);
+struct _status_info *imapx_parse_status (struct _CamelIMAPXStream *is, GError **error);
+struct _status_info *imapx_copy_status (struct _status_info *sinfo);
+void imapx_free_status (struct _status_info *sinfo);
 
 /* ********************************************************************** */
 /* parses the response from the status command */
@@ -205,9 +205,9 @@ struct _list_info {
 	gchar *name;
 };
 
-struct _list_info *imapx_parse_list(struct _CamelIMAPXStream *is, GError **error);
-gchar *imapx_list_get_path(struct _list_info *li);
-void imapx_free_list(struct _list_info *linfo);
+struct _list_info *imapx_parse_list (struct _CamelIMAPXStream *is, GError **error);
+gchar *imapx_list_get_path (struct _list_info *li);
+void imapx_free_list (struct _list_info *linfo);
 
 /* ********************************************************************** */
 typedef struct _IMAPXJobQueueInfo {
@@ -230,7 +230,7 @@ extern guchar imapx_specials[256];
 #define IMAPX_TYPE_TOKEN_CHAR (1<<4)
 #define IMAPX_TYPE_NOTID_CHAR (1<<5)
 
-guchar imapx_is_mask(const gchar *p);
+guchar imapx_is_mask (const gchar *p);
 
 #define imapx_is_text_char(c) ((imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_TEXT_CHAR) != 0)
 #define imapx_is_quoted_char(c) ((imapx_specials[((unsigned char)(c))&0xff] & IMAPX_TYPE_QUOTED_CHAR) != 0)
@@ -256,7 +256,7 @@ extern gint camel_imapx_debug_flags;
 
 /* ********************************************************************** */
 
-void imapx_utils_init(void);
+void imapx_utils_init (void);
 
 /* chen adds from old imap provider - place it in right place */
 gchar *imapx_path_to_physical (const gchar *prefix, const gchar *vpath);
diff --git a/camel/providers/imapx/camel-imapx-view-summary.c b/camel/providers/imapx/camel-imapx-view-summary.c
index 26ad76a..5bdf263 100644
--- a/camel/providers/imapx/camel-imapx-view-summary.c
+++ b/camel/providers/imapx/camel-imapx-view-summary.c
@@ -48,53 +48,53 @@ static CamelViewSummaryDiskClass *cmvs_parent;
  * Returns: A new CamelIMAPXViewSummary widget.
  **/
 CamelIMAPXViewSummary *
-camel_imapx_view_summary_new(const gchar *base, GError **error)
+camel_imapx_view_summary_new (const gchar *base, GError **error)
 {
-	return (CamelIMAPXViewSummary *)camel_view_summary_disk_construct(camel_object_new(camel_imapx_view_summary_get_type()), base, ex);
+	return (CamelIMAPXViewSummary *)camel_view_summary_disk_construct (camel_object_new (camel_imapx_view_summary_get_type ()), base, ex);
 }
 
 /* NB: must have write lock on folder */
-guint32 camel_imapx_view_next_uid(CamelIMAPXView *view)
+guint32 camel_imapx_view_next_uid (CamelIMAPXView *view)
 {
 #if 0
 	guint32 uid;
 
 	uid = view->nextuid++;
-	camel_view_changed((CamelView *)view);
+	camel_view_changed ((CamelView *)view);
 
 	return uid;
 #endif
 }
 
 /* NB: must have write lock on folder */
-void camel_imapx_view_last_uid(CamelIMAPXView *view, guint32 uid)
+void camel_imapx_view_last_uid (CamelIMAPXView *view, guint32 uid)
 {
 #if 0
 	uid++;
 	if (uid > view->nextuid) {
 		view->nextuid = uid;
-		camel_view_changed((CamelView *)view);
+		camel_view_changed ((CamelView *)view);
 	}
 #endif
 }
 
 static gint
-imapx_view_decode(CamelViewSummaryDisk *s, CamelView *view, CamelRecordDecoder *crd)
+imapx_view_decode (CamelViewSummaryDisk *s, CamelView *view, CamelRecordDecoder *crd)
 {
 	gint tag, ver;
 
-	((CamelViewSummaryDiskClass *)cmvs_parent)->decode(s, view, crd);
+	((CamelViewSummaryDiskClass *)cmvs_parent)->decode (s, view, crd);
 
-	if (strchr(view->vid, 1) == NULL) {
-		camel_record_decoder_reset(crd);
-		while ((tag = camel_record_decoder_next_section(crd, &ver)) != CR_SECTION_INVALID) {
+	if (strchr (view->vid, 1) == NULL) {
+		camel_record_decoder_reset (crd);
+		while ((tag = camel_record_decoder_next_section (crd, &ver)) != CR_SECTION_INVALID) {
 			switch (tag) {
 			case CVS_IMAPX_SECTION_VIEWINFO:
-				((CamelIMAPXView *)view)->uidvalidity = camel_record_decoder_int32(crd);
-				((CamelIMAPXView *)view)->permanentflags = camel_record_decoder_int32(crd);
-				((CamelIMAPXView *)view)->exists = camel_record_decoder_int32(crd);
-				((CamelIMAPXView *)view)->separator = camel_record_decoder_int8(crd);
-				((CamelIMAPXView *)view)->raw_name = g_strdup(camel_record_decoder_string(crd));
+				((CamelIMAPXView *)view)->uidvalidity = camel_record_decoder_int32 (crd);
+				((CamelIMAPXView *)view)->permanentflags = camel_record_decoder_int32 (crd);
+				((CamelIMAPXView *)view)->exists = camel_record_decoder_int32 (crd);
+				((CamelIMAPXView *)view)->separator = camel_record_decoder_int8 (crd);
+				((CamelIMAPXView *)view)->raw_name = g_strdup (camel_record_decoder_string (crd));
 				break;
 			}
 		}
@@ -104,25 +104,25 @@ imapx_view_decode(CamelViewSummaryDisk *s, CamelView *view, CamelRecordDecoder *
 }
 
 static void
-imapx_view_encode(CamelViewSummaryDisk *s, CamelView *view, CamelRecordEncoder *cre)
+imapx_view_encode (CamelViewSummaryDisk *s, CamelView *view, CamelRecordEncoder *cre)
 {
-	((CamelViewSummaryDiskClass *)cmvs_parent)->encode(s, view, cre);
+	((CamelViewSummaryDiskClass *)cmvs_parent)->encode (s, view, cre);
 
 	/* We only store extra data on the root view */
 
-	if (strchr(view->vid, 1) == NULL) {
-		camel_record_encoder_start_section(cre, CVS_IMAPX_SECTION_VIEWINFO, 0);
-		camel_record_encoder_int32(cre, ((CamelIMAPXView *)view)->uidvalidity);
-		camel_record_encoder_int32(cre, ((CamelIMAPXView *)view)->permanentflags);
-		camel_record_encoder_int32(cre, ((CamelIMAPXView *)view)->exists);
-		camel_record_encoder_int8(cre, ((CamelIMAPXView *)view)->separator);
-		camel_record_encoder_string(cre, ((CamelIMAPXView *)view)->raw_name);
-		camel_record_encoder_end_section(cre);
+	if (strchr (view->vid, 1) == NULL) {
+		camel_record_encoder_start_section (cre, CVS_IMAPX_SECTION_VIEWINFO, 0);
+		camel_record_encoder_int32 (cre, ((CamelIMAPXView *)view)->uidvalidity);
+		camel_record_encoder_int32 (cre, ((CamelIMAPXView *)view)->permanentflags);
+		camel_record_encoder_int32 (cre, ((CamelIMAPXView *)view)->exists);
+		camel_record_encoder_int8 (cre, ((CamelIMAPXView *)view)->separator);
+		camel_record_encoder_string (cre, ((CamelIMAPXView *)view)->raw_name);
+		camel_record_encoder_end_section (cre);
 	}
 }
 
 static void
-camel_imapx_view_summary_init(CamelIMAPXViewSummary *obj)
+camel_imapx_view_summary_init (CamelIMAPXViewSummary *obj)
 {
 	struct _CamelFolderSummary *s = (CamelFolderSummary *)obj;
 
@@ -130,27 +130,27 @@ camel_imapx_view_summary_init(CamelIMAPXViewSummary *obj)
 }
 
 static void
-camel_imapx_view_summary_finalize(CamelObject *obj)
+camel_imapx_view_summary_finalize (CamelObject *obj)
 {
 	/*CamelIMAPXViewSummary *mbs = CAMEL_IMAPX_VIEW_SUMMARY(obj);*/
 }
 
 static void
-camel_imapx_view_summary_class_init(CamelIMAPXViewSummaryClass *klass)
+camel_imapx_view_summary_class_init (CamelIMAPXViewSummaryClass *klass)
 {
-	((CamelViewSummaryClass *)klass)->view_sizeof = sizeof(CamelIMAPXView);
+	((CamelViewSummaryClass *)klass)->view_sizeof = sizeof (CamelIMAPXView);
 
 	((CamelViewSummaryDiskClass *)klass)->encode = imapx_view_encode;
 	((CamelViewSummaryDiskClass *)klass)->decode = imapx_view_decode;
 }
 
 CamelType
-camel_imapx_view_summary_get_type(void)
+camel_imapx_view_summary_get_type (void)
 {
 	static CamelType type = CAMEL_INVALID_TYPE;
 
 	if (type == CAMEL_INVALID_TYPE) {
-		cmvs_parent = (CamelViewSummaryDiskClass *)camel_view_summary_disk_get_type();
+		cmvs_parent = (CamelViewSummaryDiskClass *)camel_view_summary_disk_get_type ();
 		type = camel_type_register((CamelType)cmvs_parent, "CamelIMAPXViewSummary",
 					   sizeof (CamelIMAPXViewSummary),
 					   sizeof (CamelIMAPXViewSummaryClass),
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index fa07e5d..0f2b543 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -62,22 +62,22 @@ enum {
 	PROP_INDEX_BODY = 0x2400
 };
 
-static gint local_lock(CamelLocalFolder *lf, CamelLockType type, GError **error);
-static void local_unlock(CamelLocalFolder *lf);
+static gint local_lock (CamelLocalFolder *lf, CamelLockType type, GError **error);
+static void local_unlock (CamelLocalFolder *lf);
 
-static gboolean local_refresh_info(CamelFolder *folder, GError **error);
+static gboolean local_refresh_info (CamelFolder *folder, GError **error);
 
-static gboolean local_sync(CamelFolder *folder, gboolean expunge, GError **error);
-static gboolean local_expunge(CamelFolder *folder, GError **error);
+static gboolean local_sync (CamelFolder *folder, gboolean expunge, GError **error);
+static gboolean local_expunge (CamelFolder *folder, GError **error);
 
-static GPtrArray *local_search_by_expression(CamelFolder *folder, const gchar *expression, GError **error);
-static guint32 local_count_by_expression(CamelFolder *folder, const gchar *expression, GError **error);
-static GPtrArray *local_search_by_uids(CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error);
-static void local_search_free(CamelFolder *folder, GPtrArray * result);
+static GPtrArray *local_search_by_expression (CamelFolder *folder, const gchar *expression, GError **error);
+static guint32 local_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error);
+static GPtrArray *local_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error);
+static void local_search_free (CamelFolder *folder, GPtrArray * result);
 static GPtrArray * local_get_uncached_uids (CamelFolder *folder, GPtrArray * uids, GError **error);
 
-static void local_delete(CamelFolder *folder);
-static void local_rename(CamelFolder *folder, const gchar *newname);
+static void local_delete (CamelFolder *folder);
+static void local_rename (CamelFolder *folder, const gchar *newname);
 
 G_DEFINE_TYPE (CamelLocalFolder, camel_local_folder, CAMEL_TYPE_FOLDER)
 
@@ -281,7 +281,7 @@ camel_local_folder_init (CamelLocalFolder *local_folder)
 	CamelFolder *folder = CAMEL_FOLDER (local_folder);
 
 	local_folder->priv = CAMEL_LOCAL_FOLDER_GET_PRIVATE (local_folder);
-	local_folder->priv->search_lock = g_mutex_new();
+	local_folder->priv->search_lock = g_mutex_new ();
 
 	folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
 				 CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
@@ -296,7 +296,7 @@ camel_local_folder_init (CamelLocalFolder *local_folder)
 }
 
 CamelLocalFolder *
-camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error)
+camel_local_folder_construct (CamelLocalFolder *lf, guint32 flags, GError **error)
 {
 	CamelFolder *folder;
 	CamelFolderInfo *fi;
@@ -320,23 +320,23 @@ camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error
 
 	ls = CAMEL_LOCAL_STORE (parent_store);
 
-	root_dir_path = camel_local_store_get_toplevel_dir(ls);
+	root_dir_path = camel_local_store_get_toplevel_dir (ls);
 	/* strip the trailing '/' which is always present */
 	len = strlen (root_dir_path);
 	tmp = g_alloca (len + 1);
 	strcpy (tmp, root_dir_path);
-	if (len>1 && G_IS_DIR_SEPARATOR(tmp[len-1]))
+	if (len>1 && G_IS_DIR_SEPARATOR (tmp[len-1]))
 		tmp[len-1] = 0;
 
-	lf->base_path = g_strdup(root_dir_path);
+	lf->base_path = g_strdup (root_dir_path);
 
-	lf->folder_path = camel_local_store_get_full_path(ls, full_name);
+	lf->folder_path = camel_local_store_get_full_path (ls, full_name);
 	lf->summary_path = camel_local_store_get_meta_path(ls, full_name, ".ev-summary");
 	lf->index_path = camel_local_store_get_meta_path(ls, full_name, ".ibex");
 	statepath = camel_local_store_get_meta_path(ls, full_name, ".cmeta");
 
 	camel_object_set_state_filename (CAMEL_OBJECT (lf), statepath);
-	g_free(statepath);
+	g_free (statepath);
 
 	lf->flags = flags;
 
@@ -353,23 +353,23 @@ camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error
 		lf->folder_path = g_strdup (folder_path);
 	}
 #endif
-	lf->changes = camel_folder_change_info_new();
+	lf->changes = camel_folder_change_info_new ();
 
 	/* TODO: Remove the following line, it is a temporary workaround to remove
 	   the old-format 'ibex' files that might be lying around */
-	g_unlink(lf->index_path);
+	g_unlink (lf->index_path);
 
 	/* FIXME: Need to run indexing off of the setv method */
 
 	/* if we have no/invalid index file, force it */
-	forceindex = camel_text_index_check(lf->index_path) == -1;
+	forceindex = camel_text_index_check (lf->index_path) == -1;
 	if (lf->flags & CAMEL_STORE_FOLDER_BODY_INDEX) {
 		gint flag = O_RDWR|O_CREAT;
 
 		if (forceindex)
 			flag |= O_TRUNC;
 
-		lf->index = (CamelIndex *)camel_text_index_new(lf->index_path, flag);
+		lf->index = (CamelIndex *)camel_text_index_new (lf->index_path, flag);
 		if (lf->index == NULL) {
 			/* yes, this isn't fatal at all */
 			g_warning("Could not open/create index file: %s: indexing not performed", g_strerror (errno));
@@ -380,16 +380,16 @@ camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error
 	} else {
 		/* if we do have an index file, remove it (?) */
 		if (forceindex == FALSE)
-			camel_text_index_remove(lf->index_path);
+			camel_text_index_remove (lf->index_path);
 		forceindex = FALSE;
 	}
 
-	folder->summary = (CamelFolderSummary *)CAMEL_LOCAL_FOLDER_GET_CLASS(lf)->create_summary(lf, lf->summary_path, lf->folder_path, lf->index);
-	if (!(flags & CAMEL_STORE_IS_MIGRATING) && camel_local_summary_load((CamelLocalSummary *)folder->summary, forceindex, NULL) == -1) {
+	folder->summary = (CamelFolderSummary *)CAMEL_LOCAL_FOLDER_GET_CLASS (lf)->create_summary (lf, lf->summary_path, lf->folder_path, lf->index);
+	if (!(flags & CAMEL_STORE_IS_MIGRATING) && camel_local_summary_load ((CamelLocalSummary *)folder->summary, forceindex, NULL) == -1) {
 		/* ? */
-		if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, error) == 0) {
+		if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, error) == 0) {
 			/* we sync here so that any hard work setting up the folder isn't lost */
-			if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, lf->changes, error) == -1) {
+			if (camel_local_summary_sync ((CamelLocalSummary *)folder->summary, FALSE, lf->changes, error) == -1) {
 				g_object_unref (CAMEL_OBJECT (folder));
 				return NULL;
 			}
@@ -402,7 +402,7 @@ camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error
 	/* we sync here so that any hard work setting up the folder isn't lost */
 	/*if (camel_local_summary_sync((CamelLocalSummary *)folder->summary, FALSE, lf->changes, ex) == -1) {
 		g_object_unref (CAMEL_OBJECT (folder));
-		g_free(name);
+		g_free (name);
 		return NULL;
 		}*/
 #endif
@@ -416,13 +416,13 @@ camel_local_folder_construct(CamelLocalFolder *lf, guint32 flags, GError **error
 		fi->full_name = g_strdup (full_name);
 		fi->name = g_strdup (name);
 		fi->uri = camel_url_to_string (url, 0);
-		fi->unread = camel_folder_get_unread_message_count(folder);
+		fi->unread = camel_folder_get_unread_message_count (folder);
 		fi->flags = CAMEL_FOLDER_NOCHILDREN;
 
 		camel_url_free (url);
 
 		camel_store_folder_created (parent_store, fi);
-		camel_folder_info_free(fi);
+		camel_folder_info_free (fi);
 	}
 
 	return lf;
@@ -452,13 +452,13 @@ camel_local_folder_set_index_body (CamelLocalFolder *local_folder,
 
 /* lock the folder, may be called repeatedly (with matching unlock calls),
    with type the same or less than the first call */
-gint camel_local_folder_lock(CamelLocalFolder *lf, CamelLockType type, GError **error)
+gint camel_local_folder_lock (CamelLocalFolder *lf, CamelLockType type, GError **error)
 {
 	if (lf->locked > 0) {
 		/* lets be anal here - its important the code knows what its doing */
-		g_assert(lf->locktype == type || lf->locktype == CAMEL_LOCK_WRITE);
+		g_assert (lf->locktype == type || lf->locktype == CAMEL_LOCK_WRITE);
 	} else {
-		if (CAMEL_LOCAL_FOLDER_GET_CLASS(lf)->lock(lf, type, error) == -1)
+		if (CAMEL_LOCAL_FOLDER_GET_CLASS (lf)->lock (lf, type, error) == -1)
 			return -1;
 		lf->locktype = type;
 	}
@@ -469,40 +469,40 @@ gint camel_local_folder_lock(CamelLocalFolder *lf, CamelLockType type, GError **
 }
 
 /* unlock folder */
-gint camel_local_folder_unlock(CamelLocalFolder *lf)
+gint camel_local_folder_unlock (CamelLocalFolder *lf)
 {
-	g_assert(lf->locked>0);
+	g_assert (lf->locked>0);
 	lf->locked--;
 	if (lf->locked == 0)
-		CAMEL_LOCAL_FOLDER_GET_CLASS(lf)->unlock(lf);
+		CAMEL_LOCAL_FOLDER_GET_CLASS (lf)->unlock (lf);
 
 	return 0;
 }
 
 static gint
-local_lock(CamelLocalFolder *lf, CamelLockType type, GError **error)
+local_lock (CamelLocalFolder *lf, CamelLockType type, GError **error)
 {
 	return 0;
 }
 
 static void
-local_unlock(CamelLocalFolder *lf)
+local_unlock (CamelLocalFolder *lf)
 {
 	/* nothing */
 }
 
 /* for auto-check to work */
 static gboolean
-local_refresh_info(CamelFolder *folder, GError **error)
+local_refresh_info (CamelFolder *folder, GError **error)
 {
 	CamelLocalFolder *lf = (CamelLocalFolder *)folder;
 
-	if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, error) == -1)
+	if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, error) == -1)
 		return FALSE;
 
-	if (camel_folder_change_info_changed(lf->changes)) {
+	if (camel_folder_change_info_changed (lf->changes)) {
 		camel_folder_changed (folder, lf->changes);
-		camel_folder_change_info_clear(lf->changes);
+		camel_folder_change_info_clear (lf->changes);
 	}
 
 	return TRUE;
@@ -517,14 +517,14 @@ local_get_uncached_uids (CamelFolder *folder, GPtrArray * uids, GError **error)
 }
 
 static gboolean
-local_sync(CamelFolder *folder, gboolean expunge, GError **error)
+local_sync (CamelFolder *folder, gboolean expunge, GError **error)
 {
-	CamelLocalFolder *lf = CAMEL_LOCAL_FOLDER(folder);
+	CamelLocalFolder *lf = CAMEL_LOCAL_FOLDER (folder);
 	gboolean success;
 
 	d(printf("local sync '%s' , expunge=%s\n", folder->full_name, expunge?"true":"false"));
 
-	if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, error) == -1)
+	if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
 		return FALSE;
 
 	camel_object_state_write (CAMEL_OBJECT (lf));
@@ -533,18 +533,18 @@ local_sync(CamelFolder *folder, gboolean expunge, GError **error)
 	success = (camel_local_summary_sync (
 		(CamelLocalSummary *)folder->summary,
 		expunge, lf->changes, error) == 0);
-	camel_local_folder_unlock(lf);
+	camel_local_folder_unlock (lf);
 
-	if (camel_folder_change_info_changed(lf->changes)) {
+	if (camel_folder_change_info_changed (lf->changes)) {
 		camel_folder_changed (folder, lf->changes);
-		camel_folder_change_info_clear(lf->changes);
+		camel_folder_change_info_clear (lf->changes);
 	}
 
 	return success;
 }
 
 static gboolean
-local_expunge(CamelFolder *folder, GError **error)
+local_expunge (CamelFolder *folder, GError **error)
 {
 	d(printf("expunge\n"));
 
@@ -554,18 +554,18 @@ local_expunge(CamelFolder *folder, GError **error)
 }
 
 static void
-local_delete(CamelFolder *folder)
+local_delete (CamelFolder *folder)
 {
 	CamelLocalFolder *lf = (CamelLocalFolder *)folder;
 
 	if (lf->index)
-		camel_index_delete(lf->index);
+		camel_index_delete (lf->index);
 
 	CAMEL_FOLDER_CLASS (camel_local_folder_parent_class)->delete (folder);
 }
 
 static void
-local_rename(CamelFolder *folder, const gchar *newname)
+local_rename (CamelFolder *folder, const gchar *newname)
 {
 	CamelLocalFolder *lf = (CamelLocalFolder *)folder;
 	gchar *statepath;
@@ -579,100 +579,100 @@ local_rename(CamelFolder *folder, const gchar *newname)
 
 	/* Sync? */
 
-	g_free(lf->folder_path);
-	g_free(lf->summary_path);
-	g_free(lf->index_path);
+	g_free (lf->folder_path);
+	g_free (lf->summary_path);
+	g_free (lf->index_path);
 
-	lf->folder_path = camel_local_store_get_full_path(ls, newname);
+	lf->folder_path = camel_local_store_get_full_path (ls, newname);
 	lf->summary_path = camel_local_store_get_meta_path(ls, newname, ".ev-summary");
 	lf->index_path = camel_local_store_get_meta_path(ls, newname, ".ibex");
 	statepath = camel_local_store_get_meta_path(ls, newname, ".cmeta");
 	camel_object_set_state_filename (CAMEL_OBJECT (lf), statepath);
-	g_free(statepath);
+	g_free (statepath);
 
 	/* FIXME: Poke some internals, sigh */
-	camel_folder_summary_set_filename(folder->summary, lf->summary_path);
-	g_free(((CamelLocalSummary *)folder->summary)->folder_path);
-	((CamelLocalSummary *)folder->summary)->folder_path = g_strdup(lf->folder_path);
+	camel_folder_summary_set_filename (folder->summary, lf->summary_path);
+	g_free (((CamelLocalSummary *)folder->summary)->folder_path);
+	((CamelLocalSummary *)folder->summary)->folder_path = g_strdup (lf->folder_path);
 
 	CAMEL_FOLDER_CLASS (camel_local_folder_parent_class)->rename (folder, newname);
 }
 
 static GPtrArray *
-local_search_by_expression(CamelFolder *folder, const gchar *expression, GError **error)
+local_search_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
 {
-	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
+	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER (folder);
 	GPtrArray *matches;
 
-	CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_LOCK (folder, search_lock);
 
 	if (local_folder->search == NULL)
-		local_folder->search = camel_folder_search_new();
+		local_folder->search = camel_folder_search_new ();
 
-	camel_folder_search_set_folder(local_folder->search, folder);
-	camel_folder_search_set_body_index(local_folder->search, local_folder->index);
-	matches = camel_folder_search_search(local_folder->search, expression, NULL, error);
+	camel_folder_search_set_folder (local_folder->search, folder);
+	camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+	matches = camel_folder_search_search (local_folder->search, expression, NULL, error);
 
-	CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
 
 static guint32
-local_count_by_expression(CamelFolder *folder, const gchar *expression, GError **error)
+local_count_by_expression (CamelFolder *folder, const gchar *expression, GError **error)
 {
-	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
+	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER (folder);
 	gint matches;
 
-	CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_LOCK (folder, search_lock);
 
 	if (local_folder->search == NULL)
-		local_folder->search = camel_folder_search_new();
+		local_folder->search = camel_folder_search_new ();
 
-	camel_folder_search_set_folder(local_folder->search, folder);
-	camel_folder_search_set_body_index(local_folder->search, local_folder->index);
+	camel_folder_search_set_folder (local_folder->search, folder);
+	camel_folder_search_set_body_index (local_folder->search, local_folder->index);
 	matches = camel_folder_search_count (local_folder->search, expression, error);
 
-	CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
 
 static GPtrArray *
-local_search_by_uids(CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
+local_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrArray *uids, GError **error)
 {
-	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
+	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER (folder);
 	GPtrArray *matches;
 
 	if (uids->len == 0)
-		return g_ptr_array_new();
+		return g_ptr_array_new ();
 
-	CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_LOCK (folder, search_lock);
 
 	if (local_folder->search == NULL)
-		local_folder->search = camel_folder_search_new();
+		local_folder->search = camel_folder_search_new ();
 
-	camel_folder_search_set_folder(local_folder->search, folder);
-	camel_folder_search_set_body_index(local_folder->search, local_folder->index);
-	matches = camel_folder_search_search(local_folder->search, expression, uids, error);
+	camel_folder_search_set_folder (local_folder->search, folder);
+	camel_folder_search_set_body_index (local_folder->search, local_folder->index);
+	matches = camel_folder_search_search (local_folder->search, expression, uids, error);
 
-	CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
 
 static void
-local_search_free(CamelFolder *folder, GPtrArray * result)
+local_search_free (CamelFolder *folder, GPtrArray * result)
 {
-	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER(folder);
+	CamelLocalFolder *local_folder = CAMEL_LOCAL_FOLDER (folder);
 
 	/* we need to lock this free because of the way search_free_result works */
 	/* FIXME: put the lock inside search_free_result */
-	CAMEL_LOCAL_FOLDER_LOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_LOCK (folder, search_lock);
 
-	camel_folder_search_free_result(local_folder->search, result);
+	camel_folder_search_free_result (local_folder->search, result);
 
-	CAMEL_LOCAL_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_LOCAL_FOLDER_UNLOCK (folder, search_lock);
 }
 
 void
diff --git a/camel/providers/local/camel-local-provider.c b/camel/providers/local/camel-local-provider.c
index c853d84..a136703 100644
--- a/camel/providers/local/camel-local-provider.c
+++ b/camel/providers/local/camel-local-provider.c
@@ -132,7 +132,7 @@ static CamelProvider spool_directory_provider = {
 
 /* build a canonical 'path' */
 static gchar *
-make_can_path(gchar *p, gchar *o)
+make_can_path (gchar *p, gchar *o)
 {
 	gchar c, last, *start = o;
 
@@ -171,7 +171,7 @@ local_url_hash (gconstpointer v)
 	ADD_HASH (u->authmech);
 	ADD_HASH (u->host);
 	if (u->path)
-		hash ^= g_str_hash(get_can_path(u->path));
+		hash ^= g_str_hash (get_can_path (u->path));
 	ADD_HASH (u->path);
 	ADD_HASH (u->query);
 	hash ^= u->port;
@@ -196,19 +196,19 @@ check_equal (gchar *s1, gchar *s2)
 }
 
 static gint
-local_url_equal(gconstpointer v, gconstpointer v2)
+local_url_equal (gconstpointer v, gconstpointer v2)
 {
 	const CamelURL *u1 = v, *u2 = v2;
 	gchar *p1, *p2;
 
-	p1 = get_can_path(u1->path);
-	p2 = get_can_path(u2->path);
-	return check_equal(p1, p2)
-		&& check_equal(u1->protocol, u2->protocol);
+	p1 = get_can_path (u1->path);
+	p2 = get_can_path (u2->path);
+	return check_equal (p1, p2)
+		&& check_equal (u1->protocol, u2->protocol);
 }
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 #ifndef G_OS_WIN32
 	gchar *path;
@@ -216,7 +216,7 @@ camel_provider_module_init(void)
 	static gint init = 0;
 
 	if (init)
-		abort();
+		abort ();
 	init = 1;
 
 #ifndef G_OS_WIN32
@@ -225,7 +225,7 @@ camel_provider_module_init(void)
 	mh_provider.url_hash = local_url_hash;
 	mh_provider.url_equal = local_url_equal;
 	mh_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&mh_provider);
+	camel_provider_register (&mh_provider);
 #endif
 
 #ifndef G_OS_WIN32
@@ -239,7 +239,7 @@ camel_provider_module_init(void)
 	mbox_provider.url_hash = local_url_hash;
 	mbox_provider.url_equal = local_url_equal;
 	mbox_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&mbox_provider);
+	camel_provider_register (&mbox_provider);
 
 #ifndef G_OS_WIN32
 	spool_conf_entries[0].value = path;  /* default path - same as mbox; it's for both file and directory */
@@ -247,13 +247,13 @@ camel_provider_module_init(void)
 	spool_file_provider.url_hash = local_url_hash;
 	spool_file_provider.url_equal = local_url_equal;
 	spool_file_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&spool_file_provider);
+	camel_provider_register (&spool_file_provider);
 
 	spool_directory_provider.object_types[CAMEL_PROVIDER_STORE] = camel_spool_store_get_type ();
 	spool_directory_provider.url_hash = local_url_hash;
 	spool_directory_provider.url_equal = local_url_equal;
 	spool_directory_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&spool_directory_provider);
+	camel_provider_register (&spool_directory_provider);
 
 	path = getenv("MAILDIR");
 	maildir_conf_entries[0].value = path ? path : "";  /* default path */
@@ -261,6 +261,6 @@ camel_provider_module_init(void)
 	maildir_provider.url_hash = local_url_hash;
 	maildir_provider.url_equal = local_url_equal;
 	maildir_provider.translation_domain = GETTEXT_PACKAGE;
-	camel_provider_register(&maildir_provider);
+	camel_provider_register (&maildir_provider);
 #endif
 }
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index ddfdb52..5f09297 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -38,19 +38,19 @@
 #define d(x)
 
 static gboolean construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error);
-static CamelFolder *get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
-static gchar *get_name(CamelService *service, gboolean brief);
+static CamelFolder *get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
+static gchar *get_name (CamelService *service, gboolean brief);
 static CamelFolder *local_get_inbox (CamelStore *store, GError **error);
-static CamelFolder *local_get_junk(CamelStore *store, GError **error);
-static CamelFolder *local_get_trash(CamelStore *store, GError **error);
+static CamelFolder *local_get_junk (CamelStore *store, GError **error);
+static CamelFolder *local_get_trash (CamelStore *store, GError **error);
 static CamelFolderInfo *get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error);
-static gboolean delete_folder(CamelStore *store, const gchar *folder_name, GError **error);
-static gboolean rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **error);
-static CamelFolderInfo *create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error);
+static gboolean delete_folder (CamelStore *store, const gchar *folder_name, GError **error);
+static gboolean rename_folder (CamelStore *store, const gchar *old, const gchar *new, GError **error);
+static CamelFolderInfo *create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error);
 static gboolean local_can_refresh_folder (CamelStore *store, CamelFolderInfo *info, GError **error);
 
-static gchar *local_get_full_path(CamelLocalStore *lf, const gchar *full_name);
-static gchar *local_get_meta_path(CamelLocalStore *lf, const gchar *full_name, const gchar *ext);
+static gchar *local_get_full_path (CamelLocalStore *lf, const gchar *full_name);
+static gchar *local_get_meta_path (CamelLocalStore *lf, const gchar *full_name, const gchar *ext);
 
 G_DEFINE_TYPE (CamelLocalStore, camel_local_store, CAMEL_TYPE_STORE)
 
@@ -132,17 +132,17 @@ camel_local_store_get_toplevel_dir (CamelLocalStore *store)
 }
 
 static CamelFolder *
-get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **error)
+get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error)
 {
-	gint len = strlen(((CamelLocalStore *)store)->toplevel_dir);
-	gchar *path = g_alloca(len + 1);
+	gint len = strlen (((CamelLocalStore *)store)->toplevel_dir);
+	gchar *path = g_alloca (len + 1);
 	struct stat st;
 
-	strcpy(path, ((CamelLocalStore *)store)->toplevel_dir);
-	if (G_IS_DIR_SEPARATOR(path[len-1]))
+	strcpy (path, ((CamelLocalStore *)store)->toplevel_dir);
+	if (G_IS_DIR_SEPARATOR (path[len-1]))
 		path[len-1] = '\0';
 
-	if (!g_path_is_absolute(path)) {
+	if (!g_path_is_absolute (path)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -150,8 +150,8 @@ get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **
 		return NULL;
 	}
 
-	if (g_stat(path, &st) == 0) {
-		if (!S_ISDIR(st.st_mode)) {
+	if (g_stat (path, &st) == 0) {
+		if (!S_ISDIR (st.st_mode)) {
 			g_set_error (
 				error, CAMEL_STORE_ERROR,
 				CAMEL_STORE_ERROR_NO_FOLDER,
@@ -185,7 +185,7 @@ get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **
 }
 
 static CamelFolder *
-local_get_inbox(CamelStore *store, GError **error)
+local_get_inbox (CamelStore *store, GError **error)
 {
 	g_set_error (
 		error, CAMEL_STORE_ERROR,
@@ -209,7 +209,7 @@ local_get_trash (CamelStore *store,
 		gchar *state = camel_local_store_get_meta_path(store, CAMEL_VTRASH_NAME, ".cmeta");
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -231,7 +231,7 @@ local_get_junk (CamelStore *store,
 		gchar *state = camel_local_store_get_meta_path(store, CAMEL_VJUNK_NAME, ".cmeta");
 
 		camel_object_set_state_filename (object, state);
-		g_free(state);
+		g_free (state);
 		/* no defaults? */
 		camel_object_state_read (object);
 	}
@@ -277,7 +277,7 @@ create_folder (CamelStore *store,
 
 	/* This is a pretty hacky version of create folder, but should basically work */
 
-	if (!g_path_is_absolute(path)) {
+	if (!g_path_is_absolute (path)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -290,17 +290,17 @@ create_folder (CamelStore *store,
 	else
 		name = g_strdup_printf("%s/%s", path, folder_name);
 
-	if (g_stat(name, &st) == 0 || errno != ENOENT) {
+	if (g_stat (name, &st) == 0 || errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Cannot get folder: %s: %s"),
 			name, g_strerror (errno));
-		g_free(name);
+		g_free (name);
 		return NULL;
 	}
 
-	g_free(name);
+	g_free (name);
 
 	if (parent_name)
 		name = g_strdup_printf("%s/%s", parent_name, folder_name);
@@ -315,7 +315,7 @@ create_folder (CamelStore *store,
 			store, name, 0, error);
 	}
 
-	g_free(name);
+	g_free (name);
 
 	return info;
 }
@@ -329,14 +329,14 @@ xrename (const gchar *oldp,
          GError **error)
 {
 	struct stat st;
-	gchar *old = g_strconcat(prefix, oldp, suffix, NULL);
-	gchar *new = g_strconcat(prefix, newp, suffix, NULL);
+	gchar *old = g_strconcat (prefix, oldp, suffix, NULL);
+	gchar *new = g_strconcat (prefix, newp, suffix, NULL);
 	gint ret = -1;
 	gint err = 0;
 
 	d(printf("renaming %s%s to %s%s\n", oldp, suffix, newp, suffix));
 
-	if (g_stat(old, &st) == -1) {
+	if (g_stat (old, &st) == -1) {
 		if (missingok && errno == ENOENT) {
 			ret = 0;
 		} else {
@@ -344,7 +344,7 @@ xrename (const gchar *oldp,
 			ret = -1;
 		}
 	} else if ((!g_file_test (new, G_FILE_TEST_EXISTS) || g_remove (new) == 0) &&
-		   g_rename(old, new) == 0) {
+		   g_rename (old, new) == 0) {
 		ret = 0;
 	} else {
 		err = errno;
@@ -359,14 +359,14 @@ xrename (const gchar *oldp,
 			old, new, g_strerror (err));
 	}
 
-	g_free(old);
-	g_free(new);
+	g_free (old);
+	g_free (new);
 	return ret;
 }
 
 /* default implementation, rename all */
 static gboolean
-rename_folder(CamelStore *store,
+rename_folder (CamelStore *store,
               const gchar *old,
               const gchar *new,
               GError **error)
@@ -380,13 +380,13 @@ rename_folder(CamelStore *store,
 
 	d(printf("local rename folder '%s' '%s'\n", old, new));
 
-	folder = camel_object_bag_get(store->folders, old);
+	folder = camel_object_bag_get (store->folders, old);
 	if (folder && folder->index) {
-		if (camel_index_rename(folder->index, newibex) == -1)
+		if (camel_index_rename (folder->index, newibex) == -1)
 			goto ibex_failed;
 	} else {
 		/* TODO: camel_text_index_rename should find out if we have an active index itself? */
-		if (camel_text_index_rename(oldibex, newibex) == -1)
+		if (camel_text_index_rename (oldibex, newibex) == -1)
 			goto ibex_failed;
 	}
 
@@ -402,8 +402,8 @@ rename_folder(CamelStore *store,
 	if (xrename(old, new, path, "", FALSE, error))
 		goto base_failed;
 
-	g_free(newibex);
-	g_free(oldibex);
+	g_free (newibex);
+	g_free (oldibex);
 
 	if (folder)
 		g_object_unref (folder);
@@ -421,9 +421,9 @@ cmeta_failed:
 summary_failed:
 	if (folder) {
 		if (folder->index)
-			camel_index_rename(folder->index, oldibex);
+			camel_index_rename (folder->index, oldibex);
 	} else
-		camel_text_index_rename(newibex, oldibex);
+		camel_text_index_rename (newibex, oldibex);
 ibex_failed:
 	g_set_error (
 		error, G_IO_ERROR,
@@ -431,8 +431,8 @@ ibex_failed:
 		_("Could not rename '%s': %s"),
 		old, g_strerror (errno));
 
-	g_free(newibex);
-	g_free(oldibex);
+	g_free (newibex);
+	g_free (oldibex);
 
 	if (folder)
 		g_object_unref (folder);
@@ -454,17 +454,17 @@ delete_folder (CamelStore *store,
 	/* remove metadata only */
 	name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
 	str = g_strdup_printf("%s.ibex", name);
-	if (camel_text_index_remove(str) == -1 && errno != ENOENT) {
+	if (camel_text_index_remove (str) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder index file '%s': %s"),
 			str, g_strerror (errno));
-		g_free(str);
+		g_free (str);
 		g_free (name);
 		return FALSE;
 	}
-	g_free(str);
+	g_free (str);
 
 	str = NULL;
 	if ((lf = camel_store_get_folder (store, folder_name, 0, NULL))) {
@@ -500,7 +500,7 @@ delete_folder (CamelStore *store,
 	fi->full_name = g_strdup (folder_name);
 	fi->name = g_path_get_basename (folder_name);
 	fi->uri = g_strdup_printf ("%s:%s#%s", ((CamelService *) store)->url->protocol,
-				   CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
+				   CAMEL_LOCAL_STORE (store)->toplevel_dir, folder_name);
 	fi->unread = -1;
 
 	camel_store_folder_deleted (store, fi);
@@ -510,13 +510,13 @@ delete_folder (CamelStore *store,
 }
 
 static gchar *
-local_get_full_path(CamelLocalStore *ls, const gchar *full_name)
+local_get_full_path (CamelLocalStore *ls, const gchar *full_name)
 {
 	return g_strdup_printf("%s%s", ls->toplevel_dir, full_name);
 }
 
 static gchar *
-local_get_meta_path(CamelLocalStore *ls, const gchar *full_name, const gchar *ext)
+local_get_meta_path (CamelLocalStore *ls, const gchar *full_name, const gchar *ext)
 {
 	return g_strdup_printf("%s%s%s", ls->toplevel_dir, full_name, ext);
 }
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index 53268f0..28c1f9e 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -51,14 +51,14 @@ static gint summary_header_save (CamelFolderSummary *, FILE *);
 
 static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
 
-static gint local_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi);
-static gchar *local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
+static gint local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi);
+static gchar *local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
 
-static gint local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error);
-static gint local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
-static CamelMessageInfo *local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
-static gint local_summary_need_index(void);
+static gint local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error);
+static gint local_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint local_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static CamelMessageInfo *local_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
+static gint local_summary_need_index (void);
 
 G_DEFINE_TYPE (CamelLocalSummary, camel_local_summary, CAMEL_TYPE_FOLDER_SUMMARY)
 
@@ -131,18 +131,18 @@ camel_local_summary_init (CamelLocalSummary *local_summary)
 }
 
 void
-camel_local_summary_construct(CamelLocalSummary *new, const gchar *filename, const gchar *local_name, CamelIndex *index)
+camel_local_summary_construct (CamelLocalSummary *new, const gchar *filename, const gchar *local_name, CamelIndex *index)
 {
-	camel_folder_summary_set_build_content(CAMEL_FOLDER_SUMMARY(new), FALSE);
-	camel_folder_summary_set_filename(CAMEL_FOLDER_SUMMARY(new), filename);
-	new->folder_path = g_strdup(local_name);
+	camel_folder_summary_set_build_content (CAMEL_FOLDER_SUMMARY (new), FALSE);
+	camel_folder_summary_set_filename (CAMEL_FOLDER_SUMMARY (new), filename);
+	new->folder_path = g_strdup (local_name);
 	new->index = index;
 	if (index)
 		g_object_ref (index);
 }
 
 static gint
-local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error)
+local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error)
 {
 	d(g_print ("\nlocal_summary_load called \n"));
 	return camel_folder_summary_load_from_db ((CamelFolderSummary *)cls, error);
@@ -150,7 +150,7 @@ local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error)
 
 /* load/check the summary */
 gint
-camel_local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error)
+camel_local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error)
 {
 	CamelLocalSummaryClass *class;
 
@@ -158,29 +158,29 @@ camel_local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error
 
 	class = CAMEL_LOCAL_SUMMARY_GET_CLASS (cls);
 
-	if ((forceindex && class->need_index())
-	    || class->load(cls, forceindex, error) == -1) {
+	if ((forceindex && class->need_index ())
+	    || class->load (cls, forceindex, error) == -1) {
 		w(g_warning("Could not load summary: flags may be reset"));
-		camel_folder_summary_clear((CamelFolderSummary *)cls);
+		camel_folder_summary_clear ((CamelFolderSummary *)cls);
 		return -1;
 	}
 
 	return 0;
 }
 
-void camel_local_summary_check_force(CamelLocalSummary *cls)
+void camel_local_summary_check_force (CamelLocalSummary *cls)
 {
 	cls->check_force = 1;
 }
 
 gchar *
-camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *info)
+camel_local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *info)
 {
 	return CAMEL_LOCAL_SUMMARY_GET_CLASS (cls)->encode_x_evolution (cls, info);
 }
 
 gint
-camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *info)
+camel_local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *info)
 {
 	return CAMEL_LOCAL_SUMMARY_GET_CLASS (cls)->decode_x_evolution (cls, xev, info);
 }
@@ -197,69 +197,69 @@ struct _stat_info {
 };
 
 static void
-do_stat_ci(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentInfo *ci)
+do_stat_ci (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageContentInfo *ci)
 {
 	info->cicount++;
 	info->citotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4 memchunks are 1/4 byte overhead per mi */;
 	if (ci->id)
-		info->citotal += strlen(ci->id) + 4;
+		info->citotal += strlen (ci->id) + 4;
 	if (ci->description)
-		info->citotal += strlen(ci->description) + 4;
+		info->citotal += strlen (ci->description) + 4;
 	if (ci->encoding)
-		info->citotal += strlen(ci->encoding) + 4;
+		info->citotal += strlen (ci->encoding) + 4;
 	if (ci->type) {
 		CamelContentType *ct = ci->type;
 		struct _camel_header_param *param;
 
-		info->citotal += sizeof(*ct) + 4;
+		info->citotal += sizeof (*ct) + 4;
 		if (ct->type)
-			info->citotal += strlen(ct->type) + 4;
+			info->citotal += strlen (ct->type) + 4;
 		if (ct->subtype)
-			info->citotal += strlen(ct->subtype) + 4;
+			info->citotal += strlen (ct->subtype) + 4;
 		param = ct->params;
 		while (param) {
-			info->citotal += sizeof(*param) + 4;
+			info->citotal += sizeof (*param) + 4;
 			if (param->name)
-				info->citotal += strlen(param->name)+4;
+				info->citotal += strlen (param->name)+4;
 			if (param->value)
-				info->citotal += strlen(param->value)+4;
+				info->citotal += strlen (param->value)+4;
 			param = param->next;
 		}
 	}
 	ci = ci->childs;
 	while (ci) {
-		do_stat_ci(cls, info, ci);
+		do_stat_ci (cls, info, ci);
 		ci = ci->next;
 	}
 }
 
 static void
-do_stat_mi(CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *mi)
+do_stat_mi (CamelLocalSummary *cls, struct _stat_info *info, CamelMessageInfo *mi)
 {
 	info->micount++;
 	info->mitotal += ((CamelFolderSummary *)cls)->content_info_size /*+ 4*/;
 
 	if (mi->subject)
-		info->mitotal += strlen(mi->subject) + 4;
+		info->mitotal += strlen (mi->subject) + 4;
 	if (mi->to)
-		info->mitotal += strlen(mi->to) + 4;
+		info->mitotal += strlen (mi->to) + 4;
 	if (mi->from)
-		info->mitotal += strlen(mi->from) + 4;
+		info->mitotal += strlen (mi->from) + 4;
 	if (mi->cc)
-		info->mitotal += strlen(mi->cc) + 4;
+		info->mitotal += strlen (mi->cc) + 4;
 	if (mi->uid)
-		info->mitotal += strlen(mi->uid) + 4;
+		info->mitotal += strlen (mi->uid) + 4;
 
 	if (mi->references) {
-		info->mitotal += (mi->references->size-1) * sizeof(CamelSummaryMessageID) + sizeof(CamelSummaryReferences) + 4;
-		info->msgid += (mi->references->size) * sizeof(CamelSummaryMessageID);
+		info->mitotal += (mi->references->size-1) * sizeof (CamelSummaryMessageID) + sizeof (CamelSummaryReferences) + 4;
+		info->msgid += (mi->references->size) * sizeof (CamelSummaryMessageID);
 		info->msgcount += mi->references->size;
 	}
 
 	/* dont have any user flags yet */
 
 	if (mi->content) {
-		do_stat_ci(cls, info, mi->content);
+		do_stat_ci (cls, info, mi->content);
 	}
 }
 
@@ -274,7 +274,7 @@ camel_local_summary_check (CamelLocalSummary *cls,
 	gint ret;
 
 	local_summary_class = CAMEL_LOCAL_SUMMARY_GET_CLASS (cls);
-	ret = local_summary_class->check(cls, changeinfo, error);
+	ret = local_summary_class->check (cls, changeinfo, error);
 
 #ifdef DOSTATS
 	if (ret != -1) {
@@ -282,16 +282,16 @@ camel_local_summary_check (CamelLocalSummary *cls,
 		CamelFolderSummary *s = (CamelFolderSummary *)cls;
 		struct _stat_info stats = { 0 };
 
-		for (i=0;i<camel_folder_summary_count(s);i++) {
-			CamelMessageInfo *info = camel_folder_summary_index(s, i);
-			do_stat_mi(cls, &stats, info);
-			camel_message_info_free(info);
+		for (i=0;i<camel_folder_summary_count (s);i++) {
+			CamelMessageInfo *info = camel_folder_summary_index (s, i);
+			do_stat_mi (cls, &stats, info);
+			camel_message_info_free (info);
 		}
 
 		printf("\nMemory used by summary:\n\n");
 		printf("Total of %d messages\n", camel_folder_summary_count(s));
 		printf("Total: %d bytes (ave %f)\n", stats.citotal + stats.mitotal,
-		       (double)(stats.citotal+stats.mitotal)/(double)camel_folder_summary_count(s));
+		       (double)(stats.citotal+stats.mitotal)/(double)camel_folder_summary_count (s));
 		printf("Message Info: %d (ave %f)\n", stats.mitotal, (double)stats.mitotal/(double)stats.micount);
 		printf("Content Info; %d (ave %f) count %d\n", stats.citotal, (double)stats.citotal/(double)stats.cicount, stats.cicount);
 		printf("message id's: %d (ave %f) count %d\n", stats.msgid, (double)stats.msgid/(double)stats.msgcount, stats.msgcount);
@@ -343,20 +343,20 @@ camel_local_summary_add (CamelLocalSummary *cls,
  * Returns: -1 on error, otherwise the number of bytes written.
  **/
 gint
-camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus)
+camel_local_summary_write_headers (gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus)
 {
 	gint outlen = 0, len;
 	gint newfd;
 	FILE *out;
 
 	/* dum de dum, maybe the whole sync function should just use stdio for output */
-	newfd = dup(fd);
+	newfd = dup (fd);
 	if (newfd == -1)
 		return -1;
 
 	out = fdopen(newfd, "w");
 	if (out == NULL) {
-		close(newfd);
+		close (newfd);
 		errno = EINVAL;
 		return -1;
 	}
@@ -367,7 +367,7 @@ camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, con
 		    && (xstatus == NULL || strcmp(header->name, "X-Status") != 0)) {
 			len = fprintf(out, "%s:%s\n", header->name, header->value);
 			if (len == -1) {
-				fclose(out);
+				fclose (out);
 				return -1;
 			}
 			outlen += len;
@@ -378,7 +378,7 @@ camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, con
 	if (status) {
 		len = fprintf(out, "Status: %s\n", status);
 		if (len == -1) {
-			fclose(out);
+			fclose (out);
 			return -1;
 		}
 		outlen += len;
@@ -387,7 +387,7 @@ camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, con
 	if (xstatus) {
 		len = fprintf(out, "X-Status: %s\n", xstatus);
 		if (len == -1) {
-			fclose(out);
+			fclose (out);
 			return -1;
 		}
 		outlen += len;
@@ -396,7 +396,7 @@ camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, con
 	if (xevline) {
 		len = fprintf(out, "X-Evolution: %s\n", xevline);
 		if (len == -1) {
-			fclose(out);
+			fclose (out);
 			return -1;
 		}
 		outlen += len;
@@ -404,19 +404,19 @@ camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, con
 
 	len = fprintf(out, "\n");
 	if (len == -1) {
-		fclose(out);
+		fclose (out);
 		return -1;
 	}
 	outlen += len;
 
-	if (fclose(out) == -1)
+	if (fclose (out) == -1)
 		return -1;
 
 	return outlen;
 }
 
 static gint
-local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error)
+local_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error)
 {
 	/* FIXME: sync index here ? */
 	return 0;
@@ -437,7 +437,7 @@ local_summary_sync (CamelLocalSummary *cls,
 		return -1;
 	}
 
-	if (cls->index && camel_index_sync(cls->index) == -1) {
+	if (cls->index && camel_index_sync (cls->index) == -1) {
 		g_warning ("Could not sync index for %s: %s", cls->folder_path, g_strerror (errno));
 		return -1;
 	}
@@ -446,7 +446,7 @@ local_summary_sync (CamelLocalSummary *cls,
 }
 
 static gint
-local_summary_need_index(void) {
+local_summary_need_index (void) {
 	return 1;
 }
 
@@ -485,7 +485,7 @@ update_summary (CamelFolderSummary *summary, CamelMessageInfoBase *info, CamelMe
 }
 
 static CamelMessageInfo *
-local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error)
+local_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error)
 {
 	CamelLocalMessageInfo *mi;
 	CamelFolderSummary *s = (CamelFolderSummary *)cls;
@@ -493,43 +493,43 @@ local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMess
 
 	d(printf("Adding message to summary\n"));
 
-	mi = (CamelLocalMessageInfo *)camel_folder_summary_add_from_message((CamelFolderSummary *)cls, msg);
+	mi = (CamelLocalMessageInfo *)camel_folder_summary_add_from_message ((CamelFolderSummary *)cls, msg);
 	if (mi) {
 		/*d(printf("Added, uid = %s\n", mi->uid));*/
 		if (info) {
-			const CamelTag *tag = camel_message_info_user_tags(info);
-			const CamelFlag *flag = camel_message_info_user_flags(info);
+			const CamelTag *tag = camel_message_info_user_tags (info);
+			const CamelFlag *flag = camel_message_info_user_flags (info);
 
 			while (flag) {
-				camel_message_info_set_user_flag((CamelMessageInfo *)mi, flag->name, TRUE);
+				camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flag->name, TRUE);
 				flag = flag->next;
 			}
 
 			while (tag) {
-				camel_message_info_set_user_tag((CamelMessageInfo *)mi, tag->name, tag->value);
+				camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tag->name, tag->value);
 				tag = tag->next;
 			}
 
 			update_summary (s, (CamelMessageInfoBase *) mi, (CamelMessageInfoBase *) info);
-			mi->info.flags |= (camel_message_info_flags(info) & 0xffff);
+			mi->info.flags |= (camel_message_info_flags (info) & 0xffff);
 			camel_folder_summary_update_flag_cache (s, mi->info.uid, mi->info.flags);
-			mi->info.size = camel_message_info_size(info);
+			mi->info.size = camel_message_info_size (info);
 		}
 
 		/* we need to calculate the size ourselves */
 		if (mi->info.size == 0) {
-			CamelStreamNull *sn = (CamelStreamNull *)camel_stream_null_new();
+			CamelStreamNull *sn = (CamelStreamNull *)camel_stream_null_new ();
 
-			camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)sn, NULL);
+			camel_data_wrapper_write_to_stream ((CamelDataWrapper *)msg, (CamelStream *)sn, NULL);
 			mi->info.size = sn->written;
 			g_object_unref (sn);
 		}
 
 		mi->info.flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED);
-		xev = camel_local_summary_encode_x_evolution(cls, mi);
+		xev = camel_local_summary_encode_x_evolution (cls, mi);
 		camel_medium_set_header((CamelMedium *)msg, "X-Evolution", xev);
-		g_free(xev);
-		camel_folder_change_info_add_uid(ci, camel_message_info_uid(mi));
+		g_free (xev);
+		camel_folder_change_info_add_uid (ci, camel_message_info_uid (mi));
 	} else {
 		d(printf("Failed!\n"));
 		g_set_error (
@@ -540,7 +540,7 @@ local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMess
 }
 
 static gchar *
-local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
+local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
 {
 	GString *out = g_string_new("");
 	struct _camel_header_param *params = NULL;
@@ -553,8 +553,8 @@ local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessage
 
 	/* FIXME: work out what to do with uid's that aren't stored here? */
 	/* FIXME: perhaps make that a mbox folder only issue?? */
-	p = uidstr = camel_message_info_uid(mi);
-	while (*p && isdigit(*p))
+	p = uidstr = camel_message_info_uid (mi);
+	while (*p && isdigit (*p))
 		p++;
 	if (*p == 0 && sscanf (uidstr, "%u", &uid) == 1) {
 		g_string_printf (out, "%08x-%04x", uid, mi->info.flags & 0xffff);
@@ -597,7 +597,7 @@ local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessage
 }
 
 static gint
-local_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi)
+local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi)
 {
 	struct _camel_header_param *params, *scan;
 	guint32 uid, flags;
@@ -608,52 +608,52 @@ local_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, Camel
 	uidstr[0] = 0;
 
 	/* check for uid/flags */
-	header = camel_header_token_decode(xev);
+	header = camel_header_token_decode (xev);
 	if (header && strlen(header) == strlen("00000000-0000")
 	    && sscanf(header, "%08x-%04x", &uid, &flags) == 2) {
 		if (mi)
 			sprintf(uidstr, "%u", uid);
 	} else {
-		g_free(header);
+		g_free (header);
 		return -1;
 	}
-	g_free(header);
+	g_free (header);
 
 	if (mi == NULL)
 		return 0;
 
 	/* check for additional data */
-	header = strchr(xev, ';');
+	header = strchr (xev, ';');
 	if (header) {
-		params = camel_header_param_list_decode(header+1);
+		params = camel_header_param_list_decode (header+1);
 		scan = params;
 		while (scan) {
 			if (!g_ascii_strcasecmp(scan->name, "flags")) {
 				gchar **flagv = g_strsplit(scan->value, ",", 1000);
 
 				for (i=0;flagv[i];i++)
-					camel_message_info_set_user_flag((CamelMessageInfo *)mi, flagv[i], TRUE);
-				g_strfreev(flagv);
+					camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flagv[i], TRUE);
+				g_strfreev (flagv);
 			} else if (!g_ascii_strcasecmp(scan->name, "tags")) {
 				gchar **tagv = g_strsplit(scan->value, ",", 10000);
 				gchar *val;
 
 				for (i=0;tagv[i];i++) {
-					val = strchr(tagv[i], '=');
+					val = strchr (tagv[i], '=');
 					if (val) {
 						*val++ = 0;
-						camel_message_info_set_user_tag((CamelMessageInfo *)mi, tagv[i], val);
+						camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tagv[i], val);
 						val[-1]='=';
 					}
 				}
-				g_strfreev(tagv);
+				g_strfreev (tagv);
 			}
 			scan = scan->next;
 		}
-		camel_header_param_list_free(params);
+		camel_header_param_list_free (params);
 	}
 
-	mi->info.uid = camel_pstring_strdup(uidstr);
+	mi->info.uid = camel_pstring_strdup (uidstr);
 	mi->info.flags = flags;
 
 	return 0;
@@ -667,7 +667,7 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *fir)
 
 	/* We dont actually add our own headers, but version that we don't anyway */
 
-	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_from_db(s, fir) == -1)
+	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_from_db (s, fir) == -1)
 		return -1;
 
 	part = fir->bdata;
@@ -684,13 +684,13 @@ summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *fir)
 }
 
 static gint
-summary_header_load(CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s, FILE *in)
 {
 	CamelLocalSummary *cls = (CamelLocalSummary *)s;
 
 	/* We dont actually add our own headers, but version that we don't anyway */
 
-	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_load(s, in) == -1)
+	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_load (s, in) == -1)
 		return -1;
 
 	/* Legacy version, version is in summary only */
@@ -698,7 +698,7 @@ summary_header_load(CamelFolderSummary *s, FILE *in)
 		return 0;
 
 	/* otherwise load the version number */
-	return camel_file_util_decode_fixed_int32(in, (gint32 *) &cls->version);
+	return camel_file_util_decode_fixed_int32 (in, (gint32 *) &cls->version);
 }
 
 static struct _CamelFIRecord *
@@ -717,33 +717,33 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
 }
 
 static gint
-summary_header_save(CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s, FILE *out)
 {
 	/*CamelLocalSummary *cls = (CamelLocalSummary *)s;*/
 
-	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_save(s, out) == -1)
+	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_save (s, out) == -1)
 		return -1;
 
-	return camel_file_util_encode_fixed_int32(out, CAMEL_LOCAL_SUMMARY_VERSION);
+	return camel_file_util_encode_fixed_int32 (out, CAMEL_LOCAL_SUMMARY_VERSION);
 }
 
 static CamelMessageInfo *
-message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
 {
 	CamelLocalMessageInfo *mi;
 	CamelLocalSummary *cls = (CamelLocalSummary *)s;
 
-	mi = (CamelLocalMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->message_info_new_from_header(s, h);
+	mi = (CamelLocalMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->message_info_new_from_header (s, h);
 	if (mi) {
 		const gchar *xev;
 		gint doindex = FALSE;
 
 		xev = camel_header_raw_find(&h, "X-Evolution", NULL);
-		if (xev==NULL || camel_local_summary_decode_x_evolution(cls, xev, mi) == -1) {
+		if (xev==NULL || camel_local_summary_decode_x_evolution (cls, xev, mi) == -1) {
 			/* to indicate it has no xev header */
 			mi->info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
 			camel_pstring_free (mi->info.uid);
-			mi->info.uid = camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
+			mi->info.uid = camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
 
 			/* shortcut, no need to look it up in the index library */
 			doindex = TRUE;
@@ -752,12 +752,12 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 		if (cls->index
 		    && (doindex
 			|| cls->index_force
-			|| !camel_index_has_name(cls->index, camel_message_info_uid(mi)))) {
+			|| !camel_index_has_name (cls->index, camel_message_info_uid (mi)))) {
 			d(printf("Am indexing message %s\n", camel_message_info_uid(mi)));
-			camel_folder_summary_set_index(s, cls->index);
+			camel_folder_summary_set_index (s, cls->index);
 		} else {
 			d(printf("Not indexing message %s\n", camel_message_info_uid(mi)));
-			camel_folder_summary_set_index(s, NULL);
+			camel_folder_summary_set_index (s, NULL);
 		}
 	}
 
diff --git a/camel/providers/local/camel-local-summary.h b/camel/providers/local/camel-local-summary.h
index 423a93d..d5a7ce8 100644
--- a/camel/providers/local/camel-local-summary.h
+++ b/camel/providers/local/camel-local-summary.h
@@ -89,23 +89,23 @@ GType	camel_local_summary_get_type	(void);
 void	camel_local_summary_construct	(CamelLocalSummary *new, const gchar *filename, const gchar *local_name, CamelIndex *index);
 
 /* load/check the summary */
-gint camel_local_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error);
+gint camel_local_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error);
 /* check for new/removed messages */
-gint camel_local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *, GError **error);
+gint camel_local_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *, GError **error);
 /* perform a folder sync or expunge, if needed */
-gint camel_local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *, GError **error);
+gint camel_local_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *, GError **error);
 /* add a new message to the summary */
-CamelMessageInfo *camel_local_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
+CamelMessageInfo *camel_local_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
 
 /* force the next check to be a full check/rebuild */
-void camel_local_summary_check_force(CamelLocalSummary *cls);
+void camel_local_summary_check_force (CamelLocalSummary *cls);
 
 /* generate an X-Evolution header line */
-gchar *camel_local_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *info);
-gint camel_local_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *info);
+gchar *camel_local_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *info);
+gint camel_local_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *info);
 
 /* utility functions - write headers to a file with optional X-Evolution header and/or status header */
-gint camel_local_summary_write_headers(gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus);
+gint camel_local_summary_write_headers (gint fd, struct _camel_header_raw *header, const gchar *xevline, const gchar *status, const gchar *xstatus);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-maildir-folder.c b/camel/providers/local/camel-maildir-folder.c
index 624b56d..934ada9 100644
--- a/camel/providers/local/camel-maildir-folder.c
+++ b/camel/providers/local/camel-maildir-folder.c
@@ -41,10 +41,10 @@
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
-static CamelLocalSummary *maildir_create_summary(CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
+static CamelLocalSummary *maildir_create_summary (CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
 
-static gboolean maildir_append_message(CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, gchar **appended_uid, GError **error);
-static CamelMimeMessage *maildir_get_message(CamelFolder * folder, const gchar * uid, GError **error);
+static gboolean maildir_append_message (CamelFolder * folder, CamelMimeMessage * message, const CamelMessageInfo *info, gchar **appended_uid, GError **error);
+static CamelMimeMessage *maildir_get_message (CamelFolder * folder, const gchar * uid, GError **error);
 static gchar * maildir_get_filename (CamelFolder *folder, const gchar *uid, GError **error);
 static gint maildir_cmp_uids (CamelFolder *folder, const gchar *uid1, const gchar *uid2);
 static void maildir_sort_uids (CamelFolder *folder, GPtrArray *uids);
@@ -227,7 +227,7 @@ maildir_get_filename (CamelFolder *folder,
 	gchar *res;
 
 	/* get the message summary info */
-	if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
+	if ((info = camel_folder_summary_uid (folder->summary, uid)) == NULL) {
 		set_cannot_get_message_ex (
 			error, CAMEL_FOLDER_ERROR_INVALID_UID,
 			uid, lf->folder_path, _("No such message"));
@@ -262,7 +262,7 @@ maildir_get_message (CamelFolder *folder,
 		return NULL;
 
 	/* get the message summary info */
-	if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
+	if ((info = camel_folder_summary_uid (folder->summary, uid)) == NULL) {
 		set_cannot_get_message_ex (
 			error, CAMEL_FOLDER_ERROR_INVALID_UID,
 			uid, lf->folder_path, _("No such message"));
@@ -274,7 +274,7 @@ maildir_get_message (CamelFolder *folder,
 	/* what do we do if the message flags (and :info data) changes?  filename mismatch - need to recheck I guess */
 	name = g_strdup_printf("%s/cur/%s", lf->folder_path, camel_maildir_info_filename(mdi));
 
-	camel_message_info_free(info);
+	camel_message_info_free (info);
 
 	message_stream = camel_stream_fs_new_with_name (
 		name, O_RDONLY, 0, error);
@@ -285,8 +285,8 @@ maildir_get_message (CamelFolder *folder,
 		goto fail;
 	}
 
-	message = camel_mime_message_new();
-	if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream, error) == -1) {
+	message = camel_mime_message_new ();
+	if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, message_stream, error) == -1) {
 		g_prefix_error (
 			error, _("Cannot get message %s from folder %s: "),
 			uid, lf->folder_path);
diff --git a/camel/providers/local/camel-maildir-folder.h b/camel/providers/local/camel-maildir-folder.h
index d52b545..5f2915b 100644
--- a/camel/providers/local/camel-maildir-folder.h
+++ b/camel/providers/local/camel-maildir-folder.h
@@ -58,9 +58,9 @@ struct _CamelMaildirFolderClass {
 };
 
 /* public methods */
-CamelFolder *camel_maildir_folder_new(CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
+CamelFolder *camel_maildir_folder_new (CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
 
-GType camel_maildir_folder_get_type(void);
+GType camel_maildir_folder_get_type (void);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index 3b60c22..be8473e 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -39,15 +39,15 @@
 
 #define d(x)
 
-static CamelFolder *get_folder(CamelStore * store, const gchar *folder_name, guint32 flags, GError **error);
+static CamelFolder *get_folder (CamelStore * store, const gchar *folder_name, guint32 flags, GError **error);
 static CamelFolder *get_inbox (CamelStore *store, GError **error);
-static gboolean delete_folder(CamelStore * store, const gchar *folder_name, GError **error);
-static gboolean maildir_rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **error);
+static gboolean delete_folder (CamelStore * store, const gchar *folder_name, GError **error);
+static gboolean maildir_rename_folder (CamelStore *store, const gchar *old, const gchar *new, GError **error);
 
 static CamelFolderInfo * get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error);
 
-static gboolean maildir_compare_folder_name(gconstpointer a, gconstpointer b);
-static guint maildir_hash_folder_name(gconstpointer a);
+static gboolean maildir_compare_folder_name (gconstpointer a, gconstpointer b);
+static guint maildir_hash_folder_name (gconstpointer a);
 
 G_DEFINE_TYPE (CamelMaildirStore, camel_maildir_store, CAMEL_TYPE_LOCAL_STORE)
 
@@ -89,7 +89,7 @@ md_canon_name (const gchar *a)
 static guint
 maildir_hash_folder_name (gconstpointer a)
 {
-	return g_str_hash (md_canon_name(a));
+	return g_str_hash (md_canon_name (a));
 }
 
 static gboolean
@@ -110,7 +110,7 @@ get_folder (CamelStore *store,
 	struct stat st;
 	CamelFolder *folder = NULL;
 
-	folder_name = md_canon_name(folder_name);
+	folder_name = md_canon_name (folder_name);
 
 	/* Chain up to parent's get_folder() method. */
 	store_class = CAMEL_STORE_CLASS (camel_maildir_store_parent_class);
@@ -124,25 +124,25 @@ get_folder (CamelStore *store,
 
 	if (!strcmp(folder_name, ".")) {
 		/* special case "." (aka inbox), may need to be created */
-		if (g_stat(tmp, &st) != 0 || !S_ISDIR(st.st_mode)
-		    || g_stat(cur, &st) != 0 || !S_ISDIR(st.st_mode)
-		    || g_stat(new, &st) != 0 || !S_ISDIR(st.st_mode)) {
-			if (mkdir(tmp, 0700) != 0
-			    || mkdir(cur, 0700) != 0
-			    || mkdir(new, 0700) != 0) {
+		if (g_stat (tmp, &st) != 0 || !S_ISDIR (st.st_mode)
+		    || g_stat (cur, &st) != 0 || !S_ISDIR (st.st_mode)
+		    || g_stat (new, &st) != 0 || !S_ISDIR (st.st_mode)) {
+			if (mkdir (tmp, 0700) != 0
+			    || mkdir (cur, 0700) != 0
+			    || mkdir (new, 0700) != 0) {
 				g_set_error (
 					error, G_IO_ERROR,
 					g_io_error_from_errno (errno),
 					_("Cannot create folder '%s': %s"),
-					folder_name, g_strerror(errno));
-				rmdir(tmp);
-				rmdir(cur);
-				rmdir(new);
+					folder_name, g_strerror (errno));
+				rmdir (tmp);
+				rmdir (cur);
+				rmdir (new);
 				goto fail;
 			}
 		}
-		folder = camel_maildir_folder_new(store, folder_name, flags, error);
-	} else if (g_stat(name, &st) == -1) {
+		folder = camel_maildir_folder_new (store, folder_name, flags, error);
+	} else if (g_stat (name, &st) == -1) {
 		/* folder doesn't exist, see if we should create it */
 		if (errno != ENOENT) {
 			g_set_error (
@@ -157,27 +157,27 @@ get_folder (CamelStore *store,
 				_("Cannot get folder '%s': folder does not exist."),
 				folder_name);
 		} else {
-			if (mkdir(name, 0700) != 0
-			    || mkdir(tmp, 0700) != 0
-			    || mkdir(cur, 0700) != 0
-			    || mkdir(new, 0700) != 0) {
+			if (mkdir (name, 0700) != 0
+			    || mkdir (tmp, 0700) != 0
+			    || mkdir (cur, 0700) != 0
+			    || mkdir (new, 0700) != 0) {
 				g_set_error (
 					error, G_IO_ERROR,
 					g_io_error_from_errno (errno),
 					_("Cannot create folder '%s': %s"),
 					folder_name, g_strerror (errno));
-				rmdir(tmp);
-				rmdir(cur);
-				rmdir(new);
-				rmdir(name);
+				rmdir (tmp);
+				rmdir (cur);
+				rmdir (new);
+				rmdir (name);
 			} else {
-				folder = camel_maildir_folder_new(store, folder_name, flags, error);
+				folder = camel_maildir_folder_new (store, folder_name, flags, error);
 			}
 		}
-	} else if (!S_ISDIR(st.st_mode)
-		   || g_stat(tmp, &st) != 0 || !S_ISDIR(st.st_mode)
-		   || g_stat(cur, &st) != 0 || !S_ISDIR(st.st_mode)
-		   || g_stat(new, &st) != 0 || !S_ISDIR(st.st_mode)) {
+	} else if (!S_ISDIR (st.st_mode)
+		   || g_stat (tmp, &st) != 0 || !S_ISDIR (st.st_mode)
+		   || g_stat (cur, &st) != 0 || !S_ISDIR (st.st_mode)
+		   || g_stat (new, &st) != 0 || !S_ISDIR (st.st_mode)) {
 		/* folder exists, but not maildir */
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -189,13 +189,13 @@ get_folder (CamelStore *store,
 			_("Cannot create folder '%s': folder exists."),
 			folder_name);
 	} else {
-		folder = camel_maildir_folder_new(store, folder_name, flags, error);
+		folder = camel_maildir_folder_new (store, folder_name, flags, error);
 	}
 fail:
-	g_free(name);
-	g_free(tmp);
-	g_free(cur);
-	g_free(new);
+	g_free (name);
+	g_free (tmp);
+	g_free (cur);
+	g_free (new);
 
 	return folder;
 }
@@ -232,10 +232,10 @@ delete_folder (CamelStore *store,
 	cur = g_strdup_printf("%s/cur", name);
 	new = g_strdup_printf("%s/new", name);
 
-	if (g_stat(name, &st) == -1 || !S_ISDIR(st.st_mode)
-	    || g_stat(tmp, &st) == -1 || !S_ISDIR(st.st_mode)
-	    || g_stat(cur, &st) == -1 || !S_ISDIR(st.st_mode)
-	    || g_stat(new, &st) == -1 || !S_ISDIR(st.st_mode)) {
+	if (g_stat (name, &st) == -1 || !S_ISDIR (st.st_mode)
+	    || g_stat (tmp, &st) == -1 || !S_ISDIR (st.st_mode)
+	    || g_stat (cur, &st) == -1 || !S_ISDIR (st.st_mode)
+	    || g_stat (new, &st) == -1 || !S_ISDIR (st.st_mode)) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -246,36 +246,36 @@ delete_folder (CamelStore *store,
 		gint err = 0;
 
 		/* remove subdirs first - will fail if not empty */
-		if (rmdir(cur) == -1 || rmdir(new) == -1) {
+		if (rmdir (cur) == -1 || rmdir (new) == -1) {
 			err = errno;
 		} else {
 			DIR *dir;
 			struct dirent *d;
 
 			/* for tmp (only), its contents is irrelevant */
-			dir = opendir(tmp);
+			dir = opendir (tmp);
 			if (dir) {
-				while ((d=readdir(dir))) {
+				while ((d=readdir (dir))) {
 					gchar *name = d->d_name, *file;
 
 					if (!strcmp(name, ".") || !strcmp(name, ".."))
 						continue;
 					file = g_strdup_printf("%s/%s", tmp, name);
-					unlink(file);
-					g_free(file);
+					unlink (file);
+					g_free (file);
 				}
-				closedir(dir);
+				closedir (dir);
 			}
-			if (rmdir(tmp) == -1 || rmdir(name) == -1)
+			if (rmdir (tmp) == -1 || rmdir (name) == -1)
 				err = errno;
 		}
 
 		if (err != 0) {
 			/* easier just to mkdir all (and let them fail), than remember what we got to */
-			mkdir(name, 0700);
-			mkdir(cur, 0700);
-			mkdir(new, 0700);
-			mkdir(tmp, 0700);
+			mkdir (name, 0700);
+			mkdir (cur, 0700);
+			mkdir (new, 0700);
+			mkdir (tmp, 0700);
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (err),
@@ -291,10 +291,10 @@ delete_folder (CamelStore *store,
 		}
 	}
 
-	g_free(name);
-	g_free(tmp);
-	g_free(cur);
-	g_free(new);
+	g_free (name);
+	g_free (tmp);
+	g_free (cur);
+	g_free (new);
 
 	return success;
 }
@@ -318,7 +318,7 @@ maildir_rename_folder (CamelStore *store,
 
 	/* Chain up to parent's rename_folder() method. */
 	store_class = CAMEL_STORE_CLASS (camel_maildir_store_parent_class);
-	return store_class->rename_folder(store, old, new, error);
+	return store_class->rename_folder (store, old, new, error);
 }
 
 static void
@@ -328,17 +328,17 @@ fill_fi (CamelStore *store,
 {
 	CamelFolder *folder;
 
-	folder = camel_object_bag_get(store->folders, fi->full_name);
+	folder = camel_object_bag_get (store->folders, fi->full_name);
 
 	if (folder == NULL
 	    && (flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-		folder = camel_store_get_folder(store, fi->full_name, 0, NULL);
+		folder = camel_store_get_folder (store, fi->full_name, 0, NULL);
 
 	if (folder) {
 		if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-			camel_folder_refresh_info(folder, NULL);
-		fi->unread = camel_folder_get_unread_message_count(folder);
-		fi->total = camel_folder_get_message_count(folder);
+			camel_folder_refresh_info (folder, NULL);
+		fi->unread = camel_folder_get_unread_message_count (folder);
+		fi->total = camel_folder_get_message_count (folder);
 		g_object_unref (folder);
 	} else {
 		gchar *path, *folderpath;
@@ -346,17 +346,17 @@ fill_fi (CamelStore *store,
 		const gchar *root;
 
 		/* This should be fast enough not to have to test for INFO_FAST */
-		root = camel_local_store_get_toplevel_dir((CamelLocalStore *)store);
+		root = camel_local_store_get_toplevel_dir ((CamelLocalStore *)store);
 		path = g_strdup_printf("%s/%s.ev-summary", root, fi->full_name);
 		folderpath = g_strdup_printf("%s/%s", root, fi->full_name);
-		s = (CamelFolderSummary *)camel_maildir_summary_new(NULL, path, folderpath, NULL);
+		s = (CamelFolderSummary *)camel_maildir_summary_new (NULL, path, folderpath, NULL);
 		if (camel_folder_summary_header_load_from_db (s, store, fi->full_name, NULL) != -1) {
 			fi->unread = s->unread_count;
 			fi->total = s->saved_count;
 		}
 		g_object_unref (s);
-		g_free(folderpath);
-		g_free(path);
+		g_free (folderpath);
+		g_free (path);
 	}
 }
 
@@ -389,7 +389,7 @@ scan_equal (gconstpointer a, gconstpointer b)
 static void
 scan_free (gpointer k, gpointer v, gpointer d)
 {
-	g_free(k);
+	g_free (k);
 }
 
 static CamelFolderInfo *
@@ -403,11 +403,11 @@ scan_fi (CamelStore *store,
 	gchar *tmp, *cur, *new;
 	struct stat st;
 
-	fi = camel_folder_info_new();
-	fi->full_name = g_strdup(full);
-	fi->name = g_strdup(name);
-	camel_url_set_fragment(url, fi->full_name);
-	fi->uri = camel_url_to_string(url, 0);
+	fi = camel_folder_info_new ();
+	fi->full_name = g_strdup (full);
+	fi->name = g_strdup (name);
+	camel_url_set_fragment (url, fi->full_name);
+	fi->uri = camel_url_to_string (url, 0);
 
 	fi->unread = -1;
 	fi->total = -1;
@@ -422,16 +422,16 @@ scan_fi (CamelStore *store,
 	cur = g_build_filename(url->path, fi->full_name, "cur", NULL);
 	new = g_build_filename(url->path, fi->full_name, "new", NULL);
 
-	if (!(g_stat(tmp, &st) == 0 && S_ISDIR(st.st_mode)
-	      && g_stat(cur, &st) == 0 && S_ISDIR(st.st_mode)
-	      && g_stat(new, &st) == 0 && S_ISDIR(st.st_mode)))
+	if (!(g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)
+	      && g_stat (cur, &st) == 0 && S_ISDIR (st.st_mode)
+	      && g_stat (new, &st) == 0 && S_ISDIR (st.st_mode)))
 		fi->flags |= CAMEL_FOLDER_NOSELECT;
 
-	g_free(new);
-	g_free(cur);
-	g_free(tmp);
+	g_free (new);
+	g_free (cur);
+	g_free (tmp);
 
-	fill_fi(store, fi, flags);
+	fill_fi (store, fi, flags);
 
 	return fi;
 }
@@ -443,7 +443,7 @@ scan_dirs (CamelStore *store,
            CamelURL *url,
            GError **error)
 {
-	CamelDList queue = CAMEL_DLIST_INITIALISER(queue);
+	CamelDList queue = CAMEL_DLIST_INITIALISER (queue);
 	struct _scan_node *sn;
 	const gchar *root = ((CamelService *)store)->url->path;
 	gchar *tmp;
@@ -451,31 +451,31 @@ scan_dirs (CamelStore *store,
 	struct stat st;
 	gint res = -1;
 
-	visited = g_hash_table_new(scan_hash, scan_equal);
+	visited = g_hash_table_new (scan_hash, scan_equal);
 
-	sn = g_malloc0(sizeof(*sn));
+	sn = g_malloc0 (sizeof (*sn));
 	sn->fi = topfi;
-	camel_dlist_addtail(&queue, (CamelDListNode *)sn);
-	g_hash_table_insert(visited, sn, sn);
+	camel_dlist_addtail (&queue, (CamelDListNode *)sn);
+	g_hash_table_insert (visited, sn, sn);
 
-	while (!camel_dlist_empty(&queue)) {
+	while (!camel_dlist_empty (&queue)) {
 		gchar *name;
 		DIR *dir;
 		struct dirent *d;
 		CamelFolderInfo *last;
 
-		sn = (struct _scan_node *)camel_dlist_remhead(&queue);
+		sn = (struct _scan_node *)camel_dlist_remhead (&queue);
 
 		last = (CamelFolderInfo *)&sn->fi->child;
 
 		if (!strcmp(sn->fi->full_name, "."))
-			name = g_strdup(root);
+			name = g_strdup (root);
 		else
-			name = g_build_filename(root, sn->fi->full_name, NULL);
+			name = g_build_filename (root, sn->fi->full_name, NULL);
 
-		dir = opendir(name);
+		dir = opendir (name);
 		if (dir == NULL) {
-			g_free(name);
+			g_free (name);
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
@@ -484,7 +484,7 @@ scan_dirs (CamelStore *store,
 			goto fail;
 		}
 
-		while ((d = readdir(dir))) {
+		while ((d = readdir (dir))) {
 			if (strcmp(d->d_name, "tmp") == 0
 			    || strcmp(d->d_name, "cur") == 0
 			    || strcmp(d->d_name, "new") == 0
@@ -493,27 +493,27 @@ scan_dirs (CamelStore *store,
 			    || strcmp(d->d_name, "..") == 0)
 				continue;
 
-			tmp = g_build_filename(name, d->d_name, NULL);
-			if (g_stat(tmp, &st) == 0 && S_ISDIR(st.st_mode)) {
+			tmp = g_build_filename (name, d->d_name, NULL);
+			if (g_stat (tmp, &st) == 0 && S_ISDIR (st.st_mode)) {
 				struct _scan_node in;
 
 				in.dnode = st.st_dev;
 				in.inode = st.st_ino;
 
 				/* see if we've visited already */
-				if (g_hash_table_lookup(visited, &in) == NULL) {
-					struct _scan_node *snew = g_malloc(sizeof(*snew));
+				if (g_hash_table_lookup (visited, &in) == NULL) {
+					struct _scan_node *snew = g_malloc (sizeof (*snew));
 					gchar *full;
 
 					snew->dnode = in.dnode;
 					snew->inode = in.inode;
 
 					if (!strcmp(sn->fi->full_name, "."))
-						full = g_strdup(d->d_name);
+						full = g_strdup (d->d_name);
 					else
 						full = g_strdup_printf("%s/%s", sn->fi->full_name, d->d_name);
-					snew->fi = scan_fi(store, flags, url, full, d->d_name);
-					g_free(full);
+					snew->fi = scan_fi (store, flags, url, full, d->d_name);
+					g_free (full);
 
 					last->next =  snew->fi;
 					last = snew->fi;
@@ -522,22 +522,22 @@ scan_dirs (CamelStore *store,
 					sn->fi->flags &= ~CAMEL_FOLDER_NOCHILDREN;
 					sn->fi->flags |= CAMEL_FOLDER_CHILDREN;
 
-					g_hash_table_insert(visited, snew, snew);
+					g_hash_table_insert (visited, snew, snew);
 
 					if (((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) != 0))
-						camel_dlist_addtail(&queue, (CamelDListNode *)snew);
+						camel_dlist_addtail (&queue, (CamelDListNode *)snew);
 				}
 			}
-			g_free(tmp);
+			g_free (tmp);
 		}
-		closedir(dir);
+		closedir (dir);
 		g_free (name);
 	}
 
 	res = 0;
 fail:
-	g_hash_table_foreach(visited, scan_free, NULL);
-	g_hash_table_destroy(visited);
+	g_hash_table_foreach (visited, scan_free, NULL);
+	g_hash_table_destroy (visited);
 
 	return res;
 }
@@ -553,14 +553,14 @@ get_folder_info (CamelStore *store,
 	CamelURL *url;
 
 	url = camel_url_new("maildir:", NULL);
-	camel_url_set_path(url, ((CamelService *)local_store)->url->path);
+	camel_url_set_path (url, ((CamelService *)local_store)->url->path);
 
 	if (top == NULL || top[0] == 0) {
 		CamelFolderInfo *scan;
 
 		/* create a dummy "." parent inbox, use to scan, then put back at the top level */
 		fi = scan_fi(store, flags, url, ".", _("Inbox"));
-		if (scan_dirs(store, flags, fi, url, error) == -1)
+		if (scan_dirs (store, flags, fi, url, error) == -1)
 			goto fail;
 		fi->next = fi->child;
 		scan = fi->child;
@@ -575,22 +575,22 @@ get_folder_info (CamelStore *store,
 		fi = scan_fi(store, flags, url, ".", _("Inbox"));
 		fi->flags |= CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_TYPE_INBOX;
 	} else {
-		const gchar *name = strrchr(top, '/');
+		const gchar *name = strrchr (top, '/');
 
-		fi = scan_fi(store, flags, url, top, name?name+1:top);
-		if (scan_dirs(store, flags, fi, url, error) == -1)
+		fi = scan_fi (store, flags, url, top, name?name+1:top);
+		if (scan_dirs (store, flags, fi, url, error) == -1)
 			goto fail;
 	}
 
-	camel_url_free(url);
+	camel_url_free (url);
 
 	return fi;
 
 fail:
 	if (fi)
-		camel_store_free_folder_info_full(store, fi);
+		camel_store_free_folder_info_full (store, fi);
 
-	camel_url_free(url);
+	camel_url_free (url);
 
 	return NULL;
 }
diff --git a/camel/providers/local/camel-maildir-store.h b/camel/providers/local/camel-maildir-store.h
index b62a90c..50183e9 100644
--- a/camel/providers/local/camel-maildir-store.h
+++ b/camel/providers/local/camel-maildir-store.h
@@ -56,7 +56,7 @@ struct _CamelMaildirStoreClass {
 	CamelLocalStoreClass parent_class;
 };
 
-GType camel_maildir_store_get_type(void);
+GType camel_maildir_store_get_type (void);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index cb012bc..61b8e4c 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -47,17 +47,17 @@
 	((obj), CAMEL_TYPE_MAILDIR_SUMMARY, CamelMaildirSummaryPrivate))
 
 static CamelMessageInfo *message_info_migrate (CamelFolderSummary *s, FILE *in);
-static CamelMessageInfo *message_info_new_from_header(CamelFolderSummary *, struct _camel_header_raw *);
-static void message_info_free(CamelFolderSummary *, CamelMessageInfo *mi);
+static CamelMessageInfo *message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static void message_info_free (CamelFolderSummary *, CamelMessageInfo *mi);
 
-static gint maildir_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error);
-static gint maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint maildir_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
-static CamelMessageInfo *maildir_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
+static gint maildir_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error);
+static gint maildir_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint maildir_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static CamelMessageInfo *maildir_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
 
-static gchar *maildir_summary_next_uid_string(CamelFolderSummary *s);
-static gint maildir_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi);
-static gchar *maildir_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
+static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s);
+static gint maildir_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi);
+static gchar *maildir_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
 
 struct _CamelMaildirSummaryPrivate {
 	gchar *current_file;
@@ -126,8 +126,8 @@ camel_maildir_summary_init (CamelMaildirSummary *maildir_summary)
 	/* set unique file version */
 	folder_summary->version += CAMEL_MAILDIR_SUMMARY_VERSION;
 
-	if (gethostname(hostname, 256) == 0) {
-		maildir_summary->priv->hostname = g_strdup(hostname);
+	if (gethostname (hostname, 256) == 0) {
+		maildir_summary->priv->hostname = g_strdup (hostname);
 	} else {
 		maildir_summary->priv->hostname = g_strdup("localhost");
 	}
@@ -159,7 +159,7 @@ CamelMaildirSummary
 		((CamelFolderSummary *)o)->sort_by = "dreceived";
 		((CamelFolderSummary *)o)->collate = NULL;
 	}
-	camel_local_summary_construct((CamelLocalSummary *)o, filename, maildirdir, index);
+	camel_local_summary_construct ((CamelLocalSummary *)o, filename, maildirdir, index);
 	return o;
 }
 
@@ -177,7 +177,7 @@ static struct {
 };
 
 /* convert the uid + flags into a unique:info maildir format */
-gchar *camel_maildir_summary_info_to_name(const CamelMaildirMessageInfo *info)
+gchar *camel_maildir_summary_info_to_name (const CamelMaildirMessageInfo *info)
 {
 	const gchar *uid;
 	gchar *p, *buf;
@@ -193,11 +193,11 @@ gchar *camel_maildir_summary_info_to_name(const CamelMaildirMessageInfo *info)
 
 	*p = 0;
 
-	return g_strdup(buf);
+	return g_strdup (buf);
 }
 
 /* returns 0 if the info matches (or there was none), otherwise we changed it */
-gint camel_maildir_summary_name_to_info(CamelMaildirMessageInfo *info, const gchar *name)
+gint camel_maildir_summary_name_to_info (CamelMaildirMessageInfo *info, const gchar *name)
 {
 	gchar *p, c;
 	guint32 set = 0;	/* what we set */
@@ -232,12 +232,12 @@ gint camel_maildir_summary_name_to_info(CamelMaildirMessageInfo *info, const gch
 }
 
 /* for maildir, x-evolution isn't used, so dont try and get anything out of it */
-static gint maildir_summary_decode_x_evolution(CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi)
+static gint maildir_summary_decode_x_evolution (CamelLocalSummary *cls, const gchar *xev, CamelLocalMessageInfo *mi)
 {
 	return -1;
 }
 
-static gchar *maildir_summary_encode_x_evolution(CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
+static gchar *maildir_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi)
 {
 	return NULL;
 }
@@ -261,7 +261,7 @@ maildir_summary_add (CamelLocalSummary *cls,
 		cls, msg, info, changes, error);
 	if (mi) {
 		if (info) {
-			camel_maildir_info_set_filename(mi, camel_maildir_summary_info_to_name(mi));
+			camel_maildir_info_set_filename (mi, camel_maildir_summary_info_to_name (mi));
 			d(printf("Setting filename to %s\n", camel_maildir_info_filename(mi)));
 		}
 	}
@@ -270,32 +270,32 @@ maildir_summary_add (CamelLocalSummary *cls,
 }
 
 static CamelMessageInfo *
-message_info_new_from_header(CamelFolderSummary * s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary * s, struct _camel_header_raw *h)
 {
 	CamelMessageInfo *mi, *info;
 	CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
 	CamelMaildirMessageInfo *mdi;
 	const gchar *uid;
 
-	mi = ((CamelFolderSummaryClass *) camel_maildir_summary_parent_class)->message_info_new_from_header(s, h);
+	mi = ((CamelFolderSummaryClass *) camel_maildir_summary_parent_class)->message_info_new_from_header (s, h);
 	/* assign the uid and new filename */
 	if (mi) {
 		mdi = (CamelMaildirMessageInfo *)mi;
 
-		uid = camel_message_info_uid(mi);
+		uid = camel_message_info_uid (mi);
 		if (uid==NULL || uid[0] == 0)
-			mdi->info.info.uid = camel_pstring_add (camel_folder_summary_next_uid_string(s), TRUE);
+			mdi->info.info.uid = camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
 
 		/* handle 'duplicates' */
 		info = camel_folder_summary_peek_info (s, uid);
 		if (info) {
 			d(printf("already seen uid '%s', just summarising instead\n", uid));
-			camel_message_info_free(mi);
+			camel_message_info_free (mi);
 			mdi = (CamelMaildirMessageInfo *)(mi = info);
 		}
 
 		/* with maildir we know the real received date, from the filename */
-		mdi->info.info.date_received = strtoul(camel_message_info_uid(mi), NULL, 10);
+		mdi->info.info.date_received = strtoul (camel_message_info_uid (mi), NULL, 10);
 
 		if (mds->priv->current_file) {
 #if 0
@@ -303,28 +303,28 @@ message_info_new_from_header(CamelFolderSummary * s, struct _camel_header_raw *h
 			gulong uid;
 #endif
 			/* if setting from a file, grab the flags from it */
-			camel_maildir_info_set_filename(mi, g_strdup(mds->priv->current_file));
-			camel_maildir_summary_name_to_info(mdi, mds->priv->current_file);
+			camel_maildir_info_set_filename (mi, g_strdup (mds->priv->current_file));
+			camel_maildir_summary_name_to_info (mdi, mds->priv->current_file);
 
 #if 0
 			/* Actually, I dont think all this effort is worth it at all ... */
 
 			/* also, see if we can extract the next-id from tne name, and safe-if-fy ourselves against collisions */
 			/* we check for something.something_number.something */
-			p1 = strchr(mdi->filename, '.');
+			p1 = strchr (mdi->filename, '.');
 			if (p1) {
-				p2 = strchr(p1+1, '.');
-				p3 = strchr(p1+1, '_');
+				p2 = strchr (p1+1, '.');
+				p3 = strchr (p1+1, '_');
 				if (p2 && p3 && p3<p2) {
-					uid = strtoul(p3+1, &p1, 10);
+					uid = strtoul (p3+1, &p1, 10);
 					if (p1 == p2 && uid>0)
-						camel_folder_summary_set_uid(s, uid);
+						camel_folder_summary_set_uid (s, uid);
 				}
 			}
 #endif
 		} else {
 			/* if creating a file, set its name from the flags we have */
-			camel_maildir_info_set_filename(mdi, camel_maildir_summary_info_to_name(mdi));
+			camel_maildir_info_set_filename (mdi, camel_maildir_summary_info_to_name (mdi));
 			d(printf("Setting filename to %s\n", camel_maildir_info_filename(mi)));
 		}
 	}
@@ -333,16 +333,16 @@ message_info_new_from_header(CamelFolderSummary * s, struct _camel_header_raw *h
 }
 
 static void
-message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
+message_info_free (CamelFolderSummary *s, CamelMessageInfo *mi)
 {
 	CamelMaildirMessageInfo *mdi = (CamelMaildirMessageInfo *)mi;
 
-	g_free(mdi->filename);
+	g_free (mdi->filename);
 
-	((CamelFolderSummaryClass *) camel_maildir_summary_parent_class)->message_info_free(s, mi);
+	((CamelFolderSummaryClass *) camel_maildir_summary_parent_class)->message_info_free (s, mi);
 }
 
-static gchar *maildir_summary_next_uid_string(CamelFolderSummary *s)
+static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
 {
 	CamelMaildirSummary *mds = (CamelMaildirSummary *)s;
 
@@ -352,11 +352,11 @@ static gchar *maildir_summary_next_uid_string(CamelFolderSummary *s)
 	if (mds->priv->current_file) {
 		gchar *cln;
 
-		cln = strchr(mds->priv->current_file, ':');
+		cln = strchr (mds->priv->current_file, ':');
 		if (cln)
-			return g_strndup(mds->priv->current_file, cln-mds->priv->current_file);
+			return g_strndup (mds->priv->current_file, cln-mds->priv->current_file);
 		else
-			return g_strdup(mds->priv->current_file);
+			return g_strdup (mds->priv->current_file);
 	} else {
 		/* the first would probably work, but just to be safe, check for collisions */
 #if 0
@@ -366,23 +366,23 @@ static gchar *maildir_summary_next_uid_string(CamelFolderSummary *s)
 		gchar *name = NULL, *uid = NULL;
 		struct stat st;
 		gint retry = 0;
-		guint32 nextuid = camel_folder_summary_next_uid(s);
+		guint32 nextuid = camel_folder_summary_next_uid (s);
 
 		/* we use time.pid_count.hostname */
 		do {
 			if (retry > 0) {
-				g_free(name);
-				g_free(uid);
-				sleep(2);
+				g_free (name);
+				g_free (uid);
+				sleep (2);
 			}
 			uid = g_strdup_printf("%ld.%d_%u.%s", time(NULL), getpid(), nextuid, mds->priv->hostname);
 			name = g_strdup_printf("%s/tmp/%s", cls->folder_path, uid);
 			retry++;
-		} while (g_stat(name, &st) == 0 && retry<3);
+		} while (g_stat (name, &st) == 0 && retry<3);
 
 		/* I dont know what we're supposed to do if it fails to find a unique name?? */
 
-		g_free(name);
+		g_free (name);
 		return uid;
 #endif
 	}
@@ -399,10 +399,10 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 		gchar *name;
 
 		if (mds->priv->load_map
-		    && (name = g_hash_table_lookup(mds->priv->load_map, camel_message_info_uid(mi)))) {
+		    && (name = g_hash_table_lookup (mds->priv->load_map, camel_message_info_uid (mi)))) {
 			d(printf("Setting filename of %s to %s\n", camel_message_info_uid(mi), name));
-			camel_maildir_info_set_filename(mi, g_strdup(name));
-			camel_maildir_summary_name_to_info((CamelMaildirMessageInfo *)mi, name);
+			camel_maildir_info_set_filename (mi, g_strdup (name));
+			camel_maildir_summary_name_to_info ((CamelMaildirMessageInfo *)mi, name);
 		}
 	}
 
@@ -427,47 +427,47 @@ maildir_summary_load (CamelLocalSummary *cls,
 
 	d(printf("pre-loading uid <> filename map\n"));
 
-	dir = opendir(cur);
+	dir = opendir (cur);
 	if (dir == NULL) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Cannot open maildir directory path: %s: %s"),
 			cls->folder_path, g_strerror (errno));
-		g_free(cur);
+		g_free (cur);
 		return -1;
 	}
 
-	mds->priv->load_map = g_hash_table_new(g_str_hash, g_str_equal);
-	pool = camel_mempool_new(1024, 512, CAMEL_MEMPOOL_ALIGN_BYTE);
+	mds->priv->load_map = g_hash_table_new (g_str_hash, g_str_equal);
+	pool = camel_mempool_new (1024, 512, CAMEL_MEMPOOL_ALIGN_BYTE);
 
-	while ((d = readdir(dir))) {
+	while ((d = readdir (dir))) {
 		if (d->d_name[0] == '.')
 			continue;
 
 		/* map the filename -> uid */
-		uid = strchr(d->d_name, ':');
+		uid = strchr (d->d_name, ':');
 		if (uid) {
 			gint len = uid-d->d_name;
-			uid = camel_mempool_alloc(pool, len+1);
-			memcpy(uid, d->d_name, len);
+			uid = camel_mempool_alloc (pool, len+1);
+			memcpy (uid, d->d_name, len);
 			uid[len] = 0;
-			g_hash_table_insert(mds->priv->load_map, uid, camel_mempool_strdup(pool, d->d_name));
+			g_hash_table_insert (mds->priv->load_map, uid, camel_mempool_strdup (pool, d->d_name));
 		} else {
-			uid = camel_mempool_strdup(pool, d->d_name);
-			g_hash_table_insert(mds->priv->load_map, uid, uid);
+			uid = camel_mempool_strdup (pool, d->d_name);
+			g_hash_table_insert (mds->priv->load_map, uid, uid);
 		}
 	}
-	closedir(dir);
-	g_free(cur);
+	closedir (dir);
+	g_free (cur);
 
 	/* Chain up to parent's load() method. */
 	local_summary_class = CAMEL_LOCAL_SUMMARY_CLASS (camel_maildir_summary_parent_class);
 	ret = local_summary_class->load (cls, forceindex, error);
 
-	g_hash_table_destroy(mds->priv->load_map);
+	g_hash_table_destroy (mds->priv->load_map);
 	mds->priv->load_map = NULL;
-	camel_mempool_destroy(pool);
+	camel_mempool_destroy (pool);
 
 	return ret;
 }
@@ -482,27 +482,27 @@ camel_maildir_summary_add (CamelLocalSummary *cls, const gchar *name, gint force
 
 	d(printf("summarising: %s\n", name));
 
-	fd = open(filename, O_RDONLY|O_LARGEFILE);
+	fd = open (filename, O_RDONLY|O_LARGEFILE);
 	if (fd == -1) {
 		g_warning ("Cannot summarise/index: %s: %s", filename, g_strerror (errno));
-		g_free(filename);
+		g_free (filename);
 		return -1;
 	}
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, FALSE);
-	camel_mime_parser_init_with_fd(mp, fd);
-	if (cls->index && (forceindex || !camel_index_has_name(cls->index, name))) {
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_scan_from (mp, FALSE);
+	camel_mime_parser_init_with_fd (mp, fd);
+	if (cls->index && (forceindex || !camel_index_has_name (cls->index, name))) {
 		d(printf("forcing indexing of message content\n"));
-		camel_folder_summary_set_index((CamelFolderSummary *)maildirs, cls->index);
+		camel_folder_summary_set_index ((CamelFolderSummary *)maildirs, cls->index);
 	} else {
-		camel_folder_summary_set_index((CamelFolderSummary *)maildirs, NULL);
+		camel_folder_summary_set_index ((CamelFolderSummary *)maildirs, NULL);
 	}
 	maildirs->priv->current_file = (gchar *)name;
-	camel_folder_summary_add_from_parser((CamelFolderSummary *)maildirs, mp);
+	camel_folder_summary_add_from_parser ((CamelFolderSummary *)maildirs, mp);
 	g_object_unref (mp);
 	maildirs->priv->current_file = NULL;
-	camel_folder_summary_set_index((CamelFolderSummary *)maildirs, NULL);
-	g_free(filename);
+	camel_folder_summary_set_index ((CamelFolderSummary *)maildirs, NULL);
+	g_free (filename);
 	return 0;
 }
 
@@ -512,19 +512,19 @@ struct _remove_data {
 };
 
 static void
-remove_summary(gchar *key, CamelMessageInfo *info, struct _remove_data *rd)
+remove_summary (gchar *key, CamelMessageInfo *info, struct _remove_data *rd)
 {
 	d(printf("removing message %s from summary\n", key));
 	if (rd->cls->index)
-		camel_index_delete_name(rd->cls->index, camel_message_info_uid(info));
+		camel_index_delete_name (rd->cls->index, camel_message_info_uid (info));
 	if (rd->changes)
-		camel_folder_change_info_remove_uid(rd->changes, key);
-	camel_folder_summary_remove((CamelFolderSummary *)rd->cls, info);
-	camel_message_info_free(info);
+		camel_folder_change_info_remove_uid (rd->changes, key);
+	camel_folder_summary_remove ((CamelFolderSummary *)rd->cls, info);
+	camel_message_info_free (info);
 }
 
 static gint
-maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GError **error)
+maildir_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GError **error)
 {
 	DIR *dir;
 	struct dirent *d;
@@ -550,43 +550,43 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GE
 
 	/* scan the directory, check for mail files not in the index, or index entries that
 	   no longer exist */
-	dir = opendir(cur);
+	dir = opendir (cur);
 	if (dir == NULL) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Cannot open maildir directory path: %s: %s"),
 			cls->folder_path, g_strerror (errno));
-		g_free(cur);
-		g_free(new);
-		camel_operation_end(NULL);
+		g_free (cur);
+		g_free (new);
+		camel_operation_end (NULL);
 		g_mutex_unlock (((CamelMaildirSummary *) cls)->priv->summary_lock);
 		return -1;
 	}
 
 	/* keeps track of all uid's that have not been processed */
-	left = g_hash_table_new(g_str_hash, g_str_equal);
+	left = g_hash_table_new (g_str_hash, g_str_equal);
 	camel_folder_summary_prepare_fetch_all (s, error);
 	count = camel_folder_summary_count (s);
 	forceindex = count == 0;
 	for (i=0;i<count;i++) {
-		info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
+		info = camel_folder_summary_index ((CamelFolderSummary *)cls, i);
 		if (info) {
-			g_hash_table_insert(left, (gchar *)camel_message_info_uid(info), info);
+			g_hash_table_insert (left, (gchar *)camel_message_info_uid (info), info);
 		}
 	}
 
 	/* joy, use this to pre-count the total, so we can report progress meaningfully */
 	total = 0;
 	count = 0;
-	while ((d = readdir(dir)))
+	while ((d = readdir (dir)))
 		total++;
-	rewinddir(dir);
+	rewinddir (dir);
 
-	while ((d = readdir(dir))) {
+	while ((d = readdir (dir))) {
 		gint pc = count * 100 / total;
 
-		camel_operation_progress(NULL, pc);
+		camel_operation_progress (NULL, pc);
 		count++;
 
 		/* FIXME: also run stat to check for regular file */
@@ -595,66 +595,66 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GE
 			continue;
 
 		/* map the filename -> uid */
-		uid = strchr(d->d_name, ':');
+		uid = strchr (d->d_name, ':');
 		if (uid)
-			uid = g_strndup(d->d_name, uid-d->d_name);
+			uid = g_strndup (d->d_name, uid-d->d_name);
 		else
-			uid = g_strdup(d->d_name);
+			uid = g_strdup (d->d_name);
 
-		info = g_hash_table_lookup(left, uid);
+		info = g_hash_table_lookup (left, uid);
 		if (info) {
-			camel_message_info_free(info);
-			g_hash_table_remove(left, uid);
+			camel_message_info_free (info);
+			g_hash_table_remove (left, uid);
 		}
 
-		info = camel_folder_summary_uid((CamelFolderSummary *)cls, uid);
+		info = camel_folder_summary_uid ((CamelFolderSummary *)cls, uid);
 		if (info == NULL) {
 			/* must be a message incorporated by another client, this is not a 'recent' uid */
 			if (camel_maildir_summary_add (cls, d->d_name, forceindex) == 0)
 				if (changes)
-					camel_folder_change_info_add_uid(changes, uid);
+					camel_folder_change_info_add_uid (changes, uid);
 		} else {
 			const gchar *filename;
 
-			if (cls->index && (!camel_index_has_name(cls->index, uid))) {
+			if (cls->index && (!camel_index_has_name (cls->index, uid))) {
 				/* message_info_new will handle duplicates */
-				camel_maildir_summary_add(cls, d->d_name, forceindex);
+				camel_maildir_summary_add (cls, d->d_name, forceindex);
 			}
 
 			mdi = (CamelMaildirMessageInfo *)info;
-			filename = camel_maildir_info_filename(mdi);
+			filename = camel_maildir_info_filename (mdi);
 			/* TODO: only store the extension in the mdi->filename struct, not the whole lot */
-			if (filename == NULL || strcmp(filename, d->d_name) != 0) {
-				g_free(mdi->filename);
-				mdi->filename = g_strdup(d->d_name);
+			if (filename == NULL || strcmp (filename, d->d_name) != 0) {
+				g_free (mdi->filename);
+				mdi->filename = g_strdup (d->d_name);
 			}
-			camel_message_info_free(info);
+			camel_message_info_free (info);
 		}
-		g_free(uid);
+		g_free (uid);
 	}
-	closedir(dir);
-	g_hash_table_foreach(left, (GHFunc)remove_summary, &rd);
-	g_hash_table_destroy(left);
+	closedir (dir);
+	g_hash_table_foreach (left, (GHFunc)remove_summary, &rd);
+	g_hash_table_destroy (left);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	camel_operation_start(NULL, _("Checking for new messages"));
 
 	/* now, scan new for new messages, and copy them to cur, and so forth */
-	dir = opendir(new);
+	dir = opendir (new);
 	if (dir != NULL) {
 		total = 0;
 		count = 0;
-		while ((d = readdir(dir)))
+		while ((d = readdir (dir)))
 			total++;
-		rewinddir(dir);
+		rewinddir (dir);
 
-		while ((d = readdir(dir))) {
+		while ((d = readdir (dir))) {
 			gchar *name, *newname, *destname, *destfilename;
 			gchar *src, *dest;
 			gint pc = count * 100 / total;
 
-			camel_operation_progress(NULL, pc);
+			camel_operation_progress (NULL, pc);
 			count++;
 
 			name = d->d_name;
@@ -662,9 +662,9 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GE
 				continue;
 
 			/* already in summary?  shouldn't happen, but just incase ... */
-			if ((info = camel_folder_summary_uid((CamelFolderSummary *)cls, name))) {
-				camel_message_info_free(info);
-				newname = destname = camel_folder_summary_next_uid_string(s);
+			if ((info = camel_folder_summary_uid ((CamelFolderSummary *)cls, name))) {
+				camel_message_info_free (info);
+				newname = destname = camel_folder_summary_next_uid_string (s);
 			} else {
 				gchar *nm;
 				newname = g_strdup (name);
@@ -684,8 +684,8 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GE
 			if (g_rename (src, dest) == 0) {
 				camel_maildir_summary_add (cls, destfilename, forceindex);
 				if (changes) {
-					camel_folder_change_info_add_uid(changes, destname);
-					camel_folder_change_info_recent_uid(changes, destname);
+					camel_folder_change_info_add_uid (changes, destname);
+					camel_folder_change_info_recent_uid (changes, destname);
 				}
 			} else {
 				/* else?  we should probably care about failures, but wont */
@@ -693,17 +693,17 @@ maildir_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GE
 			}
 
 			/* c strings are painful to work with ... */
-			g_free(destfilename);
-			g_free(newname);
-			g_free(src);
-			g_free(dest);
+			g_free (destfilename);
+			g_free (newname);
+			g_free (src);
+			g_free (dest);
 		}
-		camel_operation_end(NULL);
-		closedir(dir);
+		camel_operation_end (NULL);
+		closedir (dir);
 	}
 
-	g_free(new);
-	g_free(cur);
+	g_free (new);
+	g_free (cur);
 
 	g_mutex_unlock (((CamelMaildirSummary *) cls)->priv->summary_lock);
 
@@ -726,66 +726,66 @@ maildir_summary_sync (CamelLocalSummary *cls,
 
 	d(printf("summary_sync(expunge=%s)\n", expunge?"true":"false"));
 
-	if (camel_local_summary_check(cls, changes, error) == -1)
+	if (camel_local_summary_check (cls, changes, error) == -1)
 		return -1;
 
 	camel_operation_start(NULL, _("Storing folder"));
 
 	camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *)cls, error);
-	count = camel_folder_summary_count((CamelFolderSummary *)cls);
+	count = camel_folder_summary_count ((CamelFolderSummary *)cls);
 	for (i=count-1;i>=0;i--) {
-		camel_operation_progress(NULL, (count-i)*100/count);
+		camel_operation_progress (NULL, (count-i)*100/count);
 
-		info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
+		info = camel_folder_summary_index ((CamelFolderSummary *)cls, i);
 		mdi = (CamelMaildirMessageInfo *)info;
 		if (mdi && (mdi->info.info.flags & CAMEL_MESSAGE_DELETED) && expunge) {
 			name = g_strdup_printf("%s/cur/%s", cls->folder_path, camel_maildir_info_filename(mdi));
 			d(printf("deleting %s\n", name));
-			if (unlink(name) == 0 || errno==ENOENT) {
+			if (unlink (name) == 0 || errno==ENOENT) {
 
 				/* FIXME: put this in folder_summary::remove()? */
 				if (cls->index)
-					camel_index_delete_name(cls->index, camel_message_info_uid(info));
+					camel_index_delete_name (cls->index, camel_message_info_uid (info));
 
-				camel_folder_change_info_remove_uid(changes, camel_message_info_uid(info));
-				camel_folder_summary_remove((CamelFolderSummary *)cls, info);
+				camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info));
+				camel_folder_summary_remove ((CamelFolderSummary *)cls, info);
 			}
-			g_free(name);
+			g_free (name);
 		} else if (mdi && (mdi->info.info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
-			gchar *newname = camel_maildir_summary_info_to_name(mdi);
+			gchar *newname = camel_maildir_summary_info_to_name (mdi);
 			gchar *dest;
 
 			/* do we care about additional metainfo stored inside the message? */
 			/* probably should all go in the filename? */
 
 			/* have our flags/ i.e. name changed? */
-			if (strcmp(newname, camel_maildir_info_filename(mdi))) {
+			if (strcmp (newname, camel_maildir_info_filename (mdi))) {
 				name = g_strdup_printf("%s/cur/%s", cls->folder_path, camel_maildir_info_filename(mdi));
 				dest = g_strdup_printf("%s/cur/%s", cls->folder_path, newname);
 				g_rename (name, dest);
-				if (g_stat(dest, &st) == -1) {
+				if (g_stat (dest, &st) == -1) {
 					/* we'll assume it didn't work, but dont change anything else */
-					g_free(newname);
+					g_free (newname);
 				} else {
 					/* TODO: If this is made mt-safe, then this code could be a problem, since
 					   the estrv is being modified.
 					   Sigh, this may mean the maildir name has to be cached another way */
-					g_free(mdi->filename);
+					g_free (mdi->filename);
 					mdi->filename = newname;
 				}
-				g_free(name);
-				g_free(dest);
+				g_free (name);
+				g_free (dest);
 			} else {
-				g_free(newname);
+				g_free (newname);
 			}
 
 			/* strip FOLDER_MESSAGE_FLAGED, etc */
 			mdi->info.info.flags &= 0xffff;
 		}
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	/* Chain up to parent's sync() method. */
 	local_summary_class = CAMEL_LOCAL_SUMMARY_CLASS (camel_maildir_summary_parent_class);
diff --git a/camel/providers/local/camel-maildir-summary.h b/camel/providers/local/camel-maildir-summary.h
index 5523062..f680339 100644
--- a/camel/providers/local/camel-maildir-summary.h
+++ b/camel/providers/local/camel-maildir-summary.h
@@ -76,8 +76,8 @@ GType	 camel_maildir_summary_get_type	(void);
 CamelMaildirSummary	*camel_maildir_summary_new	(struct _CamelFolder *folder, const gchar *filename, const gchar *maildirdir, CamelIndex *index);
 
 /* convert some info->flags to/from the messageinfo */
-gchar *camel_maildir_summary_info_to_name(const CamelMaildirMessageInfo *info);
-gint camel_maildir_summary_name_to_info(CamelMaildirMessageInfo *info, const gchar *name);
+gchar *camel_maildir_summary_info_to_name (const CamelMaildirMessageInfo *info);
+gint camel_maildir_summary_name_to_info (CamelMaildirMessageInfo *info, const gchar *name);
 
 /* TODO: could proably use get_string stuff */
 #define camel_maildir_info_filename(x) (((CamelMaildirMessageInfo *)x)->filename)
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c
index f16a5fb..0db0e54 100644
--- a/camel/providers/local/camel-mbox-folder.c
+++ b/camel/providers/local/camel-mbox-folder.c
@@ -46,12 +46,12 @@
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
-static gint mbox_lock(CamelLocalFolder *lf, CamelLockType type, GError **error);
-static void mbox_unlock(CamelLocalFolder *lf);
+static gint mbox_lock (CamelLocalFolder *lf, CamelLockType type, GError **error);
+static void mbox_unlock (CamelLocalFolder *lf);
 
-static gboolean mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info,	gchar **appended_uid, GError **error);
-static CamelMimeMessage *mbox_get_message(CamelFolder *folder, const gchar * uid, GError **error);
-static CamelLocalSummary *mbox_create_summary(CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
+static gboolean mbox_append_message (CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo * info,	gchar **appended_uid, GError **error);
+static CamelMimeMessage *mbox_get_message (CamelFolder *folder, const gchar * uid, GError **error);
+static CamelLocalSummary *mbox_create_summary (CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
 static gchar * mbox_get_filename (CamelFolder *folder, const gchar *uid, GError **error);
 static gint mbox_cmp_uids (CamelFolder *folder, const gchar *uid1, const gchar *uid2);
 static void mbox_sort_uids (CamelFolder *folder, GPtrArray *uids);
@@ -84,7 +84,7 @@ camel_mbox_folder_init (CamelMboxFolder *mbox_folder)
 }
 
 CamelFolder *
-camel_mbox_folder_new(CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error)
+camel_mbox_folder_new (CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error)
 {
 	CamelFolder *folder;
 	gchar *basename;
@@ -103,20 +103,20 @@ camel_mbox_folder_new(CamelStore *parent_store, const gchar *full_name, guint32
 	return folder;
 }
 
-static CamelLocalSummary *mbox_create_summary(CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index)
+static CamelLocalSummary *mbox_create_summary (CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index)
 {
-	return (CamelLocalSummary *)camel_mbox_summary_new((CamelFolder *)lf, path, folder, index);
+	return (CamelLocalSummary *)camel_mbox_summary_new ((CamelFolder *)lf, path, folder, index);
 }
 
-static gint mbox_lock(CamelLocalFolder *lf, CamelLockType type, GError **error)
+static gint mbox_lock (CamelLocalFolder *lf, CamelLockType type, GError **error)
 {
 #ifndef G_OS_WIN32
 	CamelMboxFolder *mf = (CamelMboxFolder *)lf;
 
 	/* make sure we have matching unlocks for locks, camel-local-folder class should enforce this */
-	g_assert(mf->lockfd == -1);
+	g_assert (mf->lockfd == -1);
 
-	mf->lockfd = open(lf->folder_path, O_RDWR|O_LARGEFILE, 0);
+	mf->lockfd = open (lf->folder_path, O_RDWR|O_LARGEFILE, 0);
 	if (mf->lockfd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -126,8 +126,8 @@ static gint mbox_lock(CamelLocalFolder *lf, CamelLockType type, GError **error)
 		return -1;
 	}
 
-	if (camel_lock_folder(lf->folder_path, mf->lockfd, type, error) == -1) {
-		close(mf->lockfd);
+	if (camel_lock_folder (lf->folder_path, mf->lockfd, type, error) == -1) {
+		close (mf->lockfd);
 		mf->lockfd = -1;
 		return -1;
 	}
@@ -135,14 +135,14 @@ static gint mbox_lock(CamelLocalFolder *lf, CamelLockType type, GError **error)
 	return 0;
 }
 
-static void mbox_unlock(CamelLocalFolder *lf)
+static void mbox_unlock (CamelLocalFolder *lf)
 {
 #ifndef G_OS_WIN32
 	CamelMboxFolder *mf = (CamelMboxFolder *)lf;
 
-	g_assert(mf->lockfd != -1);
-	camel_unlock_folder(lf->folder_path, mf->lockfd);
-	close(mf->lockfd);
+	g_assert (mf->lockfd != -1);
+	camel_unlock_folder (lf->folder_path, mf->lockfd);
+	close (mf->lockfd);
 	mf->lockfd = -1;
 #endif
 }
@@ -166,7 +166,7 @@ mbox_append_message (CamelFolder *folder,
 	gchar *xev;
 #endif
 	/* If we can't lock, dont do anything */
-	if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, error) == -1)
+	if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
 		return FALSE;
 
 	d(printf("Appending message\n"));
@@ -177,7 +177,7 @@ mbox_append_message (CamelFolder *folder,
 		goto fail;
 
 	/* add it to the summary/assign the uid, etc */
-	mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, error);
+	mi = camel_local_summary_add ((CamelLocalSummary *)folder->summary, message, info, lf->changes, error);
 	if (mi == NULL)
 		goto fail;
 
@@ -199,24 +199,24 @@ mbox_append_message (CamelFolder *folder,
 	/* and we need to set the frompos/XEV explicitly */
 	((CamelMboxMessageInfo *)mi)->frompos = mbs->folder_size;
 #if 0
-	xev = camel_local_summary_encode_x_evolution((CamelLocalSummary *)folder->summary, mi);
+	xev = camel_local_summary_encode_x_evolution ((CamelLocalSummary *)folder->summary, mi);
 	if (xev) {
 		/* the x-ev header should match the 'current' flags, no problem, so store as much */
 		camel_medium_set_header((CamelMedium *)message, "X-Evolution", xev);
 		mi->flags &= ~ CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED;
-		g_free(xev);
+		g_free (xev);
 	}
 #endif
 
 	/* we must write this to the non-filtered stream ... */
-	fromline = camel_mime_message_build_mbox_from(message);
-	if (camel_stream_write(output_stream, fromline, strlen(fromline), error) == -1)
+	fromline = camel_mime_message_build_mbox_from (message);
+	if (camel_stream_write (output_stream, fromline, strlen (fromline), error) == -1)
 		goto fail_write;
 
 	/* and write the content to the filtering stream, that translates '\nFrom' into '\n>From' */
 	filter_stream = camel_stream_filter_new (output_stream);
-	filter_from = camel_mime_filter_from_new();
-	camel_stream_filter_add((CamelStreamFilter *) filter_stream, filter_from);
+	filter_from = camel_mime_filter_from_new ();
+	camel_stream_filter_add ((CamelStreamFilter *) filter_stream, filter_from);
 	g_object_unref (filter_from);
 
 	if (camel_data_wrapper_write_to_stream (
@@ -228,9 +228,9 @@ mbox_append_message (CamelFolder *folder,
 	/* filter stream ref's the output stream itself, so we need to unref it too */
 	g_object_unref (filter_stream);
 	g_object_unref (output_stream);
-	g_free(fromline);
+	g_free (fromline);
 
-	if (!((CamelMessageInfoBase *)mi)->preview && camel_folder_summary_get_need_preview(folder->summary)) {
+	if (!((CamelMessageInfoBase *)mi)->preview && camel_folder_summary_get_need_preview (folder->summary)) {
 		if (camel_mime_message_build_preview ((CamelMimePart *)message, mi) && ((CamelMessageInfoBase *)mi)->preview)
 			camel_folder_summary_add_preview (folder->summary, mi);
 	}
@@ -243,11 +243,11 @@ mbox_append_message (CamelFolder *folder,
 	}
 
 	/* unlock as soon as we can */
-	camel_local_folder_unlock(lf);
+	camel_local_folder_unlock (lf);
 
-	if (camel_folder_change_info_changed(lf->changes)) {
+	if (camel_folder_change_info_changed (lf->changes)) {
 		camel_folder_changed (folder, lf->changes);
-		camel_folder_change_info_clear(lf->changes);
+		camel_folder_change_info_clear (lf->changes);
 	}
 
 	if (appended_uid)
@@ -276,7 +276,7 @@ fail_write:
 	if (filter_stream)
 		g_object_unref (filter_stream);
 
-	g_free(fromline);
+	g_free (fromline);
 
 	/* remove the summary info so we are not out-of-sync with the mbox */
 	camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (mbs), camel_message_info_uid (mi));
@@ -289,12 +289,12 @@ fail_write:
 
 fail:
 	/* make sure we unlock the folder - before we start triggering events into appland */
-	camel_local_folder_unlock(lf);
+	camel_local_folder_unlock (lf);
 
 	/* cascade the changes through, anyway, if there are any outstanding */
-	if (camel_folder_change_info_changed(lf->changes)) {
+	if (camel_folder_change_info_changed (lf->changes)) {
 		camel_folder_changed (folder, lf->changes);
-		camel_folder_change_info_clear(lf->changes);
+		camel_folder_change_info_clear (lf->changes);
 	}
 
 	return FALSE;
@@ -311,17 +311,17 @@ mbox_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
 	d(printf("Getting message %s\n", uid));
 
 	/* lock the folder first, burn if we can't, need write lock for summary check */
-	if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, error) == -1)
+	if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
 		return NULL;
 
 	/* check for new messages always */
-	if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, error) == -1) {
-		camel_local_folder_unlock(lf);
+	if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, error) == -1) {
+		camel_local_folder_unlock (lf);
 		return NULL;
 	}
 
 	/* get the message summary info */
-	info = (CamelMboxMessageInfo *) camel_folder_summary_uid(folder->summary, uid);
+	info = (CamelMboxMessageInfo *) camel_folder_summary_uid (folder->summary, uid);
 
 	if (info == NULL) {
 		set_cannot_get_message_ex (
@@ -331,24 +331,24 @@ mbox_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
 	}
 
 	if (info->frompos == -1) {
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 		goto fail;
 	}
 
 	frompos = info->frompos;
-	camel_message_info_free((CamelMessageInfo *)info);
+	camel_message_info_free ((CamelMessageInfo *)info);
 
 	filename = g_strdup_printf ("%s%s!%" PRId64, lf->folder_path, G_DIR_SEPARATOR_S, (gint64) frompos);
 
 fail:
 	/* and unlock now we're finished with it */
-	camel_local_folder_unlock(lf);
+	camel_local_folder_unlock (lf);
 
 	return filename;
 }
 
 static CamelMimeMessage *
-mbox_get_message(CamelFolder *folder, const gchar * uid, GError **error)
+mbox_get_message (CamelFolder *folder, const gchar * uid, GError **error)
 {
 	CamelLocalFolder *lf = (CamelLocalFolder *)folder;
 	CamelMimeMessage *message = NULL;
@@ -361,18 +361,18 @@ mbox_get_message(CamelFolder *folder, const gchar * uid, GError **error)
 	d(printf("Getting message %s\n", uid));
 
 	/* lock the folder first, burn if we can't, need write lock for summary check */
-	if (camel_local_folder_lock(lf, CAMEL_LOCK_WRITE, error) == -1)
+	if (camel_local_folder_lock (lf, CAMEL_LOCK_WRITE, error) == -1)
 		return NULL;
 
 	/* check for new messages always */
-	if (camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, error) == -1) {
-		camel_local_folder_unlock(lf);
+	if (camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, error) == -1) {
+		camel_local_folder_unlock (lf);
 		return NULL;
 	}
 
 retry:
 	/* get the message summary info */
-	info = (CamelMboxMessageInfo *) camel_folder_summary_uid(folder->summary, uid);
+	info = (CamelMboxMessageInfo *) camel_folder_summary_uid (folder->summary, uid);
 
 	if (info == NULL) {
 		set_cannot_get_message_ex (
@@ -382,19 +382,19 @@ retry:
 	}
 
 	if (info->frompos == -1) {
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 		goto fail;
 	}
 
 	frompos = info->frompos;
-	camel_message_info_free((CamelMessageInfo *)info);
+	camel_message_info_free ((CamelMessageInfo *)info);
 
 	/* we use an fd instead of a normal stream here - the reason is subtle, camel_mime_part will cache
 	   the whole message in memory if the stream is non-seekable (which it is when built from a parser
 	   with no stream).  This means we dont have to lock the mbox for the life of the message, but only
 	   while it is being created. */
 
-	fd = g_open(lf->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
+	fd = g_open (lf->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
 	if (fd == -1) {
 		set_cannot_get_message_ex (
 			error, CAMEL_ERROR_GENERIC,
@@ -403,26 +403,26 @@ retry:
 	}
 
 	/* we use a parser to verify the message is correct, and in the correct position */
-	parser = camel_mime_parser_new();
-	camel_mime_parser_init_with_fd(parser, fd);
-	camel_mime_parser_scan_from(parser, TRUE);
+	parser = camel_mime_parser_new ();
+	camel_mime_parser_init_with_fd (parser, fd);
+	camel_mime_parser_scan_from (parser, TRUE);
 
-	camel_mime_parser_seek(parser, frompos, SEEK_SET);
-	if (camel_mime_parser_step(parser, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM
-	    || camel_mime_parser_tell_start_from(parser) != frompos) {
+	camel_mime_parser_seek (parser, frompos, SEEK_SET);
+	if (camel_mime_parser_step (parser, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM
+	    || camel_mime_parser_tell_start_from (parser) != frompos) {
 
 		g_warning("Summary doesn't match the folder contents!  eek!\n"
 			  "  expecting offset %ld got %ld, state = %d", (glong)frompos,
-			  (glong)camel_mime_parser_tell_start_from(parser),
-			  camel_mime_parser_state(parser));
+			  (glong)camel_mime_parser_tell_start_from (parser),
+			  camel_mime_parser_state (parser));
 
 		g_object_unref (parser);
 		parser = NULL;
 
 		if (!retried) {
 			retried = TRUE;
-			camel_local_summary_check_force((CamelLocalSummary *)folder->summary);
-			retval = camel_local_summary_check((CamelLocalSummary *)folder->summary, lf->changes, error);
+			camel_local_summary_check_force ((CamelLocalSummary *)folder->summary);
+			retval = camel_local_summary_check ((CamelLocalSummary *)folder->summary, lf->changes, error);
 			if (retval != -1)
 				goto retry;
 		}
@@ -434,8 +434,8 @@ retry:
 		goto fail;
 	}
 
-	message = camel_mime_message_new();
-	if (camel_mime_part_construct_from_parser((CamelMimePart *)message, parser, error) == -1) {
+	message = camel_mime_message_new ();
+	if (camel_mime_part_construct_from_parser ((CamelMimePart *)message, parser, error) == -1) {
 		g_prefix_error (
 			error, _("Cannot get message %s from folder %s: "),
 			uid, lf->folder_path);
@@ -448,15 +448,15 @@ retry:
 
 fail:
 	/* and unlock now we're finished with it */
-	camel_local_folder_unlock(lf);
+	camel_local_folder_unlock (lf);
 
 	if (parser)
 		g_object_unref (parser);
 
 	/* use the opportunity to notify of changes (particularly if we had a rebuild) */
-	if (camel_folder_change_info_changed(lf->changes)) {
+	if (camel_folder_change_info_changed (lf->changes)) {
 		camel_folder_changed (folder, lf->changes);
-		camel_folder_change_info_clear(lf->changes);
+		camel_folder_change_info_clear (lf->changes);
 	}
 
 	return message;
diff --git a/camel/providers/local/camel-mbox-folder.h b/camel/providers/local/camel-mbox-folder.h
index 02d3cf8..b3379bb 100644
--- a/camel/providers/local/camel-mbox-folder.h
+++ b/camel/providers/local/camel-mbox-folder.h
@@ -61,9 +61,9 @@ struct _CamelMboxFolderClass {
 
 /* public methods */
 /* flags are taken from CAMEL_STORE_FOLDER_* flags */
-CamelFolder *camel_mbox_folder_new(CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
+CamelFolder *camel_mbox_folder_new (CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
 
-GType camel_mbox_folder_get_type(void);
+GType camel_mbox_folder_get_type (void);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index c6d9a55..22f3247 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -38,13 +38,13 @@
 
 #define d(x)
 
-static CamelFolder *get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
-static gboolean delete_folder(CamelStore *store, const gchar *folder_name, GError **error);
-static gboolean rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **error);
-static CamelFolderInfo *create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error);
-static CamelFolderInfo *get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **error);
-static gchar *mbox_get_meta_path(CamelLocalStore *ls, const gchar *full_name, const gchar *ext);
-static gchar *mbox_get_full_path(CamelLocalStore *ls, const gchar *full_name);
+static CamelFolder *get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
+static gboolean delete_folder (CamelStore *store, const gchar *folder_name, GError **error);
+static gboolean rename_folder (CamelStore *store, const gchar *old, const gchar *new, GError **error);
+static CamelFolderInfo *create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error);
+static CamelFolderInfo *get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error);
+static gchar *mbox_get_meta_path (CamelLocalStore *ls, const gchar *full_name, const gchar *ext);
+static gchar *mbox_get_full_path (CamelLocalStore *ls, const gchar *full_name);
 
 G_DEFINE_TYPE (CamelMboxStore, camel_mbox_store, CAMEL_TYPE_LOCAL_STORE)
 
@@ -77,18 +77,18 @@ static const gchar *extensions[] = {
 };
 
 static gboolean
-ignore_file(const gchar *filename, gboolean sbd)
+ignore_file (const gchar *filename, gboolean sbd)
 {
 	gint flen, len, i;
 
 	/* TODO: Should probably just be 1 regex */
-	flen = strlen(filename);
+	flen = strlen (filename);
 	if (flen > 0 && filename[flen-1] == '~')
 		return TRUE;
 
 	for (i = 0; i < G_N_ELEMENTS (extensions); i++) {
-		len = strlen(extensions[i]);
-		if (len < flen && !strcmp(filename + flen - len, extensions[i]))
+		len = strlen (extensions[i]);
+		if (len < flen && !strcmp (filename + flen - len, extensions[i]))
 			return TRUE;
 	}
 
@@ -113,9 +113,9 @@ get_folder (CamelStore *store,
 	if (!store_class->get_folder (store, folder_name, flags, error))
 		return NULL;
 
-	name = camel_local_store_get_full_path(store, folder_name);
+	name = camel_local_store_get_full_path (store, folder_name);
 
-	if (g_stat(name, &st) == -1) {
+	if (g_stat (name, &st) == -1) {
 		gchar *basename;
 		gchar *dirname;
 		gint fd;
@@ -126,7 +126,7 @@ get_folder (CamelStore *store,
 				g_io_error_from_errno (errno),
 				_("Cannot get folder '%s': %s"),
 				folder_name, g_strerror (errno));
-			g_free(name);
+			g_free (name);
 			return NULL;
 		}
 
@@ -136,7 +136,7 @@ get_folder (CamelStore *store,
 				CAMEL_STORE_ERROR_NO_FOLDER,
 				_("Cannot get folder '%s': folder does not exist."),
 				folder_name);
-			g_free(name);
+			g_free (name);
 			return NULL;
 		}
 
@@ -153,39 +153,39 @@ get_folder (CamelStore *store,
 		}
 		g_free (basename);
 
-		dirname = g_path_get_dirname(name);
-		if (g_mkdir_with_parents(dirname, 0700) == -1 && errno != EEXIST) {
+		dirname = g_path_get_dirname (name);
+		if (g_mkdir_with_parents (dirname, 0700) == -1 && errno != EEXIST) {
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
 				_("Cannot create folder '%s': %s"),
 				folder_name, g_strerror (errno));
-			g_free(dirname);
-			g_free(name);
+			g_free (dirname);
+			g_free (name);
 			return NULL;
 		}
 
-		g_free(dirname);
+		g_free (dirname);
 
-		fd = g_open(name, O_LARGEFILE | O_WRONLY | O_CREAT | O_APPEND | O_BINARY, 0666);
+		fd = g_open (name, O_LARGEFILE | O_WRONLY | O_CREAT | O_APPEND | O_BINARY, 0666);
 		if (fd == -1) {
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
 				_("Cannot create folder '%s': %s"),
 				folder_name, g_strerror (errno));
-			g_free(name);
+			g_free (name);
 			return NULL;
 		}
 
-		g_free(name);
-		close(fd);
-	} else if (!S_ISREG(st.st_mode)) {
+		g_free (name);
+		close (fd);
+	} else if (!S_ISREG (st.st_mode)) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Cannot get folder '%s': not a regular file."),
 			folder_name);
-		g_free(name);
+		g_free (name);
 		return NULL;
 	} else if (flags & CAMEL_STORE_FOLDER_EXCL) {
 		g_set_error (
@@ -195,51 +195,51 @@ get_folder (CamelStore *store,
 		g_free (name);
 		return NULL;
 	} else
-		g_free(name);
+		g_free (name);
 
-	return camel_mbox_folder_new(store, folder_name, flags, error);
+	return camel_mbox_folder_new (store, folder_name, flags, error);
 }
 
 static gboolean
-delete_folder(CamelStore *store, const gchar *folder_name, GError **error)
+delete_folder (CamelStore *store, const gchar *folder_name, GError **error)
 {
 	CamelFolderInfo *fi;
 	CamelFolder *lf;
 	gchar *name, *path;
 	struct stat st;
 
-	name = camel_local_store_get_full_path(store, folder_name);
+	name = camel_local_store_get_full_path (store, folder_name);
 	path = g_strdup_printf("%s.sbd", name);
 
-	if (g_rmdir(path) == -1 && errno != ENOENT) {
+	if (g_rmdir (path) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder '%s':\n%s"),
 			folder_name, g_strerror (errno));
-		g_free(path);
-		g_free(name);
+		g_free (path);
+		g_free (name);
 		return FALSE;
 	}
 
-	g_free(path);
+	g_free (path);
 
-	if (g_stat(name, &st) == -1) {
+	if (g_stat (name, &st) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder '%s':\n%s"),
 			folder_name, g_strerror (errno));
-		g_free(name);
+		g_free (name);
 		return FALSE;
 	}
 
-	if (!S_ISREG(st.st_mode)) {
+	if (!S_ISREG (st.st_mode)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
 			_("'%s' is not a regular file."), name);
-		g_free(name);
+		g_free (name);
 		return FALSE;
 	}
 
@@ -249,17 +249,17 @@ delete_folder(CamelStore *store, const gchar *folder_name, GError **error)
 			CAMEL_FOLDER_ERROR_NON_EMPTY,
 			_("Folder '%s' is not empty. Not deleted."),
 			folder_name);
-		g_free(name);
+		g_free (name);
 		return FALSE;
 	}
 
-	if (g_unlink(name) == -1 && errno != ENOENT) {
+	if (g_unlink (name) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder '%s':\n%s"),
-			name, g_strerror(errno));
-		g_free(name);
+			name, g_strerror (errno));
+		g_free (name);
 		return FALSE;
 	}
 
@@ -269,49 +269,49 @@ delete_folder(CamelStore *store, const gchar *folder_name, GError **error)
 	 * CamelLocalStore to be able to construct the folder & meta
 	 * paths itself */
 	path = camel_local_store_get_meta_path(store, folder_name, ".ev-summary");
-	if (g_unlink(path) == -1 && errno != ENOENT) {
+	if (g_unlink (path) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder summary file '%s': %s"),
-			path, g_strerror(errno));
-		g_free(path);
-		g_free(name);
+			path, g_strerror (errno));
+		g_free (path);
+		g_free (name);
 		return FALSE;
 	}
 
-	g_free(path);
+	g_free (path);
 
 	path = camel_local_store_get_meta_path(store, folder_name, ".ev-summary-meta");
-	if (g_unlink(path) == -1 && errno != ENOENT) {
+	if (g_unlink (path) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder summary file '%s': %s"),
-			path, g_strerror(errno));
-		g_free(path);
-		g_free(name);
+			path, g_strerror (errno));
+		g_free (path);
+		g_free (name);
 		return FALSE;
 	}
 
-	g_free(path);
+	g_free (path);
 
 	path = camel_local_store_get_meta_path(store, folder_name, ".ibex");
-	if (camel_text_index_remove(path) == -1 && errno != ENOENT) {
+	if (camel_text_index_remove (path) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder index file '%s': %s"),
-			path, g_strerror(errno));
-		g_free(path);
-		g_free(name);
+			path, g_strerror (errno));
+		g_free (path);
+		g_free (name);
 		return FALSE;
 	}
 
-	g_free(path);
+	g_free (path);
 
 	path = NULL;
-	if ((lf = camel_store_get_folder(store, folder_name, 0, NULL))) {
+	if ((lf = camel_store_get_folder (store, folder_name, 0, NULL))) {
 		CamelObject *object = CAMEL_OBJECT (lf);
 		const gchar *state_filename;
 
@@ -326,35 +326,35 @@ delete_folder(CamelStore *store, const gchar *folder_name, GError **error)
 	if (path == NULL)
 		path = camel_local_store_get_meta_path(store, folder_name, ".cmeta");
 
-	if (g_unlink(path) == -1 && errno != ENOENT) {
+	if (g_unlink (path) == -1 && errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder meta file '%s': %s"),
 			path, g_strerror (errno));
 
-		g_free(path);
-		g_free(name);
+		g_free (path);
+		g_free (name);
 		return FALSE;
 	}
 
-	g_free(path);
-	g_free(name);
+	g_free (path);
+	g_free (name);
 
 	fi = camel_folder_info_new ();
-	fi->full_name = g_strdup(folder_name);
-	fi->name = g_path_get_basename(folder_name);
+	fi->full_name = g_strdup (folder_name);
+	fi->name = g_path_get_basename (folder_name);
 	fi->uri = g_strdup_printf("mbox:%s#%s",((CamelService *) store)->url->path, folder_name);
 	fi->unread = -1;
 
 	camel_store_folder_deleted (store, fi);
-	camel_folder_info_free(fi);
+	camel_folder_info_free (fi);
 
 	return TRUE;
 }
 
 static CamelFolderInfo *
-create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error)
+create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, GError **error)
 {
 	/* FIXME: this is almost an exact copy of CamelLocalStore::create_folder() except that we use
 	 * different path schemes... need to find a way to share parent's code? */
@@ -364,7 +364,7 @@ create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_n
 	CamelFolder *folder;
 	struct stat st;
 
-	if (!g_path_is_absolute(toplevel_dir)) {
+	if (!g_path_is_absolute (toplevel_dir)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -373,7 +373,7 @@ create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_n
 		return NULL;
 	}
 
-	if (folder_name[0] == '.' || ignore_file(folder_name, TRUE)) {
+	if (folder_name[0] == '.' || ignore_file (folder_name, TRUE)) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Cannot create a folder by this name."));
@@ -383,28 +383,28 @@ create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_n
 	if (parent_name && *parent_name)
 		name = g_strdup_printf("%s/%s", parent_name, folder_name);
 	else
-		name = g_strdup(folder_name);
+		name = g_strdup (folder_name);
 
-	path = camel_local_store_get_full_path(store, name);
+	path = camel_local_store_get_full_path (store, name);
 
-	dir = g_path_get_dirname(path);
-	if (g_mkdir_with_parents(dir, 0777) == -1 && errno != EEXIST) {
+	dir = g_path_get_dirname (path);
+	if (g_mkdir_with_parents (dir, 0777) == -1 && errno != EEXIST) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Cannot create directory '%s': %s."),
 			dir, g_strerror (errno));
 
-		g_free(path);
-		g_free(name);
-		g_free(dir);
+		g_free (path);
+		g_free (name);
+		g_free (dir);
 
 		return NULL;
 	}
 
-	g_free(dir);
+	g_free (dir);
 
-	if (g_stat(path, &st) == 0 || errno != ENOENT) {
+	if (g_stat (path, &st) == 0 || errno != ENOENT) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -412,13 +412,13 @@ create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_n
 			path, errno ? g_strerror (errno) :
 			_("Folder already exists"));
 
-		g_free(path);
-		g_free(name);
+		g_free (path);
+		g_free (name);
 
 		return NULL;
 	}
 
-	g_free(path);
+	g_free (path);
 
 	folder = CAMEL_STORE_GET_CLASS (store)->get_folder (
 		store, name, CAMEL_STORE_FOLDER_CREATE, error);
@@ -428,13 +428,13 @@ create_folder(CamelStore *store, const gchar *parent_name, const gchar *folder_n
 			store, name, 0, error);
 	}
 
-	g_free(name);
+	g_free (name);
 
 	return info;
 }
 
 static gint
-xrename(CamelStore *store, const gchar *old_name, const gchar *new_name, const gchar *ext, gboolean missingok)
+xrename (CamelStore *store, const gchar *old_name, const gchar *new_name, const gchar *ext, gboolean missingok)
 {
 	CamelLocalStore *ls = (CamelLocalStore *)store;
 	gchar *oldpath, *newpath;
@@ -443,14 +443,14 @@ xrename(CamelStore *store, const gchar *old_name, const gchar *new_name, const g
 	gint err = 0;
 
 	if (ext != NULL) {
-		oldpath = camel_local_store_get_meta_path(ls, old_name, ext);
-		newpath = camel_local_store_get_meta_path(ls, new_name, ext);
+		oldpath = camel_local_store_get_meta_path (ls, old_name, ext);
+		newpath = camel_local_store_get_meta_path (ls, new_name, ext);
 	} else {
-		oldpath = camel_local_store_get_full_path(ls, old_name);
-		newpath = camel_local_store_get_full_path(ls, new_name);
+		oldpath = camel_local_store_get_full_path (ls, old_name);
+		newpath = camel_local_store_get_full_path (ls, new_name);
 	}
 
-	if (g_stat(oldpath, &st) == -1) {
+	if (g_stat (oldpath, &st) == -1) {
 		if (missingok && errno == ENOENT) {
 			ret = 0;
 		} else {
@@ -458,21 +458,21 @@ xrename(CamelStore *store, const gchar *old_name, const gchar *new_name, const g
 			ret = -1;
 		}
 #ifndef G_OS_WIN32
-	} else if (S_ISDIR(st.st_mode)) {
+	} else if (S_ISDIR (st.st_mode)) {
 		/* use rename for dirs */
-		if (g_rename (oldpath, newpath) == 0 || g_stat(newpath, &st) == 0) {
+		if (g_rename (oldpath, newpath) == 0 || g_stat (newpath, &st) == 0) {
 			ret = 0;
 		} else {
 			err = errno;
 			ret = -1;
 		}
-	} else if (link(oldpath, newpath) == 0 /* and link for files */
-		   ||(g_stat(newpath, &st) == 0 && st.st_nlink == 2)) {
-		if (unlink(oldpath) == 0) {
+	} else if (link (oldpath, newpath) == 0 /* and link for files */
+		   ||(g_stat (newpath, &st) == 0 && st.st_nlink == 2)) {
+		if (unlink (oldpath) == 0) {
 			ret = 0;
 		} else {
 			err = errno;
-			unlink(newpath);
+			unlink (newpath);
 			ret = -1;
 		}
 	} else {
@@ -480,7 +480,7 @@ xrename(CamelStore *store, const gchar *old_name, const gchar *new_name, const g
 		ret = -1;
 #else
 	} else if ((!g_file_test (newpath, G_FILE_TEST_EXISTS) || g_remove (newpath) == 0) &&
-		   g_rename(oldpath, newpath) == 0) {
+		   g_rename (oldpath, newpath) == 0) {
 		ret = 0;
 	} else {
 		err = errno;
@@ -488,20 +488,20 @@ xrename(CamelStore *store, const gchar *old_name, const gchar *new_name, const g
 #endif
 	}
 
-	g_free(oldpath);
-	g_free(newpath);
+	g_free (oldpath);
+	g_free (newpath);
 
 	return ret;
 }
 
 static gboolean
-rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **error)
+rename_folder (CamelStore *store, const gchar *old, const gchar *new, GError **error)
 {
 	CamelLocalFolder *folder = NULL;
 	gchar *oldibex, *newibex, *newdir;
 	gint errnosav;
 
-	if (new[0] == '.' || ignore_file(new, TRUE)) {
+	if (new[0] == '.' || ignore_file (new, TRUE)) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("The new folder name is illegal."));
@@ -513,34 +513,34 @@ rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **er
 	oldibex = camel_local_store_get_meta_path(store, old, ".ibex");
 	newibex = camel_local_store_get_meta_path(store, new, ".ibex");
 
-	newdir = g_path_get_dirname(newibex);
-	if (g_mkdir_with_parents(newdir, 0700) == -1) {
+	newdir = g_path_get_dirname (newibex);
+	if (g_mkdir_with_parents (newdir, 0700) == -1) {
 		if (errno != EEXIST) {
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
 				_("Could not rename '%s': '%s': %s"),
-				old, new, g_strerror(errno));
-			g_free(oldibex);
-			g_free(newibex);
-			g_free(newdir);
+				old, new, g_strerror (errno));
+			g_free (oldibex);
+			g_free (newibex);
+			g_free (newdir);
 
 			return FALSE;
 		}
 
-		g_free(newdir);
+		g_free (newdir);
 		newdir = NULL;
 	}
 
-	folder = camel_object_bag_get(store->folders, old);
+	folder = camel_object_bag_get (store->folders, old);
 	if (folder && folder->index) {
-		if (camel_index_rename(folder->index, newibex) == -1 && errno != ENOENT) {
+		if (camel_index_rename (folder->index, newibex) == -1 && errno != ENOENT) {
 			errnosav = errno;
 			goto ibex_failed;
 		}
 	} else {
 		/* TODO: camel_text_index_rename should find out if we have an active index itself? */
-		if (camel_text_index_rename(oldibex, newibex) == -1 && errno != ENOENT) {
+		if (camel_text_index_rename (oldibex, newibex) == -1 && errno != ENOENT) {
 			errnosav = errno;
 			goto ibex_failed;
 		}
@@ -566,13 +566,13 @@ rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **er
 		goto subdir_failed;
 	}
 
-	if (xrename(store, old, new, NULL, FALSE) == -1) {
+	if (xrename (store, old, new, NULL, FALSE) == -1) {
 		errnosav = errno;
 		goto base_failed;
 	}
 
-	g_free(oldibex);
-	g_free(newibex);
+	g_free (oldibex);
+	g_free (newibex);
 
 	if (folder)
 		g_object_unref (folder);
@@ -589,24 +589,24 @@ cmeta_failed:
 summary_failed:
 	if (folder) {
 		if (folder->index)
-			camel_index_rename(folder->index, oldibex);
+			camel_index_rename (folder->index, oldibex);
 	} else
-		camel_text_index_rename(newibex, oldibex);
+		camel_text_index_rename (newibex, oldibex);
 ibex_failed:
 	if (newdir) {
 		/* newdir is only non-NULL if we needed to mkdir */
-		g_rmdir(newdir);
-		g_free(newdir);
+		g_rmdir (newdir);
+		g_free (newdir);
 	}
 
 	g_set_error (
 		error, G_IO_ERROR,
 		g_io_error_from_errno (errnosav),
 		_("Could not rename '%s' to %s: %s"),
-		old, new, g_strerror(errnosav));
+		old, new, g_strerror (errnosav));
 
-	g_free(newibex);
-	g_free(oldibex);
+	g_free (newibex);
+	g_free (oldibex);
 
 	if (folder)
 		g_object_unref (folder);
@@ -621,7 +621,7 @@ struct _inode {
 };
 
 static guint
-inode_hash(gconstpointer d)
+inode_hash (gconstpointer d)
 {
 	const struct _inode *v = d;
 
@@ -629,7 +629,7 @@ inode_hash(gconstpointer d)
 }
 
 static gboolean
-inode_equal(gconstpointer a, gconstpointer b)
+inode_equal (gconstpointer a, gconstpointer b)
 {
 	const struct _inode *v1 = a, *v2 = b;
 
@@ -637,25 +637,25 @@ inode_equal(gconstpointer a, gconstpointer b)
 }
 
 static void
-inode_free(gpointer k, gpointer v, gpointer d)
+inode_free (gpointer k, gpointer v, gpointer d)
 {
-	g_free(k);
+	g_free (k);
 }
 
 /* NB: duplicated in maildir store */
 static void
-fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
+fill_fi (CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 {
 	CamelFolder *folder;
 
 	fi->unread = -1;
 	fi->total = -1;
-	folder = camel_object_bag_get(store->folders, fi->full_name);
+	folder = camel_object_bag_get (store->folders, fi->full_name);
 	if (folder) {
 		if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-			camel_folder_refresh_info(folder, NULL);
-		fi->unread = camel_folder_get_unread_message_count(folder);
-		fi->total = camel_folder_get_message_count(folder);
+			camel_folder_refresh_info (folder, NULL);
+		fi->unread = camel_folder_get_unread_message_count (folder);
+		fi->total = camel_folder_get_message_count (folder);
 		g_object_unref (folder);
 	} else {
 		gchar *path, *folderpath;
@@ -663,9 +663,9 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 
 		/* This should be fast enough not to have to test for INFO_FAST */
 		path = camel_local_store_get_meta_path(store, fi->full_name, ".ev-summary");
-		folderpath = camel_local_store_get_full_path(store, fi->full_name);
+		folderpath = camel_local_store_get_full_path (store, fi->full_name);
 
-		mbs = (CamelMboxSummary *)camel_mbox_summary_new(NULL, path, folderpath, NULL);
+		mbs = (CamelMboxSummary *)camel_mbox_summary_new (NULL, path, folderpath, NULL);
 		/* FIXME[disk-summary] track exception */
 		if (camel_folder_summary_header_load_from_db ((CamelFolderSummary *)mbs, store, fi->full_name, NULL) != -1) {
 			fi->unread = ((CamelFolderSummary *)mbs)->unread_count;
@@ -673,13 +673,13 @@ fill_fi(CamelStore *store, CamelFolderInfo *fi, guint32 flags)
 		}
 
 		g_object_unref (mbs);
-		g_free(folderpath);
-		g_free(path);
+		g_free (folderpath);
+		g_free (path);
 	}
 }
 
 static CamelFolderInfo *
-scan_dir(CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo *parent, const gchar *root,
+scan_dir (CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo *parent, const gchar *root,
 	 const gchar *name, guint32 flags, GError **error)
 {
 	CamelFolderInfo *folders, *tail, *fi;
@@ -689,54 +689,54 @@ scan_dir(CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo
 
 	tail = folders = NULL;
 
-	if (!(dir = g_dir_open(root, 0, NULL)))
+	if (!(dir = g_dir_open (root, 0, NULL)))
 		return NULL;
 
-	folder_hash = g_hash_table_new(g_str_hash, g_str_equal);
+	folder_hash = g_hash_table_new (g_str_hash, g_str_equal);
 
 	/* FIXME: it would be better if we queue'd up the recursive
 	 * scans till the end so that we can limit the number of
 	 * directory descriptors open at any given time... */
 
-	while ((dent = g_dir_read_name(dir))) {
+	while ((dent = g_dir_read_name (dir))) {
 		gchar *short_name, *full_name, *path, *ext;
 		struct stat st;
 
 		if (dent[0] == '.')
 			continue;
 
-		if (ignore_file(dent, FALSE))
+		if (ignore_file (dent, FALSE))
 			continue;
 
 		path = g_strdup_printf("%s/%s", root, dent);
-		if (g_stat(path, &st) == -1) {
-			g_free(path);
+		if (g_stat (path, &st) == -1) {
+			g_free (path);
 			continue;
 		}
 #ifndef G_OS_WIN32
-		if (S_ISDIR(st.st_mode)) {
+		if (S_ISDIR (st.st_mode)) {
 			struct _inode in = { st.st_dev, st.st_ino };
 
-			if (g_hash_table_lookup(visited, &in)) {
-				g_free(path);
+			if (g_hash_table_lookup (visited, &in)) {
+				g_free (path);
 				continue;
 			}
 		}
 #endif
-		short_name = g_strdup(dent);
+		short_name = g_strdup (dent);
 		if ((ext = strrchr(short_name, '.')) && !strcmp(ext, ".sbd"))
 			*ext = '\0';
 
 		if (name != NULL)
 			full_name = g_strdup_printf("%s/%s", name, short_name);
 		else
-			full_name = g_strdup(short_name);
+			full_name = g_strdup (short_name);
 
-		if ((fi = g_hash_table_lookup(folder_hash, short_name)) != NULL) {
-			g_free(short_name);
-			g_free(full_name);
+		if ((fi = g_hash_table_lookup (folder_hash, short_name)) != NULL) {
+			g_free (short_name);
+			g_free (full_name);
 
-			if (S_ISDIR(st.st_mode)) {
+			if (S_ISDIR (st.st_mode)) {
 				fi->flags =(fi->flags & ~CAMEL_FOLDER_NOCHILDREN) | CAMEL_FOLDER_CHILDREN;
 			} else {
 				fi->flags &= ~CAMEL_FOLDER_NOSELECT;
@@ -753,7 +753,7 @@ scan_dir(CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo
 			fi->unread = -1;
 			fi->total = -1;
 
-			if (S_ISDIR(st.st_mode))
+			if (S_ISDIR (st.st_mode))
 				fi->flags = CAMEL_FOLDER_NOSELECT;
 			else
 				fi->flags = CAMEL_FOLDER_NOCHILDREN;
@@ -765,20 +765,20 @@ scan_dir(CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo
 
 			tail = fi;
 
-			g_hash_table_insert(folder_hash, fi->name, fi);
+			g_hash_table_insert (folder_hash, fi->name, fi);
 		}
 
-		if (!S_ISDIR(st.st_mode)) {
-			fill_fi(store, fi, flags);
+		if (!S_ISDIR (st.st_mode)) {
+			fill_fi (store, fi, flags);
 		} else if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE)) {
 			struct _inode in = { st.st_dev, st.st_ino };
 
-			if (g_hash_table_lookup(visited, &in) == NULL) {
+			if (g_hash_table_lookup (visited, &in) == NULL) {
 #ifndef G_OS_WIN32
-				struct _inode *inew = g_new(struct _inode, 1);
+				struct _inode *inew = g_new (struct _inode, 1);
 
 				*inew = in;
-				g_hash_table_insert(visited, inew, inew);
+				g_hash_table_insert (visited, inew, inew);
 #endif
 				if ((fi->child = scan_dir (store, url, visited, fi, path, fi->full_name, flags, error)))
 					fi->flags |= CAMEL_FOLDER_CHILDREN;
@@ -787,18 +787,18 @@ scan_dir(CamelStore *store, CamelURL *url, GHashTable *visited, CamelFolderInfo
 			}
 		}
 
-		g_free(path);
+		g_free (path);
 	}
 
-	g_dir_close(dir);
+	g_dir_close (dir);
 
-	g_hash_table_destroy(folder_hash);
+	g_hash_table_destroy (folder_hash);
 
 	return folders;
 }
 
 static CamelFolderInfo *
-get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **error)
+get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error)
 {
 	GHashTable *visited;
 #ifndef G_OS_WIN32
@@ -811,27 +811,27 @@ get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **err
 	CamelURL *url;
 
 	top = top ? top : "";
-	path = camel_local_store_get_full_path(store, top);
+	path = camel_local_store_get_full_path (store, top);
 
 	if (*top == '\0') {
 		/* requesting root dir scan */
-		if (g_stat(path, &st) == -1 || !S_ISDIR(st.st_mode)) {
-			g_free(path);
+		if (g_stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) {
+			g_free (path);
 			return NULL;
 		}
 
-		visited = g_hash_table_new(inode_hash, inode_equal);
+		visited = g_hash_table_new (inode_hash, inode_equal);
 #ifndef G_OS_WIN32
-		inode = g_malloc0(sizeof(*inode));
+		inode = g_malloc0 (sizeof (*inode));
 		inode->dnode = st.st_dev;
 		inode->inode = st.st_ino;
 
-		g_hash_table_insert(visited, inode, inode);
+		g_hash_table_insert (visited, inode, inode);
 #endif
 		url = camel_url_copy (((CamelService *) store)->url);
 		fi = scan_dir (store, url, visited, NULL, path, NULL, flags, error);
-		g_hash_table_foreach(visited, inode_free, NULL);
-		g_hash_table_destroy(visited);
+		g_hash_table_foreach (visited, inode_free, NULL);
+		g_hash_table_destroy (visited);
 		camel_url_free (url);
 		g_free (path);
 
@@ -839,14 +839,14 @@ get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **err
 	}
 
 	/* requesting scan of specific folder */
-	if (g_stat(path, &st) == -1 || !S_ISREG(st.st_mode)) {
-		g_free(path);
+	if (g_stat (path, &st) == -1 || !S_ISREG (st.st_mode)) {
+		g_free (path);
 		return NULL;
 	}
 
-	visited = g_hash_table_new(inode_hash, inode_equal);
+	visited = g_hash_table_new (inode_hash, inode_equal);
 
-	basename = g_path_get_basename(top);
+	basename = g_path_get_basename (top);
 
 	url = camel_url_copy (((CamelService *) store)->url);
 	camel_url_set_fragment (url, top);
@@ -855,18 +855,18 @@ get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **err
 	fi->parent = NULL;
 	fi->uri = camel_url_to_string (url, 0);
 	fi->name = basename;
-	fi->full_name = g_strdup(top);
+	fi->full_name = g_strdup (top);
 	fi->unread = -1;
 	fi->total = -1;
 
 	subdir = g_strdup_printf("%s.sbd", path);
-	if (g_stat(subdir, &st) == 0) {
-		if  (S_ISDIR(st.st_mode))
+	if (g_stat (subdir, &st) == 0) {
+		if  (S_ISDIR (st.st_mode))
 			fi->child = scan_dir (store, url, visited, fi, subdir, top, flags, error);
 		else
-			fill_fi(store, fi, flags);
+			fill_fi (store, fi, flags);
 	} else
-		fill_fi(store, fi, flags);
+		fill_fi (store, fi, flags);
 
 	camel_url_free (url);
 
@@ -875,17 +875,17 @@ get_folder_info(CamelStore *store, const gchar *top, guint32 flags, GError **err
 	else
 		fi->flags |= CAMEL_FOLDER_NOCHILDREN;
 
-	g_free(subdir);
+	g_free (subdir);
 
-	g_hash_table_foreach(visited, inode_free, NULL);
-	g_hash_table_destroy(visited);
-	g_free(path);
+	g_hash_table_foreach (visited, inode_free, NULL);
+	g_hash_table_destroy (visited);
+	g_free (path);
 
 	return fi;
 }
 
 static gchar *
-mbox_get_full_path(CamelLocalStore *ls, const gchar *full_name)
+mbox_get_full_path (CamelLocalStore *ls, const gchar *full_name)
 {
 	const gchar *inptr = full_name;
 	gint subdirs = 0;
@@ -921,7 +921,7 @@ mbox_get_full_path(CamelLocalStore *ls, const gchar *full_name)
 }
 
 static gchar *
-mbox_get_meta_path(CamelLocalStore *ls, const gchar *full_name, const gchar *ext)
+mbox_get_meta_path (CamelLocalStore *ls, const gchar *full_name, const gchar *ext)
 {
 /*#define USE_HIDDEN_META_FILES*/
 #ifdef USE_HIDDEN_META_FILES
@@ -933,11 +933,11 @@ mbox_get_meta_path(CamelLocalStore *ls, const gchar *full_name, const gchar *ext
 	else
 		sprintf (name, ".%s%s", full_name, ext);
 
-	return mbox_get_full_path(ls, name);
+	return mbox_get_full_path (ls, name);
 #else
 	gchar *full_path, *path;
 
-	full_path = mbox_get_full_path(ls, full_name);
+	full_path = mbox_get_full_path (ls, full_name);
 	path = g_strdup_printf ("%s%s", full_path, ext);
 	g_free (full_path);
 
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 0679c29..c0e3f38 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -48,45 +48,45 @@
 
 static CamelFIRecord * summary_header_to_db (CamelFolderSummary *, GError **error);
 static gint summary_header_from_db (CamelFolderSummary *, CamelFIRecord *);
-static CamelMessageInfo * message_info_from_db(CamelFolderSummary *s, CamelMIRecord *record);
-static CamelMIRecord * message_info_to_db(CamelFolderSummary *s, CamelMessageInfo *info);
+static CamelMessageInfo * message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record);
+static CamelMIRecord * message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info);
 
 static gint summary_header_load (CamelFolderSummary *, FILE *);
 static gint summary_header_save (CamelFolderSummary *, FILE *);
 
-static CamelMessageInfo * message_info_new_from_header(CamelFolderSummary *, struct _camel_header_raw *);
-static CamelMessageInfo * message_info_new_from_parser(CamelFolderSummary *, CamelMimeParser *);
+static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
+static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
 static CamelMessageInfo * message_info_migrate (CamelFolderSummary *, FILE *);
 /*static void		  message_info_free (CamelFolderSummary *, CamelMessageInfo *);*/
 
 static gchar *mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
 
-static gint mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mbox_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mbox_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
 #ifdef STATUS_PINE
-static CamelMessageInfo *mbox_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error);
+static CamelMessageInfo *mbox_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error);
 #endif
 
-static gint mbox_summary_sync_quick(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint mbox_summary_sync_full(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mbox_summary_sync_quick (CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mbox_summary_sync_full (CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
 
 #ifdef STATUS_PINE
 /* Which status flags are stored in each separate header */
 #define STATUS_XSTATUS (CAMEL_MESSAGE_FLAGGED|CAMEL_MESSAGE_ANSWERED|CAMEL_MESSAGE_DELETED)
 #define STATUS_STATUS (CAMEL_MESSAGE_SEEN)
 
-static void encode_status(guint32 flags, gchar status[8]);
-static guint32 decode_status(const gchar *status);
+static void encode_status (guint32 flags, gchar status[8]);
+static guint32 decode_status (const gchar *status);
 #endif
 
 G_DEFINE_TYPE (CamelMboxSummary, camel_mbox_summary, CAMEL_TYPE_LOCAL_SUMMARY)
 
 static gboolean
-mbox_info_set_user_flag(CamelMessageInfo *mi, const gchar *name, gboolean value)
+mbox_info_set_user_flag (CamelMessageInfo *mi, const gchar *name, gboolean value)
 {
 	gint res;
 
-	res = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_user_flag(mi, name, value);
+	res = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_user_flag (mi, name, value);
 	if (res)
 		((CamelLocalMessageInfo *)mi)->info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 
@@ -94,11 +94,11 @@ mbox_info_set_user_flag(CamelMessageInfo *mi, const gchar *name, gboolean value)
 }
 
 static gboolean
-mbox_info_set_user_tag(CamelMessageInfo *mi, const gchar *name, const gchar *value)
+mbox_info_set_user_tag (CamelMessageInfo *mi, const gchar *name, const gchar *value)
 {
 	gint res;
 
-	res = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_user_tag(mi, name, value);
+	res = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_user_tag (mi, name, value);
 	if (res)
 		((CamelLocalMessageInfo *)mi)->info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 
@@ -107,7 +107,7 @@ mbox_info_set_user_tag(CamelMessageInfo *mi, const gchar *name, const gchar *val
 
 #ifdef STATUS_PINE
 static gboolean
-mbox_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
+mbox_info_set_flags (CamelMessageInfo *mi, guint32 flags, guint32 set)
 {
 	/* Basically, if anything could change the Status line, presume it does */
 	if (((CamelMboxSummary *)mi->summary)->xstatus
@@ -116,7 +116,7 @@ mbox_info_set_flags(CamelMessageInfo *mi, guint32 flags, guint32 set)
 		set |= CAMEL_MESSAGE_FOLDER_XEVCHANGE|CAMEL_MESSAGE_FOLDER_FLAGGED;
 	}
 
-	return CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_flags(mi, flags, set);
+	return CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->info_set_flags (mi, flags, set);
 }
 #endif
 
@@ -175,7 +175,7 @@ camel_mbox_summary_init (CamelMboxSummary *mbox_summary)
  * Returns: A new CamelMboxSummary widget.
  **/
 CamelMboxSummary *
-camel_mbox_summary_new(struct _CamelFolder *folder, const gchar *filename, const gchar *mbox_name, CamelIndex *index)
+camel_mbox_summary_new (struct _CamelFolder *folder, const gchar *filename, const gchar *mbox_name, CamelIndex *index)
 {
 	CamelMboxSummary *new;
 
@@ -193,11 +193,11 @@ camel_mbox_summary_new(struct _CamelFolder *folder, const gchar *filename, const
 		summary->collate = "mbox_frompos_sort";
 
 	}
-	camel_local_summary_construct((CamelLocalSummary *)new, filename, mbox_name, index);
+	camel_local_summary_construct ((CamelLocalSummary *)new, filename, mbox_name, index);
 	return new;
 }
 
-void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, gint state)
+void camel_mbox_summary_xstatus (CamelMboxSummary *mbs, gint state)
 {
 	mbs->xstatus = state;
 }
@@ -209,8 +209,8 @@ mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessage
 	guint32 uid;
 
 	/* This is busted, it is supposed to encode ALL DATA */
-	p = uidstr = camel_message_info_uid(mi);
-	while (*p && isdigit(*p))
+	p = uidstr = camel_message_info_uid (mi);
+	while (*p && isdigit (*p))
 		p++;
 
 	if (*p == 0 && sscanf(uidstr, "%u", &uid) == 1) {
@@ -223,35 +223,35 @@ mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessage
 static gint
 summary_header_from_db (CamelFolderSummary *s, struct _CamelFIRecord *fir)
 {
-	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(s);
+	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
 	gchar *part;
 
-	CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_from_db(s, fir);
+	CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_from_db (s, fir);
 
 	part = fir->bdata;
 	if (part) {
-		EXTRACT_DIGIT(mbs->version)
-		EXTRACT_DIGIT(mbs->folder_size)
+		EXTRACT_DIGIT (mbs->version)
+		EXTRACT_DIGIT (mbs->folder_size)
 	}
 
 	return 0;
 }
 
 static gint
-summary_header_load(CamelFolderSummary *s, FILE *in)
+summary_header_load (CamelFolderSummary *s, FILE *in)
 {
-	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(s);
+	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
 
-	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_load(s, in) == -1)
+	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_load (s, in) == -1)
 		return -1;
 
 	/* legacy version */
 	if (s->version == 0x120c)
-		return camel_file_util_decode_uint32(in, (guint32 *) &mbs->folder_size);
+		return camel_file_util_decode_uint32 (in, (guint32 *) &mbs->folder_size);
 
 	/* version 1 */
-	if (camel_file_util_decode_fixed_int32(in, (gint32 *) &mbs->version) == -1
-	    || camel_file_util_decode_gsize(in, &mbs->folder_size) == -1)
+	if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &mbs->version) == -1
+	    || camel_file_util_decode_gsize (in, &mbs->folder_size) == -1)
 		return -1;
 
 	return 0;
@@ -261,7 +261,7 @@ static CamelFIRecord *
 summary_header_to_db (CamelFolderSummary *s, GError **error)
 {
 	CamelFolderSummaryClass *folder_summary_class;
-	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(s);
+	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
 	struct _CamelFIRecord *fir;
 	gchar *tmp;
 
@@ -278,25 +278,25 @@ summary_header_to_db (CamelFolderSummary *s, GError **error)
 }
 
 static gint
-summary_header_save(CamelFolderSummary *s, FILE *out)
+summary_header_save (CamelFolderSummary *s, FILE *out)
 {
-	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY(s);
+	CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
 
-	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_save(s, out) == -1)
+	if (CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_save (s, out) == -1)
 		return -1;
 
-	camel_file_util_encode_fixed_int32(out, CAMEL_MBOX_SUMMARY_VERSION);
+	camel_file_util_encode_fixed_int32 (out, CAMEL_MBOX_SUMMARY_VERSION);
 
-	return camel_file_util_encode_gsize(out, mbs->folder_size);
+	return camel_file_util_encode_gsize (out, mbs->folder_size);
 }
 
 static CamelMessageInfo *
-message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
+message_info_new_from_header (CamelFolderSummary *s, struct _camel_header_raw *h)
 {
 	CamelMboxMessageInfo *mi;
 	CamelMboxSummary *mbs = (CamelMboxSummary *)s;
 
-	mi = (CamelMboxMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_new_from_header(s, h);
+	mi = (CamelMboxMessageInfo *)CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_new_from_header (s, h);
 	if (mi) {
 		const gchar *xev, *uid;
 		CamelMboxMessageInfo *info = NULL;
@@ -309,29 +309,29 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 			/* check for existance of status & x-status headers */
 			status = camel_header_raw_find(&h, "Status", NULL);
 			if (status)
-				flags = decode_status(status);
+				flags = decode_status (status);
 			xstatus = camel_header_raw_find(&h, "X-Status", NULL);
 			if (xstatus)
-				flags |= decode_status(xstatus);
+				flags |= decode_status (xstatus);
 		}
 #endif
 		/* if we have an xev header, use it, else assign a new one */
 		xev = camel_header_raw_find(&h, "X-Evolution", NULL);
 		if (xev != NULL
-		    && camel_local_summary_decode_x_evolution((CamelLocalSummary *)s, xev, &mi->info) == 0) {
-			uid = camel_message_info_uid(mi);
+		    && camel_local_summary_decode_x_evolution ((CamelLocalSummary *)s, xev, &mi->info) == 0) {
+			uid = camel_message_info_uid (mi);
 			d(printf("found valid x-evolution: %s\n", uid));
 			/* If one is there, it should be there already */
 			info = (CamelMboxMessageInfo *) camel_folder_summary_peek_info (s, uid);
 			if (info) {
 				if ((info->info.info.flags & CAMEL_MESSAGE_FOLDER_NOTSEEN)) {
 					info->info.info.flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
-					camel_message_info_free(mi);
+					camel_message_info_free (mi);
 					mi = info;
 				} else {
 					add = 7;
 					d(printf("seen '%s' before, adding anew\n", uid));
-					camel_message_info_free(info);
+					camel_message_info_free (info);
 				}
 			} else {
 				add = 2;
@@ -345,9 +345,9 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 		if (add&1) {
 			mi->info.info.flags |= CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_FOLDER_NOXEV;
 			camel_pstring_free (mi->info.info.uid);
-			mi->info.info.uid = camel_pstring_add(camel_folder_summary_next_uid_string(s), TRUE);
+			mi->info.info.uid = camel_pstring_add (camel_folder_summary_next_uid_string (s), TRUE);
 		} else {
-			camel_folder_summary_set_uid(s, strtoul(camel_message_info_uid(mi), NULL, 10));
+			camel_folder_summary_set_uid (s, strtoul (camel_message_info_uid (mi), NULL, 10));
 		}
 #ifdef STATUS_PINE
 		if (mbs->xstatus && add&2) {
@@ -360,9 +360,9 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 #endif
 		if (mbs->changes) {
 			if (add&2)
-				camel_folder_change_info_add_uid(mbs->changes, camel_message_info_uid(mi));
+				camel_folder_change_info_add_uid (mbs->changes, camel_message_info_uid (mi));
 			if ((add&4) && status == NULL)
-				camel_folder_change_info_recent_uid(mbs->changes, camel_message_info_uid(mi));
+				camel_folder_change_info_recent_uid (mbs->changes, camel_message_info_uid (mi));
 		}
 
 		mi->frompos = -1;
@@ -372,27 +372,27 @@ message_info_new_from_header(CamelFolderSummary *s, struct _camel_header_raw *h)
 }
 
 static CamelMessageInfo *
-message_info_new_from_parser(CamelFolderSummary *s, CamelMimeParser *mp)
+message_info_new_from_parser (CamelFolderSummary *s, CamelMimeParser *mp)
 {
 	CamelMessageInfo *mi;
 
-	mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_new_from_parser(s, mp);
+	mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_new_from_parser (s, mp);
 	if (mi) {
 		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
 
-		mbi->frompos = camel_mime_parser_tell_start_from(mp);
+		mbi->frompos = camel_mime_parser_tell_start_from (mp);
 	}
 
 	return mi;
 }
 
 static CamelMessageInfo *
-message_info_from_db(CamelFolderSummary *s, struct _CamelMIRecord *mir)
+message_info_from_db (CamelFolderSummary *s, struct _CamelMIRecord *mir)
 {
 	CamelMessageInfo *mi;
 	gchar *part;
 
-	mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_from_db(s, mir);
+	mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_from_db (s, mir);
 
 	if (mi) {
 		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
@@ -417,7 +417,7 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 		off_t ot = -1;
 		CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
 
-		if (camel_file_util_decode_off_t(in, &ot) == -1)
+		if (camel_file_util_decode_off_t (in, &ot) == -1)
 			goto error;
 
 		mbi->frompos = (goffset) ot;
@@ -425,17 +425,17 @@ message_info_migrate (CamelFolderSummary *s, FILE *in)
 
 	return mi;
 error:
-	camel_message_info_free(mi);
+	camel_message_info_free (mi);
 	return NULL;
 }
 
 static struct _CamelMIRecord *
-message_info_to_db(CamelFolderSummary *s, CamelMessageInfo *info)
+message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info)
 {
 	CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)info;
 	struct _CamelMIRecord *mir;
 
-	mir = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_to_db(s, info);
+	mir = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_to_db (s, info);
 	mir->bdata = g_strdup_printf("%" G_GOFFSET_FORMAT, mbi->frompos);
 
 	return mir;
@@ -443,7 +443,7 @@ message_info_to_db(CamelFolderSummary *s, CamelMessageInfo *info)
 
 /* like summary_rebuild, but also do changeinfo stuff (if supplied) */
 static gint
-summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *changeinfo, GError **error)
+summary_update (CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *changeinfo, GError **error)
 {
 	gint i, count;
 	CamelFolderSummary *s = (CamelFolderSummary *)cls;
@@ -464,7 +464,7 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
 
 	camel_operation_start(NULL, _("Storing folder"));
 
-	fd = g_open(cls->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
+	fd = g_open (cls->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
 	if (fd == -1) {
 		d(printf("%s failed to open: %s\n", cls->folder_path, g_strerror (errno)));
 		g_set_error (
@@ -472,27 +472,27 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
 			g_io_error_from_errno (errno),
 			_("Could not open folder: %s: %s"),
 			cls->folder_path, g_strerror (errno));
-		camel_operation_end(NULL);
+		camel_operation_end (NULL);
 		return -1;
 	}
 
-	if (fstat(fd, &st) == 0)
+	if (fstat (fd, &st) == 0)
 		size = st.st_size;
 
-	mp = camel_mime_parser_new();
-	camel_mime_parser_init_with_fd(mp, fd);
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_seek(mp, offset, SEEK_SET);
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_init_with_fd (mp, fd);
+	camel_mime_parser_scan_from (mp, TRUE);
+	camel_mime_parser_seek (mp, offset, SEEK_SET);
 
 	if (offset > 0) {
-		if (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM
-		    && camel_mime_parser_tell_start_from(mp) == offset) {
-			camel_mime_parser_unstep(mp);
+		if (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM
+		    && camel_mime_parser_tell_start_from (mp) == offset) {
+			camel_mime_parser_unstep (mp);
 		} else {
 			g_warning("The next message didn't start where I expected, building summary from start");
-			camel_mime_parser_drop_step(mp);
+			camel_mime_parser_drop_step (mp);
 			offset = 0;
-			camel_mime_parser_seek(mp, offset, SEEK_SET);
+			camel_mime_parser_seek (mp, offset, SEEK_SET);
 		}
 	}
 
@@ -500,24 +500,24 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
 	   If we're not starting from the start, we must be starting
 	   from the old end, so everything must be treated as new */
 	camel_folder_summary_prepare_fetch_all (s, NULL);
-	count = camel_folder_summary_count(s);
+	count = camel_folder_summary_count (s);
 	for (i=0;i<count;i++) {
-		mi = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
+		mi = (CamelMboxMessageInfo *)camel_folder_summary_index (s, i);
 		if (offset == 0)
 			mi->info.info.flags |= CAMEL_MESSAGE_FOLDER_NOTSEEN;
 		else
 			mi->info.info.flags &= ~CAMEL_MESSAGE_FOLDER_NOTSEEN;
-		camel_message_info_free(mi);
+		camel_message_info_free (mi);
 	}
 	mbs->changes = changeinfo;
 
-	while (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
+	while (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM) {
 		CamelMessageInfo *info;
 		goffset pc = camel_mime_parser_tell_start_from (mp) + 1;
 
 		camel_operation_progress (NULL, (gint) (((gfloat) pc / size) * 100));
 
-		info = camel_folder_summary_add_from_parser(s, mp);
+		info = camel_folder_summary_add_from_parser (s, mp);
 		if (info == NULL) {
 			gchar *pos_str;
 
@@ -537,14 +537,14 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
 			break;
 		}
 
-		g_assert(camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END);
+		g_assert (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END);
 	}
 
 	g_object_unref (CAMEL_OBJECT (mp));
 
-	count = camel_folder_summary_count(s);
+	count = camel_folder_summary_count (s);
 	for (i=0;i<count;i++) {
-		mi = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
+		mi = (CamelMboxMessageInfo *)camel_folder_summary_index (s, i);
 		/* must've dissapeared from the file? */
 		if (!mi || mi->info.info.flags & CAMEL_MESSAGE_FOLDER_NOTSEEN) {
 			gchar *uid;
@@ -583,20 +583,20 @@ summary_update(CamelLocalSummary *cls, goffset offset, CamelFolderChangeInfo *ch
 
 	/* update the file size/mtime in the summary */
 	if (ok != -1) {
-		if (g_stat(cls->folder_path, &st) == 0) {
-			camel_folder_summary_touch(s);
+		if (g_stat (cls->folder_path, &st) == 0) {
+			camel_folder_summary_touch (s);
 			mbs->folder_size = st.st_size;
 			s->time = st.st_mtime;
 		}
 	}
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return ok;
 }
 
 static gint
-mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GError **error)
+mbox_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GError **error)
 {
 	CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
 	CamelFolderSummary *s = (CamelFolderSummary *)cls;
@@ -607,8 +607,8 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GErro
 	d(printf("Checking summary\n"));
 
 	/* check if the summary is up-to-date */
-	if (g_stat(cls->folder_path, &st) == -1) {
-		camel_folder_summary_clear(s);
+	if (g_stat (cls->folder_path, &st) == -1) {
+		camel_folder_summary_clear (s);
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -625,16 +625,16 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GErro
 		/* empty?  No need to scan at all */
 		d(printf("Empty mbox, clearing summary\n"));
 		camel_folder_summary_prepare_fetch_all (s, NULL);
-		count= camel_folder_summary_count(s);
+		count= camel_folder_summary_count (s);
 		for (i=0;i<count;i++) {
-			CamelMessageInfo *info = camel_folder_summary_index(s, i);
+			CamelMessageInfo *info = camel_folder_summary_index (s, i);
 
 			if (info) {
-				camel_folder_change_info_remove_uid(changes, camel_message_info_uid(info));
-				camel_message_info_free(info);
+				camel_folder_change_info_remove_uid (changes, camel_message_info_uid (info));
+				camel_message_info_free (info);
 			}
 		}
-		camel_folder_summary_clear(s);
+		camel_folder_summary_clear (s);
 		ret = 0;
 	} else {
 		/* is the summary uptodate? */
@@ -642,10 +642,10 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GErro
 			if (mbs->folder_size < st.st_size) {
 				/* this will automatically rescan from 0 if there is a problem */
 				d(printf("folder grew, attempting to rebuild from %d\n", mbs->folder_size));
-				ret = summary_update(cls, mbs->folder_size, changes, error);
+				ret = summary_update (cls, mbs->folder_size, changes, error);
 			} else {
 				d(printf("folder shrank!  rebuilding from start\n"));
-				 ret = summary_update(cls, 0, changes, error);
+				 ret = summary_update (cls, 0, changes, error);
 			}
 		} else {
 			d(printf("Folder unchanged, do nothing\n"));
@@ -658,7 +658,7 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GErro
 		if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
 			mbs->folder_size = st.st_size;
 			s->time = st.st_mtime;
-			camel_folder_summary_touch(s);
+			camel_folder_summary_touch (s);
 		}
 	}
 
@@ -667,7 +667,7 @@ mbox_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changes, GErro
 
 /* perform a full sync */
 static gint
-mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
+mbox_summary_sync_full (CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
 {
 	CamelLocalSummary *cls = (CamelLocalSummary *)mbs;
 	gint fd = -1, fdout = -1;
@@ -678,21 +678,21 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang
 
 	camel_operation_start(NULL, _("Storing folder"));
 
-	fd = g_open(cls->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
+	fd = g_open (cls->folder_path, O_LARGEFILE | O_RDONLY | O_BINARY, 0);
 	if (fd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not open file: %s: %s"),
 			cls->folder_path, g_strerror (errno));
-		camel_operation_end(NULL);
+		camel_operation_end (NULL);
 		return -1;
 	}
 
 	tmpname = g_alloca (strlen (cls->folder_path) + 5);
 	sprintf (tmpname, "%s.tmp", cls->folder_path);
 	d(printf("Writing temporary file to %s\n", tmpname));
-	fdout = g_open(tmpname, O_LARGEFILE|O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0600);
+	fdout = g_open (tmpname, O_LARGEFILE|O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0600);
 	if (fdout == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -702,12 +702,12 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang
 		goto error;
 	}
 
-	if (camel_mbox_summary_sync_mbox((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, error) == -1)
+	if (camel_mbox_summary_sync_mbox ((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, error) == -1)
 		goto error;
 
 	d(printf("Closing folders\n"));
 
-	if (close(fd) == -1) {
+	if (close (fd) == -1) {
 		g_warning("Cannot close source folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -718,7 +718,7 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang
 		goto error;
 	}
 
-	if (close(fdout) == -1) {
+	if (close (fdout) == -1) {
 		g_warning("Cannot close temporary folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -732,10 +732,10 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang
 	/* this should probably either use unlink/link/unlink, or recopy over
 	   the original mailbox, for various locking reasons/etc */
 #ifdef G_OS_WIN32
-	if (g_file_test(cls->folder_path,G_FILE_TEST_IS_REGULAR) && g_remove(cls->folder_path) == -1)
+	if (g_file_test (cls->folder_path,G_FILE_TEST_IS_REGULAR) && g_remove (cls->folder_path) == -1)
 		g_warning ("Cannot remove %s: %s", cls->folder_path, g_strerror (errno));
 #endif
-	if (g_rename(tmpname, cls->folder_path) == -1) {
+	if (g_rename (tmpname, cls->folder_path) == -1) {
 		g_warning("Cannot rename folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -746,20 +746,20 @@ mbox_summary_sync_full(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChang
 	}
 	tmpname = NULL;
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return 0;
  error:
 	if (fd != -1)
-		close(fd);
+		close (fd);
 
 	if (fdout != -1)
-		close(fdout);
+		close (fdout);
 
 	if (tmpname)
-		g_unlink(tmpname);
+		g_unlink (tmpname);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return -1;
 }
@@ -790,7 +790,7 @@ cms_sort_frompos (gpointer a, gpointer b, gpointer data)
 
 /* perform a quick sync - only system flags have changed */
 static gint
-mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
+mbox_summary_sync_quick (CamelMboxSummary *mbs, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
 {
 	CamelLocalSummary *cls = (CamelLocalSummary *)mbs;
 	CamelFolderSummary *s = (CamelFolderSummary *)mbs;
@@ -808,7 +808,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
 
 	camel_operation_start(NULL, _("Storing folder"));
 
-	fd = g_open(cls->folder_path, O_LARGEFILE|O_RDWR|O_BINARY, 0);
+	fd = g_open (cls->folder_path, O_LARGEFILE|O_RDWR|O_BINARY, 0);
 	if (fd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -816,26 +816,26 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
 			_("Could not open file: %s: %s"),
 			cls->folder_path, g_strerror (errno));
 
-		camel_operation_end(NULL);
+		camel_operation_end (NULL);
 		return -1;
 	}
 
 	/* need to dup since mime parser closes its fd once it is finalized */
-	pfd = dup(fd);
+	pfd = dup (fd);
 	if (pfd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not store folder: %s"),
-			g_strerror(errno));
-		close(fd);
+			g_strerror (errno));
+		close (fd);
 		return -1;
 	}
 
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_scan_pre_from(mp, TRUE);
-	camel_mime_parser_init_with_fd(mp, pfd);
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_scan_from (mp, TRUE);
+	camel_mime_parser_scan_pre_from (mp, TRUE);
+	camel_mime_parser_init_with_fd (mp, pfd);
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	/* Sync only the changes */
@@ -847,84 +847,84 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
 		gint xevoffset;
 		gint pc = (i+1)*100/summary->len;
 
-		camel_operation_progress(NULL, pc);
+		camel_operation_progress (NULL, pc);
 
-		info = (CamelMboxMessageInfo *)camel_folder_summary_uid(s, summary->pdata[i]);
+		info = (CamelMboxMessageInfo *)camel_folder_summary_uid (s, summary->pdata[i]);
 
 		d(printf("Checking message %s %08x\n", camel_message_info_uid(info), ((CamelMessageInfoBase *)info)->flags));
 
 		if ((info->info.info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) == 0) {
-			camel_message_info_free((CamelMessageInfo *)info);
+			camel_message_info_free ((CamelMessageInfo *)info);
 			info = NULL;
 			continue;
 		}
 
 		d(printf("Updating message %s: %d\n", camel_message_info_uid(info), (gint)info->frompos));
 
-		camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
+		camel_mime_parser_seek (mp, info->frompos, SEEK_SET);
 
-		if (camel_mime_parser_step(mp, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM) {
+		if (camel_mime_parser_step (mp, NULL, NULL) != CAMEL_MIME_PARSER_STATE_FROM) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("MBOX file is corrupted, please fix it. (Expected a From line, but didn't get it.)"));
 			goto error;
 		}
 
-		if (camel_mime_parser_tell_start_from(mp) != info->frompos) {
+		if (camel_mime_parser_tell_start_from (mp) != info->frompos) {
 			g_warning("Didn't get the next message where I expected (%d) got %d instead",
-				  (gint)info->frompos, (gint)camel_mime_parser_tell_start_from(mp));
+				  (gint)info->frompos, (gint)camel_mime_parser_tell_start_from (mp));
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Summary and folder mismatch, even after a sync"));
 			goto error;
 		}
 
-		if (camel_mime_parser_step(mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END) {
+		if (camel_mime_parser_step (mp, NULL, NULL) == CAMEL_MIME_PARSER_STATE_FROM_END) {
 			g_warning("camel_mime_parser_step failed (2)");
 			goto error;
 		}
 
 		xev = camel_mime_parser_header(mp, "X-Evolution", &xevoffset);
-		if (xev == NULL || camel_local_summary_decode_x_evolution(cls, xev, NULL) == -1) {
+		if (xev == NULL || camel_local_summary_decode_x_evolution (cls, xev, NULL) == -1) {
 			g_warning("We're supposed to have a valid x-ev header, but we dont");
 			goto error;
 		}
-		xevnew = camel_local_summary_encode_x_evolution(cls, &info->info);
+		xevnew = camel_local_summary_encode_x_evolution (cls, &info->info);
 		/* SIGH: encode_param_list is about the only function which folds headers by itself.
 		   This should be fixed somehow differently (either parser doesn't fold headers,
 		   or param_list doesn't, or something */
-		xevtmp = camel_header_unfold(xevnew);
+		xevtmp = camel_header_unfold (xevnew);
 		/* the raw header contains a leading ' ', so (dis)count that too */
-		if (strlen(xev)-1 != strlen(xevtmp)) {
-			g_free(xevnew);
-			g_free(xevtmp);
+		if (strlen (xev)-1 != strlen (xevtmp)) {
+			g_free (xevnew);
+			g_free (xevtmp);
 			g_warning("Hmm, the xev headers shouldn't have changed size, but they did");
 			goto error;
 		}
-		g_free(xevtmp);
+		g_free (xevtmp);
 
 		/* we write out the xevnew string, assuming its been folded identically to the original too! */
 
-		lastpos = lseek(fd, 0, SEEK_CUR);
+		lastpos = lseek (fd, 0, SEEK_CUR);
 		lseek(fd, xevoffset+strlen("X-Evolution: "), SEEK_SET);
 		do {
-			len = write(fd, xevnew, strlen(xevnew));
+			len = write (fd, xevnew, strlen (xevnew));
 		} while (len == -1 && errno == EINTR);
-		lseek(fd, lastpos, SEEK_SET);
-		g_free(xevnew);
+		lseek (fd, lastpos, SEEK_SET);
+		g_free (xevnew);
 
-		camel_mime_parser_drop_step(mp);
-		camel_mime_parser_drop_step(mp);
+		camel_mime_parser_drop_step (mp);
+		camel_mime_parser_drop_step (mp);
 
 		info->info.info.flags &= 0xffff;
 		info->info.info.dirty = TRUE;
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 		info = NULL;
 	}
 
 	d(printf("Closing folders\n"));
 
-	if (close(fd) == -1) {
+	if (close (fd) == -1) {
 		g_warning ("Cannot close source folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -939,7 +939,7 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
 	g_ptr_array_free (summary, TRUE);
 	g_object_unref (mp);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	return 0;
@@ -947,20 +947,20 @@ mbox_summary_sync_quick(CamelMboxSummary *mbs, gboolean expunge, CamelFolderChan
 	g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
 	g_ptr_array_free (summary, TRUE);
 	if (fd != -1)
-		close(fd);
+		close (fd);
 	if (mp)
 		g_object_unref (mp);
 	if (info)
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
 	return -1;
 }
 
 static gint
-mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
+mbox_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error)
 {
 	struct stat st;
 	CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
@@ -973,7 +973,7 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
 	GPtrArray *summary = NULL;
 
 	/* first, sync ourselves up, just to make sure */
-	if (camel_local_summary_check(cls, changeinfo, error) == -1)
+	if (camel_local_summary_check (cls, changeinfo, error) == -1)
 		return -1;
 
 	full_name = camel_folder_get_full_name (s->folder);
@@ -983,14 +983,14 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
 
 	summary = camel_folder_summary_get_changed ((CamelFolderSummary *)mbs);
 	for (i=0; i<summary->len; i++) {
-		CamelMboxMessageInfo *info = (CamelMboxMessageInfo *)camel_folder_summary_uid(s, summary->pdata[i]);
+		CamelMboxMessageInfo *info = (CamelMboxMessageInfo *)camel_folder_summary_uid (s, summary->pdata[i]);
 
 		if ((expunge && (info->info.info.flags & CAMEL_MESSAGE_DELETED)) ||
 		    (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_XEVCHANGE)))
 			quick = FALSE;
 		else
 			work |= (info->info.info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED) != 0;
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
 	g_ptr_array_foreach (summary, (GFunc) camel_pstring_free, NULL);
@@ -1022,7 +1022,7 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
 	if (ret == -1)
 		return -1;
 
-	if (g_stat(cls->folder_path, &st) == -1) {
+	if (g_stat (cls->folder_path, &st) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -1033,14 +1033,14 @@ mbox_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInf
 	if (mbs->folder_size != st.st_size || s->time != st.st_mtime) {
 		s->time = st.st_mtime;
 		mbs->folder_size = st.st_size;
-		camel_folder_summary_touch(s);
+		camel_folder_summary_touch (s);
 	}
 
-	return CAMEL_LOCAL_SUMMARY_CLASS (camel_mbox_summary_parent_class)->sync(cls, expunge, changeinfo, error);
+	return CAMEL_LOCAL_SUMMARY_CLASS (camel_mbox_summary_parent_class)->sync (cls, expunge, changeinfo, error);
 }
 
 gint
-camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, gint fd, gint fdout, GError **error)
+camel_mbox_summary_sync_mbox (CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, gint fd, gint fdout, GError **error)
 {
 	CamelMboxSummary *mbs = (CamelMboxSummary *)cls;
 	CamelFolderSummary *s = (CamelFolderSummary *)mbs;
@@ -1062,7 +1062,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 	d(printf("performing full summary/sync\n"));
 
 	/* need to dup this because the mime-parser owns the fd after we give it to it */
-	fd = dup(fd);
+	fd = dup (fd);
 	if (fd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -1072,20 +1072,20 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 		return -1;
 	}
 
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, TRUE);
-	camel_mime_parser_scan_pre_from(mp, TRUE);
-	camel_mime_parser_init_with_fd(mp, fd);
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_scan_from (mp, TRUE);
+	camel_mime_parser_scan_pre_from (mp, TRUE);
+	camel_mime_parser_init_with_fd (mp, fd);
 
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 	camel_folder_summary_prepare_fetch_all (s, NULL);
-	count = camel_folder_summary_count(s);
+	count = camel_folder_summary_count (s);
 	for (i = 0; i < count; i++) {
 		gint pc = (i + 1) * 100 / count;
 
-		camel_operation_progress(NULL, pc);
+		camel_operation_progress (NULL, pc);
 
-		info = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
+		info = (CamelMboxMessageInfo *)camel_folder_summary_index (s, i);
 
 		if (!info)
 			continue;
@@ -1094,18 +1094,18 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 
 		d(printf("seeking (%s) to %d\n", ((CamelMessageInfo *) info)->uid, (gint)info->frompos));
 		if (lastdel)
-			camel_mime_parser_seek(mp, info->frompos, SEEK_SET);
+			camel_mime_parser_seek (mp, info->frompos, SEEK_SET);
 
-		if (camel_mime_parser_step(mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM) {
+		if (camel_mime_parser_step (mp, &buffer, &len) != CAMEL_MIME_PARSER_STATE_FROM) {
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("MBOX file is corrupted, please fix it. (Expected a From line, but didn't get it.)"));
 			goto error;
 		}
 
-		if (camel_mime_parser_tell_start_from(mp) != info->frompos) {
+		if (camel_mime_parser_tell_start_from (mp) != info->frompos) {
 			g_warning("Didn't get the next message where I expected (%d) got %d instead",
-				  (gint)info->frompos, (gint)camel_mime_parser_tell_start_from(mp));
+				  (gint)info->frompos, (gint)camel_mime_parser_tell_start_from (mp));
 			g_set_error (
 				error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 				_("Summary and folder mismatch, even after a sync"));
@@ -1114,13 +1114,13 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 
 		lastdel = FALSE;
 		if ((flags&1) && info->info.info.flags & CAMEL_MESSAGE_DELETED) {
-			const gchar *uid = camel_message_info_uid(info);
-			guint32 flags = camel_message_info_flags(info);
+			const gchar *uid = camel_message_info_uid (info);
+			guint32 flags = camel_message_info_flags (info);
 			gint read, junk;
 			d(printf("Deleting %s\n", uid));
 
 			if (((CamelLocalSummary *)cls)->index)
-				camel_index_delete_name(((CamelLocalSummary *)cls)->index, uid);
+				camel_index_delete_name (((CamelLocalSummary *)cls)->index, uid);
 
 			/* remove it from the change list */
 			junk = flags & CAMEL_MESSAGE_JUNK;
@@ -1131,10 +1131,10 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 			if (!read)
 				s->unread_count--;
 			s->deleted_count--;
-			camel_folder_change_info_remove_uid(changeinfo, uid);
+			camel_folder_change_info_remove_uid (changeinfo, uid);
 			camel_folder_summary_remove_index_fast (s, i);
-			del = g_slist_prepend (del, (gpointer) camel_pstring_strdup(uid));
-			camel_message_info_free((CamelMessageInfo *)info);
+			del = g_slist_prepend (del, (gpointer) camel_pstring_strdup (uid));
+			camel_message_info_free ((CamelMessageInfo *)info);
 			count--;
 			i--;
 			info = NULL;
@@ -1146,30 +1146,30 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 			if (i>0)
 				write(fdout, "\n", 1);
 #endif
-			info->frompos = lseek(fdout, 0, SEEK_CUR);
+			info->frompos = lseek (fdout, 0, SEEK_CUR);
 			((CamelMessageInfo *)info)->dirty = TRUE;
-			fromline = camel_mime_parser_from_line(mp);
+			fromline = camel_mime_parser_from_line (mp);
 			d(printf("Saving %s:%d\n", camel_message_info_uid(info), info->frompos));
-			write(fdout, fromline, strlen(fromline));
+			write (fdout, fromline, strlen (fromline));
 		}
 
 		if (info && info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV | CAMEL_MESSAGE_FOLDER_FLAGGED)) {
 			d(printf("Updating header for %s flags = %08x\n", camel_message_info_uid(info), info->info.flags));
 
-			if (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM_END) {
+			if (camel_mime_parser_step (mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_FROM_END) {
 				g_warning("camel_mime_parser_step failed (2)");
 				goto error;
 			}
 
-			xevnew = camel_local_summary_encode_x_evolution((CamelLocalSummary *)cls, &info->info);
+			xevnew = camel_local_summary_encode_x_evolution ((CamelLocalSummary *)cls, &info->info);
 #ifdef STATUS_PINE
 			if (mbs->xstatus) {
-				encode_status(info->info.info.flags & STATUS_STATUS, statnew);
-				encode_status(info->info.info.flags & STATUS_XSTATUS, xstatnew);
-				len = camel_local_summary_write_headers(fdout, camel_mime_parser_headers_raw(mp), xevnew, statnew, xstatnew);
+				encode_status (info->info.info.flags & STATUS_STATUS, statnew);
+				encode_status (info->info.info.flags & STATUS_XSTATUS, xstatnew);
+				len = camel_local_summary_write_headers (fdout, camel_mime_parser_headers_raw (mp), xevnew, statnew, xstatnew);
 			} else {
 #endif
-				len = camel_local_summary_write_headers(fdout, camel_mime_parser_headers_raw(mp), xevnew, NULL, NULL);
+				len = camel_local_summary_write_headers (fdout, camel_mime_parser_headers_raw (mp), xevnew, NULL, NULL);
 #ifdef STATUS_PINE
 			}
 #endif
@@ -1183,17 +1183,17 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 				goto error;
 			}
 			info->info.info.flags &= 0xffff;
-			g_free(xevnew);
+			g_free (xevnew);
 			xevnew = NULL;
-			camel_mime_parser_drop_step(mp);
+			camel_mime_parser_drop_step (mp);
 		}
 
-		camel_mime_parser_drop_step(mp);
+		camel_mime_parser_drop_step (mp);
 		if (info) {
 			d(printf("looking for message content to copy across from %d\n", (gint)camel_mime_parser_tell(mp)));
-			while (camel_mime_parser_step(mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_PRE_FROM) {
+			while (camel_mime_parser_step (mp, &buffer, &len) == CAMEL_MIME_PARSER_STATE_PRE_FROM) {
 				/*d(printf("copying mbox contents to temporary: '%.*s'\n", len, buffer));*/
-				if (write(fdout, buffer, len) != len) {
+				if (write (fdout, buffer, len) != len) {
 					g_set_error (
 						error, G_IO_ERROR,
 						g_io_error_from_errno (errno),
@@ -1214,9 +1214,9 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 			}
 
 			d(printf("we are now at %d, from = %d\n", (gint)camel_mime_parser_tell(mp),
-				 (gint)camel_mime_parser_tell_start_from(mp)));
-			camel_mime_parser_unstep(mp);
-			camel_message_info_free((CamelMessageInfo *)info);
+				 (gint)camel_mime_parser_tell_start_from (mp)));
+			camel_mime_parser_unstep (mp);
+			camel_message_info_free ((CamelMessageInfo *)info);
 			info = NULL;
 		}
 	}
@@ -1237,16 +1237,16 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 
 	/* clear working flags */
 	for (i=0; i<count; i++) {
-		info = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
+		info = (CamelMboxMessageInfo *)camel_folder_summary_index (s, i);
 		if (info) {
 			if (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED|CAMEL_MESSAGE_FOLDER_XEVCHANGE)) {
 				info->info.info.flags &= ~(CAMEL_MESSAGE_FOLDER_NOXEV
 							   |CAMEL_MESSAGE_FOLDER_FLAGGED
 							   |CAMEL_MESSAGE_FOLDER_XEVCHANGE);
 				((CamelMessageInfo *)info)->dirty = TRUE;
-				camel_folder_summary_touch(s);
+				camel_folder_summary_touch (s);
 			}
-			camel_message_info_free((CamelMessageInfo *)info);
+			camel_message_info_free ((CamelMessageInfo *)info);
 			info = NULL;
 		}
 	}
@@ -1258,12 +1258,12 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 
 	return 0;
  error:
-	g_free(xevnew);
+	g_free (xevnew);
 
 	if (mp)
 		g_object_unref (mp);
 	if (info)
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 
 	camel_folder_summary_unlock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
 
@@ -1272,7 +1272,7 @@ camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderCh
 
 #ifdef STATUS_PINE
 static CamelMessageInfo *
-mbox_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error)
+mbox_summary_add (CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *ci, GError **error)
 {
 	CamelLocalSummaryClass *local_summary_class;
 	CamelMboxMessageInfo *mi;
@@ -1285,9 +1285,9 @@ mbox_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, const CamelMessa
 		gchar status[8];
 
 		/* we snoop and add status/x-status headers to suit */
-		encode_status(mi->info.info.flags & STATUS_STATUS, status);
+		encode_status (mi->info.info.flags & STATUS_STATUS, status);
 		camel_medium_set_header((CamelMedium *)msg, "Status", status);
-		encode_status(mi->info.info.flags & STATUS_XSTATUS, status);
+		encode_status (mi->info.info.flags & STATUS_XSTATUS, status);
 		camel_medium_set_header((CamelMedium *)msg, "X-Status", status);
 	}
 
@@ -1305,7 +1305,7 @@ static struct {
 };
 
 static void
-encode_status(guint32 flags, gchar status[8])
+encode_status (guint32 flags, gchar status[8])
 {
 	gsize i;
 	gchar *p;
@@ -1319,7 +1319,7 @@ encode_status(guint32 flags, gchar status[8])
 }
 
 static guint32
-decode_status(const gchar *status)
+decode_status (const gchar *status)
 {
 	const gchar *p;
 	guint32 flags = 0;
diff --git a/camel/providers/local/camel-mbox-summary.h b/camel/providers/local/camel-mbox-summary.h
index d05b6a8..1bf8d1d 100644
--- a/camel/providers/local/camel-mbox-summary.h
+++ b/camel/providers/local/camel-mbox-summary.h
@@ -84,10 +84,10 @@ GType		camel_mbox_summary_get_type	(void);
 CamelMboxSummary      *camel_mbox_summary_new	(struct _CamelFolder *, const gchar *filename, const gchar *mbox_name, CamelIndex *index);
 
 /* do we honour/use xstatus headers, etc */
-void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, gint state);
+void camel_mbox_summary_xstatus (CamelMboxSummary *mbs, gint state);
 
 /* build a new mbox from an existing mbox storing summary information */
-gint camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, gint fd, gint fdout, GError **error);
+gint camel_mbox_summary_sync_mbox (CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, gint fd, gint fdout, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-mh-folder.c b/camel/providers/local/camel-mh-folder.c
index 0ca279c..3e0752a 100644
--- a/camel/providers/local/camel-mh-folder.c
+++ b/camel/providers/local/camel-mh-folder.c
@@ -40,10 +40,10 @@
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
-static CamelLocalSummary *mh_create_summary(CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
+static CamelLocalSummary *mh_create_summary (CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
 
-static gboolean mh_append_message(CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo *info, gchar **appended_uid, GError **error);
-static CamelMimeMessage *mh_get_message(CamelFolder *folder, const gchar *uid, GError **error);
+static gboolean mh_append_message (CamelFolder *folder, CamelMimeMessage * message, const CamelMessageInfo *info, gchar **appended_uid, GError **error);
+static CamelMimeMessage *mh_get_message (CamelFolder *folder, const gchar *uid, GError **error);
 static gchar * mh_get_filename (CamelFolder *folder, const gchar *uid, GError **error);
 
 G_DEFINE_TYPE (CamelMhFolder, camel_mh_folder, CAMEL_TYPE_LOCAL_FOLDER)
@@ -124,7 +124,7 @@ mh_append_message (CamelFolder *folder,
 		return FALSE;
 
 	/* add it to the summary/assign the uid, etc */
-	mi = camel_local_summary_add((CamelLocalSummary *)folder->summary, message, info, lf->changes, error);
+	mi = camel_local_summary_add ((CamelLocalSummary *)folder->summary, message, info, lf->changes, error);
 	if (mi == NULL)
 		goto check_changed;
 
@@ -148,7 +148,7 @@ mh_append_message (CamelFolder *folder,
 	/* close this? */
 	g_object_unref (CAMEL_OBJECT (output_stream));
 
-	g_free(name);
+	g_free (name);
 
 	if (appended_uid)
 		*appended_uid = g_strdup(camel_message_info_uid(mi));
@@ -209,7 +209,7 @@ mh_get_message (CamelFolder *folder,
 		return NULL;
 
 	/* get the message summary info */
-	if ((info = camel_folder_summary_uid(folder->summary, uid)) == NULL) {
+	if ((info = camel_folder_summary_uid (folder->summary, uid)) == NULL) {
 		set_cannot_get_message_ex (
 			error, CAMEL_FOLDER_ERROR_INVALID_UID,
 			uid, lf->folder_path, _("No such message"));
@@ -217,7 +217,7 @@ mh_get_message (CamelFolder *folder,
 	}
 
 	/* we only need it to check the message exists */
-	camel_message_info_free(info);
+	camel_message_info_free (info);
 
 	name = g_strdup_printf("%s/%s", lf->folder_path, uid);
 	message_stream = camel_stream_fs_new_with_name (
@@ -229,8 +229,8 @@ mh_get_message (CamelFolder *folder,
 		goto fail;
 	}
 
-	message = camel_mime_message_new();
-	if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, message_stream, error) == -1) {
+	message = camel_mime_message_new ();
+	if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, message_stream, error) == -1) {
 		g_prefix_error (
 			error, _("Cannot get message %s from folder %s: "),
 			name, lf->folder_path);
diff --git a/camel/providers/local/camel-mh-folder.h b/camel/providers/local/camel-mh-folder.h
index 264f36c..11dbf4e 100644
--- a/camel/providers/local/camel-mh-folder.h
+++ b/camel/providers/local/camel-mh-folder.h
@@ -57,9 +57,9 @@ struct _CamelMhFolderClass {
 };
 
 /* public methods */
-CamelFolder *camel_mh_folder_new(CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
+CamelFolder *camel_mh_folder_new (CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
 
-GType camel_mh_folder_get_type(void);
+GType camel_mh_folder_get_type (void);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-mh-store.c b/camel/providers/local/camel-mh-store.c
index 7ff99bb..f64923b 100644
--- a/camel/providers/local/camel-mh-store.c
+++ b/camel/providers/local/camel-mh-store.c
@@ -39,10 +39,10 @@
 #define d(x)
 
 static gboolean construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error);
-static CamelFolder *get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
+static CamelFolder *get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error);
 static CamelFolder *get_inbox (CamelStore *store, GError **error);
-static gboolean delete_folder(CamelStore *store, const gchar *folder_name, GError **error);
-static gboolean rename_folder(CamelStore *store, const gchar *old, const gchar *new, GError **error);
+static gboolean delete_folder (CamelStore *store, const gchar *folder_name, GError **error);
+static gboolean rename_folder (CamelStore *store, const gchar *old, const gchar *new, GError **error);
 static CamelFolderInfo * get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error);
 
 G_DEFINE_TYPE (CamelMhStore, camel_mh_store, CAMEL_TYPE_LOCAL_STORE)
@@ -106,7 +106,7 @@ folders_update (const gchar *root,
 {
 	gchar *tmp, *tmpnew, *line = NULL;
 	CamelStream *stream, *in = NULL, *out = NULL;
-	gint flen = strlen(folder);
+	gint flen = strlen (folder);
 
 	tmpnew = g_alloca (strlen (root) + 16);
 	sprintf (tmpnew, "%s.folders~", root);
@@ -120,7 +120,7 @@ folders_update (const gchar *root,
 	sprintf (tmp, "%s.folders", root);
 	stream = camel_stream_fs_new_with_name (tmp, O_RDONLY, 0, NULL);
 	if (stream) {
-		in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
+		in = camel_stream_buffer_new (stream, CAMEL_STREAM_BUFFER_READ);
 		g_object_unref (stream);
 	}
 	if (in == NULL || stream == NULL) {
@@ -129,26 +129,26 @@ folders_update (const gchar *root,
 		goto done;
 	}
 
-	while ((line = camel_stream_buffer_read_line((CamelStreamBuffer *)in, NULL))) {
+	while ((line = camel_stream_buffer_read_line ((CamelStreamBuffer *)in, NULL))) {
 		gint copy = TRUE;
 
 		switch (mode) {
 		case UPDATE_REMOVE:
-			if (strcmp(line, folder) == 0)
+			if (strcmp (line, folder) == 0)
 				copy = FALSE;
 			break;
 		case UPDATE_RENAME:
-			if (strncmp(line, folder, flen) == 0
+			if (strncmp (line, folder, flen) == 0
 			    && (line[flen] == 0 || line[flen] == '/')) {
-				if (camel_stream_write(out, new, strlen(new), NULL) == -1
-				    || camel_stream_write(out, line+flen, strlen(line)-flen, NULL) == -1
+				if (camel_stream_write (out, new, strlen (new), NULL) == -1
+				    || camel_stream_write (out, line+flen, strlen (line)-flen, NULL) == -1
 				    || camel_stream_write(out, "\n", 1, NULL) == -1)
 					goto fail;
 				copy = FALSE;
 			}
 			break;
 		case UPDATE_ADD: {
-			gint cmp = strcmp(line, folder);
+			gint cmp = strcmp (line, folder);
 
 			if (cmp > 0) {
 				/* found insertion point */
@@ -167,7 +167,7 @@ folders_update (const gchar *root,
 		if (copy && camel_stream_printf(out, "%s\n", line) == -1)
 			goto fail;
 
-		g_free(line);
+		g_free (line);
 		line = NULL;
 	}
 
@@ -175,15 +175,15 @@ folders_update (const gchar *root,
 	if (mode == UPDATE_ADD && camel_stream_printf(out, "%s\n", folder) == -1)
 		goto fail;
 
-	if (camel_stream_close(out, NULL) == -1)
+	if (camel_stream_close (out, NULL) == -1)
 		goto fail;
 
 done:
 	/* should we care if this fails?  I suppose so ... */
 	g_rename (tmpnew, tmp);
 fail:
-	unlink(tmpnew);		/* remove it if its there */
-	g_free(line);
+	unlink (tmpnew);		/* remove it if its there */
+	g_free (line);
 	if (in)
 		g_object_unref (in);
 	if (out)
@@ -207,7 +207,7 @@ get_folder (CamelStore *store,
 
 	name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
 
-	if (g_stat(name, &st) == -1) {
+	if (g_stat (name, &st) == -1) {
 		if (errno != ENOENT) {
 			g_set_error (
 				error, G_IO_ERROR,
@@ -227,7 +227,7 @@ get_folder (CamelStore *store,
 			return NULL;
 		}
 
-		if (mkdir(name, 0777) != 0) {
+		if (mkdir (name, 0777) != 0) {
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
@@ -240,8 +240,8 @@ get_folder (CamelStore *store,
 		/* add to .folders if we are supposed to */
 		/* FIXME: throw exception on error */
 		if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS)
-			folders_update(((CamelLocalStore *)store)->toplevel_dir, UPDATE_ADD, folder_name, NULL);
-	} else if (!S_ISDIR(st.st_mode)) {
+			folders_update (((CamelLocalStore *)store)->toplevel_dir, UPDATE_ADD, folder_name, NULL);
+	} else if (!S_ISDIR (st.st_mode)) {
 		g_set_error (
 			error, CAMEL_STORE_ERROR,
 			CAMEL_STORE_ERROR_NO_FOLDER,
@@ -258,9 +258,9 @@ get_folder (CamelStore *store,
 		return NULL;
 	}
 
-	g_free(name);
+	g_free (name);
 
-	return camel_mh_folder_new(store, folder_name, flags, error);
+	return camel_mh_folder_new (store, folder_name, flags, error);
 }
 
 static CamelFolder *
@@ -280,20 +280,20 @@ delete_folder (CamelStore *store,
 
 	/* remove folder directory - will fail if not empty */
 	name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
-	if (rmdir(name) == -1) {
+	if (rmdir (name) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not delete folder '%s': %s"),
 			folder_name, g_strerror (errno));
-		g_free(name);
+		g_free (name);
 		return FALSE;
 	}
-	g_free(name);
+	g_free (name);
 
 	/* remove from .folders if we are supposed to */
 	if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS)
-		folders_update(((CamelLocalStore *)store)->toplevel_dir, UPDATE_REMOVE, folder_name, NULL);
+		folders_update (((CamelLocalStore *)store)->toplevel_dir, UPDATE_REMOVE, folder_name, NULL);
 
 	/* Chain up to parent's delete_folder() method. */
 	store_class = CAMEL_STORE_CLASS (camel_mh_store_parent_class);
@@ -315,7 +315,7 @@ rename_folder (CamelStore *store,
 
 	if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS) {
 		/* yeah this is messy, but so is mh! */
-		folders_update(((CamelLocalStore *)store)->toplevel_dir, UPDATE_RENAME, old, new);
+		folders_update (((CamelLocalStore *)store)->toplevel_dir, UPDATE_RENAME, old, new);
 	}
 
 	return TRUE;
@@ -328,17 +328,17 @@ fill_fi (CamelStore *store,
 {
 	CamelFolder *folder;
 
-	folder = camel_object_bag_get(store->folders, fi->full_name);
+	folder = camel_object_bag_get (store->folders, fi->full_name);
 
 	if (folder == NULL
 	    && (flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-		folder = camel_store_get_folder(store, fi->full_name, 0, NULL);
+		folder = camel_store_get_folder (store, fi->full_name, 0, NULL);
 
 	if (folder) {
 		if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-			camel_folder_refresh_info(folder, NULL);
-		fi->unread = camel_folder_get_unread_message_count(folder);
-		fi->total = camel_folder_get_message_count(folder);
+			camel_folder_refresh_info (folder, NULL);
+		fi->unread = camel_folder_get_unread_message_count (folder);
+		fi->total = camel_folder_get_message_count (folder);
 		g_object_unref (folder);
 	} else {
 		gchar *path, *folderpath;
@@ -351,17 +351,17 @@ fill_fi (CamelStore *store,
 		   scan of all messages for their status flags.  But its probably not worth
 		   it as we need to read the top of every file, i.e. very very slow */
 
-		root = camel_local_store_get_toplevel_dir((CamelLocalStore *)store);
+		root = camel_local_store_get_toplevel_dir ((CamelLocalStore *)store);
 		path = g_strdup_printf("%s/%s.ev-summary", root, fi->full_name);
 		folderpath = g_strdup_printf("%s/%s", root, fi->full_name);
-		s = (CamelFolderSummary *)camel_mh_summary_new(NULL, path, folderpath, NULL);
+		s = (CamelFolderSummary *)camel_mh_summary_new (NULL, path, folderpath, NULL);
 		if (camel_folder_summary_header_load_from_db (s, store, fi->full_name, NULL) != -1) {
 			fi->unread = s->unread_count;
 			fi->total = s->saved_count;
 		}
 		g_object_unref (s);
-		g_free(folderpath);
-		g_free(path);
+		g_free (folderpath);
+		g_free (path);
 	}
 }
 
@@ -376,16 +376,16 @@ folder_info_new (CamelStore *store,
 	CamelFolderInfo *fi;
 	gchar *base;
 
-	base = strrchr(path, '/');
+	base = strrchr (path, '/');
 
 	camel_url_set_fragment (url, path);
 
 	/* Build the folder info structure. */
-	fi = camel_folder_info_new();
+	fi = camel_folder_info_new ();
 	fi->uri = camel_url_to_string (url, 0);
-	fi->full_name = g_strdup(path);
-	fi->name = g_strdup(base?base+1:path);
-	fill_fi(store, fi, flags);
+	fi->full_name = g_strdup (path);
+	fi->name = g_strdup (base?base+1:path);
+	fill_fi (store, fi, flags);
 
 	d(printf("New folderinfo:\n '%s'\n '%s'\n '%s'\n", fi->full_name, fi->uri, fi->path));
 
@@ -424,55 +424,55 @@ recursive_scan (CamelStore *store,
 	} else
 		fullpath = (gchar *)root;
 
-	if (g_stat(fullpath, &st) == -1 || !S_ISDIR(st.st_mode))
+	if (g_stat (fullpath, &st) == -1 || !S_ISDIR (st.st_mode))
 		return;
 
 	in.dnode = st.st_dev;
 	in.inode = st.st_ino;
 
 	/* see if we've visited already */
-	if (g_hash_table_lookup(visited, &in) != NULL)
+	if (g_hash_table_lookup (visited, &in) != NULL)
 		return;
 
-	inew = g_malloc(sizeof(*inew));
+	inew = g_malloc (sizeof (*inew));
 	*inew = in;
-	g_hash_table_insert(visited, inew, inew);
+	g_hash_table_insert (visited, inew, inew);
 
 	/* link in ... */
-	fi = folder_info_new(store, url, root, path, flags);
+	fi = folder_info_new (store, url, root, path, flags);
 	fi->parent = parent;
 	fi->next = *fip;
 	*fip = fi;
 
 	if (((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) || parent == NULL)) {
 		/* now check content for possible other directories */
-		dp = opendir(fullpath);
+		dp = opendir (fullpath);
 		if (dp == NULL)
 			return;
 
 		/* Look for subdirectories to add and scan. */
-		while ((d = readdir(dp)) != NULL) {
+		while ((d = readdir (dp)) != NULL) {
 			/* Skip current and parent directory. */
 			if (strcmp(d->d_name, ".") == 0
 			    || strcmp(d->d_name, "..") == 0)
 				continue;
 
 			/* skip fully-numerical entries (i.e. mh messages) */
-			strtoul(d->d_name, &tmp, 10);
+			strtoul (d->d_name, &tmp, 10);
 			if (*tmp == 0)
 				continue;
 
 			/* otherwise, treat at potential node, and recurse, a bit more expensive than needed, but tough! */
 			if (path[0]) {
 				tmp = g_strdup_printf("%s/%s", path, d->d_name);
-				recursive_scan(store, url, &fi->child, fi, visited, root, tmp, flags);
-				g_free(tmp);
+				recursive_scan (store, url, &fi->child, fi, visited, root, tmp, flags);
+				g_free (tmp);
 			} else {
-				recursive_scan(store, url, &fi->child, fi, visited, root, d->d_name, flags);
+				recursive_scan (store, url, &fi->child, fi, visited, root, d->d_name, flags);
 			}
 		}
 
-		closedir(dp);
+		closedir (dp);
 	}
 }
 
@@ -495,19 +495,19 @@ folders_scan (CamelStore *store,
 
 	tmp = g_alloca (strlen (root) + 16);
 	sprintf (tmp, "%s/.folders", root);
-	stream = camel_stream_fs_new_with_name(tmp, 0, O_RDONLY, NULL);
+	stream = camel_stream_fs_new_with_name (tmp, 0, O_RDONLY, NULL);
 	if (stream == NULL)
 		return;
 
-	in = camel_stream_buffer_new(stream, CAMEL_STREAM_BUFFER_READ);
+	in = camel_stream_buffer_new (stream, CAMEL_STREAM_BUFFER_READ);
 	g_object_unref (stream);
 	if (in == NULL)
 		return;
 
-	visited = g_hash_table_new(g_str_hash, g_str_equal);
-	folders = g_ptr_array_new();
+	visited = g_hash_table_new (g_str_hash, g_str_equal);
+	folders = g_ptr_array_new ();
 
-	while ( (len = camel_stream_buffer_gets((CamelStreamBuffer *)in, line, sizeof(line), NULL)) > 0) {
+	while ( (len = camel_stream_buffer_gets ((CamelStreamBuffer *)in, line, sizeof (line), NULL)) > 0) {
 		/* ignore blank lines */
 		if (len <= 1)
 			continue;
@@ -516,8 +516,8 @@ folders_scan (CamelStore *store,
 			gint i;
 
 			for (i=0;i<folders->len;i++)
-				camel_folder_info_free(folders->pdata[i]);
-			g_ptr_array_set_size(folders, 0);
+				camel_folder_info_free (folders->pdata[i]);
+			g_ptr_array_set_size (folders, 0);
 			break;
 		}
 		line[len-1] = 0;
@@ -525,40 +525,40 @@ folders_scan (CamelStore *store,
 		/* check for \r ? */
 
 		if (top && top[0]) {
-			gint toplen = strlen(top);
+			gint toplen = strlen (top);
 
 			/* check is dir or subdir */
-			if (strncmp(top, line, toplen) != 0
+			if (strncmp (top, line, toplen) != 0
 			    || (line[toplen] != 0 && line[toplen] != '/'))
 				continue;
 
 			/* check is not sub-subdir if not recursive */
 			if ((flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) == 0
-			    && (tmp = strrchr(line, '/'))
+			    && (tmp = strrchr (line, '/'))
 			    && tmp > line+toplen)
 				continue;
 		}
 
-		if (g_hash_table_lookup(visited, line) != NULL)
+		if (g_hash_table_lookup (visited, line) != NULL)
 			continue;
 
-		tmp = g_strdup(line);
-		g_hash_table_insert(visited, tmp, tmp);
+		tmp = g_strdup (line);
+		g_hash_table_insert (visited, tmp, tmp);
 
 		path = g_strdup_printf("%s/%s", root, line);
-		if (g_stat(path, &st) == 0 && S_ISDIR(st.st_mode)) {
-			fi = folder_info_new(store, url, root, line, flags);
-			g_ptr_array_add(folders, fi);
+		if (g_stat (path, &st) == 0 && S_ISDIR (st.st_mode)) {
+			fi = folder_info_new (store, url, root, line, flags);
+			g_ptr_array_add (folders, fi);
 		}
-		g_free(path);
+		g_free (path);
 	}
 
 	if (folders->len)
 		*fip = camel_folder_info_build(folders, top, '/', TRUE);
-	g_ptr_array_free(folders, TRUE);
+	g_ptr_array_free (folders, TRUE);
 
-	g_hash_table_foreach(visited, (GHFunc)g_free, NULL);
-	g_hash_table_destroy(visited);
+	g_hash_table_foreach (visited, (GHFunc)g_free, NULL);
+	g_hash_table_destroy (visited);
 
 	g_object_unref (in);
 }
@@ -583,7 +583,7 @@ inode_equal (gconstpointer a, gconstpointer b)
 static void
 inode_free (gpointer k, gpointer v, gpointer d)
 {
-	g_free(k);
+	g_free (k);
 }
 
 static CamelFolderInfo *
@@ -602,14 +602,14 @@ get_folder_info (CamelStore *store,
 
 	/* use .folders if we are supposed to */
 	if (((CamelMhStore *)store)->flags & CAMEL_MH_DOTFOLDERS) {
-		folders_scan(store, url, root, top, &fi, flags);
+		folders_scan (store, url, root, top, &fi, flags);
 	} else {
-		GHashTable *visited = g_hash_table_new(inode_hash, inode_equal);
+		GHashTable *visited = g_hash_table_new (inode_hash, inode_equal);
 
 		if (top == NULL)
 			top = "";
 
-		recursive_scan(store, url, &fi, NULL, visited, root, top, flags);
+		recursive_scan (store, url, &fi, NULL, visited, root, top, flags);
 
 		/* if we actually scanned from root, we have a "" root node we dont want */
 		if (fi != NULL && top[0] == 0) {
@@ -618,11 +618,11 @@ get_folder_info (CamelStore *store,
 			rfi = fi;
 			fi = rfi->child;
 			rfi->child = NULL;
-			camel_folder_info_free(rfi);
+			camel_folder_info_free (rfi);
 		}
 
-		g_hash_table_foreach(visited, inode_free, NULL);
-		g_hash_table_destroy(visited);
+		g_hash_table_foreach (visited, inode_free, NULL);
+		g_hash_table_destroy (visited);
 	}
 
 	camel_url_free (url);
diff --git a/camel/providers/local/camel-mh-summary.c b/camel/providers/local/camel-mh-summary.c
index a41a586..033be93 100644
--- a/camel/providers/local/camel-mh-summary.c
+++ b/camel/providers/local/camel-mh-summary.c
@@ -45,11 +45,11 @@
 	(G_TYPE_INSTANCE_GET_PRIVATE \
 	((obj), CAMEL_TYPE_MH_SUMMARY, CamelMhSummaryPrivate))
 
-static gint mh_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint mh_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mh_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint mh_summary_sync (CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
 /*static gint mh_summary_add(CamelLocalSummary *cls, CamelMimeMessage *msg, CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);*/
 
-static gchar *mh_summary_next_uid_string(CamelFolderSummary *s);
+static gchar *mh_summary_next_uid_string (CamelFolderSummary *s);
 
 struct _CamelMhSummaryPrivate {
 	gchar *current_uid;
@@ -112,7 +112,7 @@ camel_mh_summary_new (CamelFolder *folder,
 		((CamelFolderSummary *)o)->collate = "mh_uid_sort";
 	}
 
-	camel_local_summary_construct((CamelLocalSummary *)o, filename, mhdir, index);
+	camel_local_summary_construct ((CamelLocalSummary *)o, filename, mhdir, index);
 	return o;
 }
 
@@ -128,23 +128,23 @@ mh_summary_next_uid_string (CamelFolderSummary *s)
 
 	/* if we are working to add an existing file, then use current_uid */
 	if (mhs->priv->current_uid) {
-		uidstr = g_strdup(mhs->priv->current_uid);
+		uidstr = g_strdup (mhs->priv->current_uid);
 		/* tell the summary of this, so we always append numbers to the end */
-		camel_folder_summary_set_uid(s, strtoul(uidstr, NULL, 10)+1);
+		camel_folder_summary_set_uid (s, strtoul (uidstr, NULL, 10)+1);
 	} else {
 		/* else scan for one - and create it too, to make sure */
 		do {
 			if (fd != -1)
-				close(fd);
-			uid = camel_folder_summary_next_uid(s);
+				close (fd);
+			uid = camel_folder_summary_next_uid (s);
 			name = g_strdup_printf("%s/%u", cls->folder_path, uid);
 			/* O_EXCL isn't guaranteed, sigh.  Oh well, bad luck, mh has problems anyway */
-			fd = open(name, O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
-			g_free(name);
+			fd = open (name, O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
+			g_free (name);
 		} while (fd == -1 && errno == EEXIST);
 
 		if (fd != -1)
-			close(fd);
+			close (fd);
 
 		uidstr = g_strdup_printf("%u", uid);
 	}
@@ -164,27 +164,27 @@ camel_mh_summary_add (CamelLocalSummary *cls,
 
 	d(printf("summarising: %s\n", name));
 
-	fd = open(filename, O_RDONLY|O_LARGEFILE);
+	fd = open (filename, O_RDONLY|O_LARGEFILE);
 	if (fd == -1) {
 		g_warning ("Cannot summarise/index: %s: %s", filename, g_strerror (errno));
-		g_free(filename);
+		g_free (filename);
 		return -1;
 	}
-	mp = camel_mime_parser_new();
-	camel_mime_parser_scan_from(mp, FALSE);
-	camel_mime_parser_init_with_fd(mp, fd);
-	if (cls->index && (forceindex || !camel_index_has_name(cls->index, name))) {
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_scan_from (mp, FALSE);
+	camel_mime_parser_init_with_fd (mp, fd);
+	if (cls->index && (forceindex || !camel_index_has_name (cls->index, name))) {
 		d(printf("forcing indexing of message content\n"));
-		camel_folder_summary_set_index((CamelFolderSummary *)mhs, cls->index);
+		camel_folder_summary_set_index ((CamelFolderSummary *)mhs, cls->index);
 	} else {
-		camel_folder_summary_set_index((CamelFolderSummary *)mhs, NULL);
+		camel_folder_summary_set_index ((CamelFolderSummary *)mhs, NULL);
 	}
 	mhs->priv->current_uid = (gchar *)name;
-	camel_folder_summary_add_from_parser((CamelFolderSummary *)mhs, mp);
+	camel_folder_summary_add_from_parser ((CamelFolderSummary *)mhs, mp);
 	g_object_unref (mp);
 	mhs->priv->current_uid = NULL;
-	camel_folder_summary_set_index((CamelFolderSummary *)mhs, NULL);
-	g_free(filename);
+	camel_folder_summary_set_index ((CamelFolderSummary *)mhs, NULL);
+	g_free (filename);
 	return 0;
 }
 
@@ -195,9 +195,9 @@ remove_summary (gchar *key,
 {
 	d(printf("removing message %s from summary\n", key));
 	if (cls->index)
-		camel_index_delete_name(cls->index, camel_message_info_uid(info));
-	camel_folder_summary_remove((CamelFolderSummary *)cls, info);
-	camel_message_info_free(info);
+		camel_index_delete_name (cls->index, camel_message_info_uid (info));
+	camel_folder_summary_remove ((CamelFolderSummary *)cls, info);
+	camel_message_info_free (info);
 }
 
 static gint
@@ -220,7 +220,7 @@ mh_summary_check (CamelLocalSummary *cls,
 
 	/* scan the directory, check for mail files not in the index, or index entries that
 	   no longer exist */
-	dir = opendir(cls->folder_path);
+	dir = opendir (cls->folder_path);
 	if (dir == NULL) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -231,49 +231,49 @@ mh_summary_check (CamelLocalSummary *cls,
 	}
 
 	/* keeps track of all uid's that have not been processed */
-	left = g_hash_table_new(g_str_hash, g_str_equal);
+	left = g_hash_table_new (g_str_hash, g_str_equal);
 	camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *)cls, error);
-	count = camel_folder_summary_count((CamelFolderSummary *)cls);
+	count = camel_folder_summary_count ((CamelFolderSummary *)cls);
 	forceindex = count == 0;
 	for (i=0;i<count;i++) {
-		info = camel_folder_summary_index((CamelFolderSummary *)cls, i);
+		info = camel_folder_summary_index ((CamelFolderSummary *)cls, i);
 		if (info) {
-			g_hash_table_insert(left, (gchar *)camel_message_info_uid(info), info);
+			g_hash_table_insert (left, (gchar *)camel_message_info_uid (info), info);
 		}
 	}
 
-	while ((d = readdir(dir))) {
+	while ((d = readdir (dir))) {
 		/* FIXME: also run stat to check for regular file */
 		p = d->d_name;
 		while ((c = *p++)) {
-			if (!isdigit(c))
+			if (!isdigit (c))
 				break;
 		}
 		if (c==0) {
-			info = camel_folder_summary_uid((CamelFolderSummary *)cls, d->d_name);
-			if (info == NULL || (cls->index && (!camel_index_has_name(cls->index, d->d_name)))) {
+			info = camel_folder_summary_uid ((CamelFolderSummary *)cls, d->d_name);
+			if (info == NULL || (cls->index && (!camel_index_has_name (cls->index, d->d_name)))) {
 				/* need to add this file to the summary */
 				if (info != NULL) {
-					g_hash_table_remove(left, camel_message_info_uid(info));
-					camel_folder_summary_remove((CamelFolderSummary *)cls, info);
-					camel_message_info_free(info);
+					g_hash_table_remove (left, camel_message_info_uid (info));
+					camel_folder_summary_remove ((CamelFolderSummary *)cls, info);
+					camel_message_info_free (info);
 				}
-				camel_mh_summary_add(cls, d->d_name, forceindex);
+				camel_mh_summary_add (cls, d->d_name, forceindex);
 			} else {
-				const gchar *uid = camel_message_info_uid(info);
-				CamelMessageInfo *old = g_hash_table_lookup(left, uid);
+				const gchar *uid = camel_message_info_uid (info);
+				CamelMessageInfo *old = g_hash_table_lookup (left, uid);
 
 				if (old) {
-					camel_message_info_free(old);
-					g_hash_table_remove(left, uid);
+					camel_message_info_free (old);
+					g_hash_table_remove (left, uid);
 				}
-				camel_message_info_free(info);
+				camel_message_info_free (info);
 			}
 		}
 	}
-	closedir(dir);
-	g_hash_table_foreach(left, (GHFunc)remove_summary, cls);
-	g_hash_table_destroy(left);
+	closedir (dir);
+	g_hash_table_foreach (left, (GHFunc)remove_summary, cls);
+	g_hash_table_destroy (left);
 
 	/* sort the summary based on message number (uid), since the directory order is not useful */
 	camel_folder_summary_lock (s, CAMEL_FOLDER_SUMMARY_SUMMARY_LOCK);
@@ -299,34 +299,34 @@ mh_summary_sync (CamelLocalSummary *cls,
 
 	/* we could probably get away without this ... but why not use it, esp if we're going to
 	   be doing any significant io already */
-	if (camel_local_summary_check(cls, changes, error) == -1)
+	if (camel_local_summary_check (cls, changes, error) == -1)
 		return -1;
 
 	/* FIXME: need to update/honour .mh_sequences or whatever it is */
 
 	camel_folder_summary_prepare_fetch_all ((CamelFolderSummary *)cls, error);
-	count = camel_folder_summary_count((CamelFolderSummary *)cls);
+	count = camel_folder_summary_count ((CamelFolderSummary *)cls);
 	for (i=count-1;i>=0;i--) {
-		info = (CamelLocalMessageInfo *)camel_folder_summary_index((CamelFolderSummary *)cls, i);
-		g_assert(info);
+		info = (CamelLocalMessageInfo *)camel_folder_summary_index ((CamelFolderSummary *)cls, i);
+		g_assert (info);
 		if (expunge && (info->info.flags & CAMEL_MESSAGE_DELETED)) {
-			uid = camel_message_info_uid(info);
+			uid = camel_message_info_uid (info);
 			name = g_strdup_printf("%s/%s", cls->folder_path, uid);
 			d(printf("deleting %s\n", name));
-			if (unlink(name) == 0 || errno==ENOENT) {
+			if (unlink (name) == 0 || errno==ENOENT) {
 
 				/* FIXME: put this in folder_summary::remove()? */
 				if (cls->index)
-					camel_index_delete_name(cls->index, (gchar *)uid);
+					camel_index_delete_name (cls->index, (gchar *)uid);
 
-				camel_folder_change_info_remove_uid(changes, uid);
-				camel_folder_summary_remove((CamelFolderSummary *)cls, (CamelMessageInfo *)info);
+				camel_folder_change_info_remove_uid (changes, uid);
+				camel_folder_summary_remove ((CamelFolderSummary *)cls, (CamelMessageInfo *)info);
 			}
-			g_free(name);
+			g_free (name);
 		} else if (info->info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV|CAMEL_MESSAGE_FOLDER_FLAGGED)) {
 			info->info.flags &= 0xffff;
 		}
-		camel_message_info_free(info);
+		camel_message_info_free (info);
 	}
 
 	/* Chain up to parent's sync() method. */
diff --git a/camel/providers/local/camel-mh-summary.h b/camel/providers/local/camel-mh-summary.h
index 9f211d2..6566f18 100644
--- a/camel/providers/local/camel-mh-summary.h
+++ b/camel/providers/local/camel-mh-summary.h
@@ -58,7 +58,7 @@ struct _CamelMhSummaryClass {
 };
 
 GType	 camel_mh_summary_get_type	(void);
-CamelMhSummary	*camel_mh_summary_new(struct _CamelFolder *, const gchar *filename, const gchar *mhdir, CamelIndex *index);
+CamelMhSummary	*camel_mh_summary_new (struct _CamelFolder *, const gchar *filename, const gchar *mhdir, CamelIndex *index);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-spool-folder.c b/camel/providers/local/camel-spool-folder.c
index 78579eb..1923c32 100644
--- a/camel/providers/local/camel-spool-folder.c
+++ b/camel/providers/local/camel-spool-folder.c
@@ -40,10 +40,10 @@
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
 
-static CamelLocalSummary *spool_create_summary(CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
+static CamelLocalSummary *spool_create_summary (CamelLocalFolder *lf, const gchar *path, const gchar *folder, CamelIndex *index);
 
-static gint spool_lock(CamelLocalFolder *lf, CamelLockType type, GError **error);
-static void spool_unlock(CamelLocalFolder *lf);
+static gint spool_lock (CamelLocalFolder *lf, CamelLockType type, GError **error);
+static void spool_unlock (CamelLocalFolder *lf);
 
 G_DEFINE_TYPE (CamelSpoolFolder, camel_spool_folder, CAMEL_TYPE_MBOX_FOLDER)
 
@@ -89,7 +89,7 @@ camel_spool_folder_new (CamelStore *parent_store,
 		(CamelLocalFolder *)folder, flags, error);
 	if (folder) {
 		if (camel_url_get_param(((CamelService *)parent_store)->url, "xstatus"))
-			camel_mbox_summary_xstatus((CamelMboxSummary *)folder->summary, TRUE);
+			camel_mbox_summary_xstatus ((CamelMboxSummary *)folder->summary, TRUE);
 	}
 
 	g_free (basename);
@@ -117,7 +117,7 @@ spool_lock (CamelLocalFolder *lf,
 	CamelSpoolFolder *sf = (CamelSpoolFolder *)lf;
 	GError *local_error = NULL;
 
-	mf->lockfd = open(lf->folder_path, O_RDWR|O_LARGEFILE, 0);
+	mf->lockfd = open (lf->folder_path, O_RDWR|O_LARGEFILE, 0);
 	if (mf->lockfd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -129,17 +129,17 @@ spool_lock (CamelLocalFolder *lf,
 
 	while (retry < CAMEL_LOCK_RETRY) {
 		if (retry > 0)
-			sleep(CAMEL_LOCK_DELAY);
+			sleep (CAMEL_LOCK_DELAY);
 
 		g_clear_error (&local_error);
 
-		if (camel_lock_fcntl(mf->lockfd, type, &local_error) == 0) {
-			if (camel_lock_flock(mf->lockfd, type, &local_error) == 0) {
-				if ((sf->lockid = camel_lock_helper_lock(lf->folder_path, &local_error)) != -1)
+		if (camel_lock_fcntl (mf->lockfd, type, &local_error) == 0) {
+			if (camel_lock_flock (mf->lockfd, type, &local_error) == 0) {
+				if ((sf->lockid = camel_lock_helper_lock (lf->folder_path, &local_error)) != -1)
 					return 0;
-				camel_unlock_flock(mf->lockfd);
+				camel_unlock_flock (mf->lockfd);
 			}
-			camel_unlock_fcntl(mf->lockfd);
+			camel_unlock_fcntl (mf->lockfd);
 		}
 		retry++;
 	}
@@ -159,11 +159,11 @@ spool_unlock (CamelLocalFolder *lf)
 	CamelMboxFolder *mf = (CamelMboxFolder *)lf;
 	CamelSpoolFolder *sf = (CamelSpoolFolder *)lf;
 
-	camel_lock_helper_unlock(sf->lockid);
+	camel_lock_helper_unlock (sf->lockid);
 	sf->lockid = -1;
-	camel_unlock_flock(mf->lockfd);
-	camel_unlock_fcntl(mf->lockfd);
+	camel_unlock_flock (mf->lockfd);
+	camel_unlock_fcntl (mf->lockfd);
 
-	close(mf->lockfd);
+	close (mf->lockfd);
 	mf->lockfd = -1;
 }
diff --git a/camel/providers/local/camel-spool-folder.h b/camel/providers/local/camel-spool-folder.h
index 042d5b7..fd96fe0 100644
--- a/camel/providers/local/camel-spool-folder.h
+++ b/camel/providers/local/camel-spool-folder.h
@@ -61,9 +61,9 @@ struct _CamelSpoolFolderClass {
 	CamelMboxFolderClass parent_class;
 };
 
-GType camel_spool_folder_get_type(void);
+GType camel_spool_folder_get_type (void);
 
-CamelFolder *camel_spool_folder_new(CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
+CamelFolder *camel_spool_folder_new (CamelStore *parent_store, const gchar *full_name, guint32 flags, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index a83ce0b..b5f8e77 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -41,17 +41,17 @@
 #define d(x)
 
 static gboolean construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, GError **error);
-static CamelFolder *get_folder(CamelStore* store, const gchar *folder_name, guint32 flags, GError **error);
-static gchar *get_name(CamelService *service, gboolean brief);
+static CamelFolder *get_folder (CamelStore* store, const gchar *folder_name, guint32 flags, GError **error);
+static gchar *get_name (CamelService *service, gboolean brief);
 static CamelFolder *get_inbox (CamelStore *store, GError **error);
-static gboolean rename_folder(CamelStore *store, const gchar *old_name, const gchar *new_name, GError **error);
+static gboolean rename_folder (CamelStore *store, const gchar *old_name, const gchar *new_name, GError **error);
 static CamelFolderInfo *get_folder_info (CamelStore *store, const gchar *top, guint32 flags, GError **error);
 static void free_folder_info (CamelStore *store, CamelFolderInfo *fi);
 
-static gboolean delete_folder(CamelStore *store, const gchar *folder_name, GError **error);
+static gboolean delete_folder (CamelStore *store, const gchar *folder_name, GError **error);
 
-static gchar *spool_get_meta_path(CamelLocalStore *ls, const gchar *full_name, const gchar *ext);
-static gchar *spool_get_full_path(CamelLocalStore *ls, const gchar *full_name);
+static gchar *spool_get_meta_path (CamelLocalStore *ls, const gchar *full_name, const gchar *ext);
+static gchar *spool_get_full_path (CamelLocalStore *ls, const gchar *full_name);
 
 G_DEFINE_TYPE (CamelSpoolStore, camel_spool_store, CAMEL_TYPE_MBOX_STORE)
 
@@ -95,7 +95,7 @@ construct (CamelService *service,
 	struct stat st;
 
 	d(printf("constructing store of type %s '%s:%s'\n",
-		 G_OBJECT_CLASS_NAME(((CamelObject *)service)->s.type), url->protocol, url->path));
+		 G_OBJECT_CLASS_NAME (((CamelObject *)service)->s.type), url->protocol, url->path));
 
 	/* Chain up to parent's construct() method. */
 	service_class = CAMEL_SERVICE_CLASS (camel_spool_store_parent_class);
@@ -111,7 +111,7 @@ construct (CamelService *service,
 		return FALSE;
 	}
 
-	if (g_stat(service->url->path, &st) == -1) {
+	if (g_stat (service->url->path, &st) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -120,9 +120,9 @@ construct (CamelService *service,
 		return FALSE;
 	}
 
-	if (S_ISREG(st.st_mode))
+	if (S_ISREG (st.st_mode))
 		((CamelSpoolStore *)service)->type = CAMEL_SPOOL_STORE_MBOX;
-	else if (S_ISDIR(st.st_mode))
+	else if (S_ISDIR (st.st_mode))
 		/* we could check here for slight variations */
 		((CamelSpoolStore *)service)->type = CAMEL_SPOOL_STORE_ELM;
 	else {
@@ -158,11 +158,11 @@ get_folder (CamelStore *store,
 				_("Folder '%s/%s' does not exist."),
 				((CamelService *)store)->url->path, folder_name);
 		} else {
-			folder = camel_spool_folder_new(store, folder_name, flags, error);
+			folder = camel_spool_folder_new (store, folder_name, flags, error);
 		}
 	} else {
 		name = g_strdup_printf("%s%s", CAMEL_LOCAL_STORE(store)->toplevel_dir, folder_name);
-		if (g_stat(name, &st) == -1) {
+		if (g_stat (name, &st) == -1) {
 			if (errno != ENOENT) {
 				g_set_error (
 					error, G_IO_ERROR,
@@ -183,18 +183,18 @@ get_folder (CamelStore *store,
 						_("Could not create folder '%s':\n%s"),
 						folder_name, g_strerror (errno));
 				} else {
-					folder = camel_spool_folder_new(store, folder_name, flags, error);
+					folder = camel_spool_folder_new (store, folder_name, flags, error);
 				}
 			}
-		} else if (!S_ISREG(st.st_mode)) {
+		} else if (!S_ISREG (st.st_mode)) {
 			g_set_error (
 				error, CAMEL_STORE_ERROR,
 				CAMEL_STORE_ERROR_NO_FOLDER,
 				_("'%s' is not a mailbox file."), name);
 		} else {
-			folder = camel_spool_folder_new(store, folder_name, flags, error);
+			folder = camel_spool_folder_new (store, folder_name, flags, error);
 		}
-		g_free(name);
+		g_free (name);
 	}
 
 	return folder;
@@ -220,9 +220,9 @@ get_name (CamelService *service,
           gboolean brief)
 {
 	if (brief)
-		return g_strdup(service->url->path);
+		return g_strdup (service->url->path);
 	else
-		return g_strdup_printf(((CamelSpoolStore *)service)->type == CAMEL_SPOOL_STORE_MBOX?
+		return g_strdup_printf (((CamelSpoolStore *)service)->type == CAMEL_SPOOL_STORE_MBOX?
 				       _("Spool mail file %s"):_("Spool folder tree %s"), service->url->path);
 }
 
@@ -258,10 +258,10 @@ free_folder_info (CamelStore *store,
                   CamelFolderInfo *fi)
 {
 	if (fi) {
-		g_free(fi->uri);
-		g_free(fi->name);
-		g_free(fi->full_name);
-		g_slice_free(CamelFolderInfo, fi);
+		g_free (fi->uri);
+		g_free (fi->name);
+		g_free (fi->full_name);
+		g_slice_free (CamelFolderInfo, fi);
 	}
 }
 
@@ -275,12 +275,12 @@ spool_fill_fi (CamelStore *store,
 
 	fi->unread = -1;
 	fi->total = -1;
-	folder = camel_object_bag_get(store->folders, fi->full_name);
+	folder = camel_object_bag_get (store->folders, fi->full_name);
 	if (folder) {
 		if ((flags & CAMEL_STORE_FOLDER_INFO_FAST) == 0)
-			camel_folder_refresh_info(folder, NULL);
-		fi->unread = camel_folder_get_unread_message_count(folder);
-		fi->total = camel_folder_get_message_count(folder);
+			camel_folder_refresh_info (folder, NULL);
+		fi->unread = camel_folder_get_unread_message_count (folder);
+		fi->total = camel_folder_get_message_count (folder);
 		g_object_unref (folder);
 	}
 }
@@ -296,19 +296,19 @@ spool_new_fi (CamelStore *store,
 	const gchar *name;
 	CamelURL *url;
 
-	name = strrchr(full, '/');
+	name = strrchr (full, '/');
 	if (name)
 		name++;
 	else
 		name = full;
 
-	fi = camel_folder_info_new();
-	url = camel_url_copy(((CamelService *)store)->url);
-	camel_url_set_fragment(url, full);
-	fi->uri = camel_url_to_string(url, 0);
-	camel_url_free(url);
-	fi->full_name = g_strdup(full);
-	fi->name = g_strdup(name);
+	fi = camel_folder_info_new ();
+	url = camel_url_copy (((CamelService *)store)->url);
+	camel_url_set_fragment (url, full);
+	fi->uri = camel_url_to_string (url, 0);
+	camel_url_free (url);
+	fi->full_name = g_strdup (full);
+	fi->name = g_strdup (name);
 	fi->unread = -1;
 	fi->total = -1;
 	fi->flags = flags;
@@ -352,27 +352,27 @@ scan_dir (CamelStore *store,
 
 	/* look for folders matching the right structure, recursively */
 	if (path) {
-		name = alloca(strlen(root) + strlen(path) + 2);
+		name = alloca (strlen (root) + strlen (path) + 2);
 		sprintf(name, "%s/%s", root, path);
 	} else
 		name = root;
 
-	if (g_stat(name, &st) == -1) {
+	if (g_stat (name, &st) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
 			_("Could not scan folder '%s': %s"),
 			name, g_strerror (errno));
-	} else if (S_ISREG(st.st_mode)) {
+	} else if (S_ISREG (st.st_mode)) {
 		/* incase we start scanning from a file.  messy duplication :-/ */
 		if (path) {
-			fi = spool_new_fi(store, parent, fip, path, CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN);
-			spool_fill_fi(store, fi, flags);
+			fi = spool_new_fi (store, parent, fip, path, CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN);
+			spool_fill_fi (store, fi, flags);
 		}
 		return 0;
 	}
 
-	dir = opendir(name);
+	dir = opendir (name);
 	if (dir == NULL) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -383,69 +383,69 @@ scan_dir (CamelStore *store,
 	}
 
 	if (path != NULL) {
-		fi = spool_new_fi(store, parent, fip, path, CAMEL_FOLDER_NOSELECT);
+		fi = spool_new_fi (store, parent, fip, path, CAMEL_FOLDER_NOSELECT);
 		fip = &fi->child;
 		parent = fi;
 	}
 
-	while ((d = readdir(dir))) {
+	while ((d = readdir (dir))) {
 		if (strcmp(d->d_name, ".") == 0
 		    || strcmp(d->d_name, "..") == 0)
 			continue;
 
 		tmp = g_strdup_printf("%s/%s", name, d->d_name);
-		if (g_stat(tmp, &st) == 0) {
+		if (g_stat (tmp, &st) == 0) {
 			if (path)
 				fname = g_strdup_printf("%s/%s", path, d->d_name);
 			else
-				fname = g_strdup(d->d_name);
+				fname = g_strdup (d->d_name);
 
-			if (S_ISREG(st.st_mode)) {
+			if (S_ISREG (st.st_mode)) {
 				gint isfolder = FALSE;
 
 				/* first, see if we already have it open */
-				folder = camel_object_bag_get(store->folders, fname);
+				folder = camel_object_bag_get (store->folders, fname);
 				if (folder == NULL) {
 					fp = fopen(tmp, "r");
 					if (fp != NULL) {
 						isfolder = (st.st_size == 0
-							    || (fgets(from, sizeof(from), fp) != NULL
+							    || (fgets (from, sizeof (from), fp) != NULL
 								&& strncmp(from, "From ", 5) == 0));
-						fclose(fp);
+						fclose (fp);
 					}
 				}
 
 				if (folder != NULL || isfolder) {
-					fi = spool_new_fi(store, parent, fip, fname, CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN);
-					spool_fill_fi(store, fi, flags);
+					fi = spool_new_fi (store, parent, fip, fname, CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN);
+					spool_fill_fi (store, fi, flags);
 				}
 				if (folder)
 					g_object_unref (folder);
 
-			} else if (S_ISDIR(st.st_mode)) {
+			} else if (S_ISDIR (st.st_mode)) {
 				struct _inode in = { st.st_dev, st.st_ino };
 
 				/* see if we've visited already */
-				if (g_hash_table_lookup(visited, &in) == NULL) {
-					struct _inode *inew = g_malloc(sizeof(*inew));
+				if (g_hash_table_lookup (visited, &in) == NULL) {
+					struct _inode *inew = g_malloc (sizeof (*inew));
 
 					*inew = in;
-					g_hash_table_insert(visited, inew, inew);
+					g_hash_table_insert (visited, inew, inew);
 
-					if (scan_dir(store, visited, root, fname, flags, parent, fip, error) == -1) {
-						g_free(tmp);
-						g_free(fname);
-						closedir(dir);
+					if (scan_dir (store, visited, root, fname, flags, parent, fip, error) == -1) {
+						g_free (tmp);
+						g_free (fname);
+						closedir (dir);
 						return -1;
 					}
 				}
 			}
-			g_free(fname);
+			g_free (fname);
 
 		}
-		g_free(tmp);
+		g_free (tmp);
 	}
-	closedir(dir);
+	closedir (dir);
 
 	return 0;
 }
@@ -469,7 +469,7 @@ inode_equal (gconstpointer a, gconstpointer b)
 static void
 inode_free (gpointer k, gpointer v, gpointer d)
 {
-	g_free(k);
+	g_free (k);
 }
 
 static CamelFolderInfo *
@@ -481,15 +481,15 @@ get_folder_info_elm (CamelStore *store,
 	CamelFolderInfo *fi = NULL;
 	GHashTable *visited;
 
-	visited = g_hash_table_new(inode_hash, inode_equal);
+	visited = g_hash_table_new (inode_hash, inode_equal);
 
-	if (scan_dir(store, visited, ((CamelService *)store)->url->path, top, flags, NULL, &fi, error) == -1 && fi != NULL) {
-		camel_store_free_folder_info_full(store, fi);
+	if (scan_dir (store, visited, ((CamelService *)store)->url->path, top, flags, NULL, &fi, error) == -1 && fi != NULL) {
+		camel_store_free_folder_info_full (store, fi);
 		fi = NULL;
 	}
 
-	g_hash_table_foreach(visited, inode_free, NULL);
-	g_hash_table_destroy(visited);
+	g_hash_table_foreach (visited, inode_free, NULL);
+	g_hash_table_destroy (visited);
 
 	return fi;
 }
@@ -504,9 +504,9 @@ get_folder_info_mbox (CamelStore *store,
 
 	if (top == NULL || strcmp(top, "INBOX") == 0) {
 		fi = spool_new_fi(store, NULL, &fip, "INBOX", CAMEL_FOLDER_NOINFERIORS|CAMEL_FOLDER_NOCHILDREN|CAMEL_FOLDER_SYSTEM);
-		g_free(fi->name);
+		g_free (fi->name);
 		fi->name = g_strdup(_("Inbox"));
-		spool_fill_fi(store, fi, flags);
+		spool_fill_fi (store, fi, flags);
 	}
 
 	return fi;
@@ -530,7 +530,7 @@ spool_get_full_path (CamelLocalStore *ls,
 {
 	if (((CamelSpoolStore *)ls)->type == CAMEL_SPOOL_STORE_MBOX)
 		/* a trailing / is always present on toplevel_dir from CamelLocalStore */
-		return g_strndup(ls->toplevel_dir, strlen(ls->toplevel_dir)-1);
+		return g_strndup (ls->toplevel_dir, strlen (ls->toplevel_dir)-1);
 	else
 		return g_strdup_printf("%s/%s", ls->toplevel_dir, full_name);
 }
@@ -540,17 +540,17 @@ spool_get_meta_path (CamelLocalStore *ls,
                      const gchar *full_name,
                      const gchar *ext)
 {
-	gchar *root = camel_session_get_storage_path(((CamelService *)ls)->session, (CamelService *)ls, NULL);
+	gchar *root = camel_session_get_storage_path (((CamelService *)ls)->session, (CamelService *)ls, NULL);
 	gchar *path, *key;
 
 	if (root == NULL)
 		return NULL;
 
-	g_mkdir_with_parents(root, 0700);
-	key = camel_file_util_safe_filename(full_name);
+	g_mkdir_with_parents (root, 0700);
+	key = camel_file_util_safe_filename (full_name);
 	path = g_strdup_printf("%s/%s%s", root, key, ext);
-	g_free(key);
-	g_free(root);
+	g_free (key);
+	g_free (root);
 
 	return path;
 }
diff --git a/camel/providers/local/camel-spool-summary.c b/camel/providers/local/camel-spool-summary.c
index eb5b72d..57e02a4 100644
--- a/camel/providers/local/camel-spool-summary.c
+++ b/camel/providers/local/camel-spool-summary.c
@@ -44,11 +44,11 @@
 
 #define CAMEL_SPOOL_SUMMARY_VERSION (0x400)
 
-static gint spool_summary_load(CamelLocalSummary *cls, gint forceindex, GError **error);
-static gint spool_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint spool_summary_load (CamelLocalSummary *cls, gint forceindex, GError **error);
+static gint spool_summary_check (CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, GError **error);
 
-static gint spool_summary_sync_full(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
-static gint spool_summary_need_index(void);
+static gint spool_summary_sync_full (CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, GError **error);
+static gint spool_summary_need_index (void);
 
 G_DEFINE_TYPE (CamelSpoolSummary, camel_spool_summary, CAMEL_TYPE_MBOX_SUMMARY)
 
@@ -68,7 +68,7 @@ camel_spool_summary_class_init (CamelSpoolSummaryClass *class)
 }
 
 static void
-camel_spool_summary_init(CamelSpoolSummary *spool_summary)
+camel_spool_summary_init (CamelSpoolSummary *spool_summary)
 {
 	CamelFolderSummary *folder_summary;
 
@@ -96,7 +96,7 @@ camel_spool_summary_new (CamelFolder *folder,
 		((CamelFolderSummary *)new)->sort_by = "bdata";
 		((CamelFolderSummary *)new)->collate = "spool_frompos_sort";
 	}
-	camel_local_summary_construct((CamelLocalSummary *)new, NULL, mbox_name, NULL);
+	camel_local_summary_construct ((CamelLocalSummary *)new, NULL, mbox_name, NULL);
 	camel_folder_summary_load_from_db ((CamelFolderSummary *)new, NULL);
 	return new;
 }
@@ -129,7 +129,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 
 	camel_operation_start(NULL, _("Storing folder"));
 
-	fd = open(((CamelLocalSummary *)cls)->folder_path, O_RDWR|O_LARGEFILE);
+	fd = open (((CamelLocalSummary *)cls)->folder_path, O_RDWR|O_LARGEFILE);
 	if (fd == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
@@ -137,7 +137,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 			_("Could not open file: %s: %s"),
 			((CamelLocalSummary *)cls)->folder_path,
 			g_strerror (errno));
-		camel_operation_end(NULL);
+		camel_operation_end (NULL);
 		return -1;
 	}
 
@@ -154,11 +154,11 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 		goto error;
 	}
 
-	if (camel_mbox_summary_sync_mbox((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, error) == -1)
+	if (camel_mbox_summary_sync_mbox ((CamelMboxSummary *)cls, flags, changeinfo, fd, fdout, error) == -1)
 		goto error;
 
 	/* sync out content */
-	if (fsync(fdout) == -1) {
+	if (fsync (fdout) == -1) {
 		g_warning("Cannot synchronize temporary folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -170,7 +170,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 	}
 
 	/* see if we can write this much to the spool file */
-	if (fstat(fd, &st) == -1) {
+	if (fstat (fd, &st) == -1) {
 		g_warning("Cannot synchronize temporary folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -182,7 +182,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 	}
 	spoollen = st.st_size;
 
-	if (fstat(fdout, &st) == -1) {
+	if (fstat (fdout, &st) == -1) {
 		g_warning("Cannot synchronize temporary folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -196,11 +196,11 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 
 	/* I think this is the right way to do this - checking that the file will fit the new data */
 	if (outlen>0
-	    && (lseek(fd, outlen-1, SEEK_SET) == -1
+	    && (lseek (fd, outlen-1, SEEK_SET) == -1
 		|| write(fd, "", 1) != 1
-		|| fsync(fd) == -1
-		|| lseek(fd, 0, SEEK_SET) == -1
-		|| lseek(fdout, 0, SEEK_SET) == -1)) {
+		|| fsync (fd) == -1
+		|| lseek (fd, 0, SEEK_SET) == -1
+		|| lseek (fdout, 0, SEEK_SET) == -1)) {
 		g_warning("Cannot synchronize spool folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -209,22 +209,22 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 			((CamelLocalSummary *)cls)->folder_path,
 			g_strerror (errno));
 		/* incase we ran out of room, remove any trailing space first */
-		ftruncate(fd, spoollen);
+		ftruncate (fd, spoollen);
 		goto error;
 	}
 
 	/* now copy content back */
-	buffer = g_malloc(8192);
+	buffer = g_malloc (8192);
 	size = 1;
 	while (size>0) {
 		do {
-			size = read(fdout, buffer, 8192);
+			size = read (fdout, buffer, 8192);
 		} while (size == -1 && errno == EINTR);
 
 		if (size > 0) {
 			p = buffer;
 			do {
-				sizeout = write(fd, p, size);
+				sizeout = write (fd, p, size);
 				if (sizeout > 0) {
 					p+= sizeout;
 					size -= sizeout;
@@ -243,16 +243,16 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 				g_strerror (errno), tmpname);
 			/* so we dont delete it */
 			tmpname[0] = '\0';
-			g_free(buffer);
+			g_free (buffer);
 			goto error;
 		}
 	}
 
-	g_free(buffer);
+	g_free (buffer);
 
 	d(printf("Closing folders\n"));
 
-	if (ftruncate(fd, outlen) == -1) {
+	if (ftruncate (fd, outlen) == -1) {
 		g_set_error (
 			error, G_IO_ERROR,
 			g_io_error_from_errno (errno),
@@ -264,7 +264,7 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 		goto error;
 	}
 
-	if (close(fd) == -1) {
+	if (close (fd) == -1) {
 		g_warning("Cannot close source folder: %s", g_strerror (errno));
 		g_set_error (
 			error, G_IO_ERROR,
@@ -278,25 +278,25 @@ spool_summary_sync_full (CamelMboxSummary *cls,
 		goto error;
 	}
 
-	close(fdout);
+	close (fdout);
 
 	if (tmpname[0] != '\0')
-		unlink(tmpname);
+		unlink (tmpname);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return 0;
  error:
 	if (fd != -1)
-		close(fd);
+		close (fd);
 
 	if (fdout != -1)
-		close(fdout);
+		close (fdout);
 
 	if (tmpname[0] != '\0')
-		unlink(tmpname);
+		unlink (tmpname);
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return -1;
 }
@@ -310,18 +310,18 @@ spool_summary_check (CamelLocalSummary *cls,
 	struct stat st;
 	CamelFolderSummary *s = (CamelFolderSummary *)cls;
 
-	if (CAMEL_LOCAL_SUMMARY_CLASS (camel_spool_summary_parent_class)->check(cls, changeinfo, error) == -1)
+	if (CAMEL_LOCAL_SUMMARY_CLASS (camel_spool_summary_parent_class)->check (cls, changeinfo, error) == -1)
 		return -1;
 
 	/* check to see if we need to copy/update the file; missing xev headers prompt this */
 	work = FALSE;
 	camel_folder_summary_prepare_fetch_all (s, error);
-	count = camel_folder_summary_count(s);
+	count = camel_folder_summary_count (s);
 	for (i=0;!work && i<count; i++) {
-		CamelMboxMessageInfo *info = (CamelMboxMessageInfo *)camel_folder_summary_index(s, i);
-		g_assert(info);
+		CamelMboxMessageInfo *info = (CamelMboxMessageInfo *)camel_folder_summary_index (s, i);
+		g_assert (info);
 		work = (info->info.info.flags & (CAMEL_MESSAGE_FOLDER_NOXEV)) != 0;
-		camel_message_info_free((CamelMessageInfo *)info);
+		camel_message_info_free ((CamelMessageInfo *)info);
 	}
 
 	/* if we do, then write out the headers using sync_full, etc */
@@ -330,7 +330,7 @@ spool_summary_check (CamelLocalSummary *cls,
 		if (CAMEL_MBOX_SUMMARY_GET_CLASS (cls)->sync_full (CAMEL_MBOX_SUMMARY (cls), FALSE, changeinfo, error) == -1)
 			return -1;
 
-		if (g_stat(cls->folder_path, &st) == -1) {
+		if (g_stat (cls->folder_path, &st) == -1) {
 			g_set_error (
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
@@ -347,6 +347,6 @@ spool_summary_check (CamelLocalSummary *cls,
 }
 
 static gint
-spool_summary_need_index(void) {
+spool_summary_need_index (void) {
 	return 0;
 }
diff --git a/camel/providers/local/camel-spool-summary.h b/camel/providers/local/camel-spool-summary.h
index 37ccaaa..3af423c 100644
--- a/camel/providers/local/camel-spool-summary.h
+++ b/camel/providers/local/camel-spool-summary.h
@@ -62,23 +62,23 @@ GType	camel_spool_summary_get_type	(void);
 void	camel_spool_summary_construct	(CamelSpoolSummary *new, const gchar *filename, const gchar *spool_name, CamelIndex *index);
 
 /* create the summary, in-memory only */
-CamelSpoolSummary *camel_spool_summary_new(struct _CamelFolder *, const gchar *filename);
+CamelSpoolSummary *camel_spool_summary_new (struct _CamelFolder *, const gchar *filename);
 
 /* load/check the summary */
-gint camel_spool_summary_load(CamelSpoolSummary *cls, gint forceindex, GError **error);
+gint camel_spool_summary_load (CamelSpoolSummary *cls, gint forceindex, GError **error);
 /* check for new/removed messages */
-gint camel_spool_summary_check(CamelSpoolSummary *cls, CamelFolderChangeInfo *, GError **error);
+gint camel_spool_summary_check (CamelSpoolSummary *cls, CamelFolderChangeInfo *, GError **error);
 /* perform a folder sync or expunge, if needed */
-gint camel_spool_summary_sync(CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *, GError **error);
+gint camel_spool_summary_sync (CamelSpoolSummary *cls, gboolean expunge, CamelFolderChangeInfo *, GError **error);
 /* add a new message to the summary */
-CamelMessageInfo *camel_spool_summary_add(CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
+CamelMessageInfo *camel_spool_summary_add (CamelSpoolSummary *cls, CamelMimeMessage *msg, const CamelMessageInfo *info, CamelFolderChangeInfo *, GError **error);
 
 /* generate an X-Evolution header line */
-gchar *camel_spool_summary_encode_x_evolution(CamelSpoolSummary *cls, const CamelMessageInfo *info);
-gint camel_spool_summary_decode_x_evolution(CamelSpoolSummary *cls, const gchar *xev, CamelMessageInfo *info);
+gchar *camel_spool_summary_encode_x_evolution (CamelSpoolSummary *cls, const CamelMessageInfo *info);
+gint camel_spool_summary_decode_x_evolution (CamelSpoolSummary *cls, const gchar *xev, CamelMessageInfo *info);
 
 /* utility functions - write headers to a file with optional X-Evolution header */
-gint camel_spool_summary_write_headers(gint fd, struct _camel_header_raw *header, gchar *xevline);
+gint camel_spool_summary_write_headers (gint fd, struct _camel_header_raw *header, gchar *xevline);
 
 G_END_DECLS
 
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 15edc20..08ed6f2 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -109,9 +109,9 @@ nntp_folder_refresh_info_online (CamelFolder *folder,
 	success = !camel_nntp_command (
 		nntp_store, error, nntp_folder, &line, NULL);
 
-	if (camel_folder_change_info_changed(nntp_folder->changes)) {
+	if (camel_folder_change_info_changed (nntp_folder->changes)) {
 		changes = nntp_folder->changes;
-		nntp_folder->changes = camel_folder_change_info_new();
+		nntp_folder->changes = camel_folder_change_info_new ();
 	}
 
 	camel_service_unlock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -188,8 +188,8 @@ nntp_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
 	parent_store = camel_folder_get_parent_store (folder);
 	nntp_store = CAMEL_NNTP_STORE (parent_store);
 
-	article = alloca(strlen(uid)+1);
-	strcpy(article, uid);
+	article = alloca (strlen (uid)+1);
+	strcpy (article, uid);
 	msgid = strchr (article, ',');
 	if (msgid == NULL) {
 		g_set_error (
@@ -262,9 +262,9 @@ nntp_folder_cache_message (CamelDiscoFolder *disco_folder,
 	parent_store = camel_folder_get_parent_store (folder);
 	nntp_store = CAMEL_NNTP_STORE (parent_store);
 
-	article = alloca(strlen(uid)+1);
-	strcpy(article, uid);
-	msgid = strchr(article, ',');
+	article = alloca (strlen (uid)+1);
+	strcpy (article, uid);
+	msgid = strchr (article, ',');
 	if (!msgid) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
@@ -303,8 +303,8 @@ nntp_folder_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 	nntp_folder = CAMEL_NNTP_FOLDER (folder);
 	nntp_store = CAMEL_NNTP_STORE (parent_store);
 
-	article = alloca(strlen(uid)+1);
-	strcpy(article, uid);
+	article = alloca (strlen (uid)+1);
+	strcpy (article, uid);
 	msgid = strchr (article, ',');
 	if (msgid == NULL) {
 		g_set_error (
@@ -364,15 +364,15 @@ nntp_folder_search_by_expression (CamelFolder *folder, const gchar *expression,
 	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
 	GPtrArray *matches;
 
-	CAMEL_NNTP_FOLDER_LOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_LOCK (nntp_folder, search_lock);
 
 	if (nntp_folder->search == NULL)
 		nntp_folder->search = camel_folder_search_new ();
 
 	camel_folder_search_set_folder (nntp_folder->search, folder);
-	matches = camel_folder_search_search(nntp_folder->search, expression, NULL, error);
+	matches = camel_folder_search_search (nntp_folder->search, expression, NULL, error);
 
-	CAMEL_NNTP_FOLDER_UNLOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_UNLOCK (nntp_folder, search_lock);
 
 	return matches;
 }
@@ -383,15 +383,15 @@ nntp_folder_count_by_expression (CamelFolder *folder, const gchar *expression, G
 	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
 	guint32 count;
 
-	CAMEL_NNTP_FOLDER_LOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_LOCK (nntp_folder, search_lock);
 
 	if (nntp_folder->search == NULL)
 		nntp_folder->search = camel_folder_search_new ();
 
 	camel_folder_search_set_folder (nntp_folder->search, folder);
-	count = camel_folder_search_count(nntp_folder->search, expression, error);
+	count = camel_folder_search_count (nntp_folder->search, expression, error);
 
-	CAMEL_NNTP_FOLDER_UNLOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_UNLOCK (nntp_folder, search_lock);
 
 	return count;
 }
@@ -403,17 +403,17 @@ nntp_folder_search_by_uids (CamelFolder *folder, const gchar *expression, GPtrAr
 	GPtrArray *matches;
 
 	if (uids->len == 0)
-		return g_ptr_array_new();
+		return g_ptr_array_new ();
 
-	CAMEL_NNTP_FOLDER_LOCK(folder, search_lock);
+	CAMEL_NNTP_FOLDER_LOCK (folder, search_lock);
 
 	if (nntp_folder->search == NULL)
 		nntp_folder->search = camel_folder_search_new ();
 
 	camel_folder_search_set_folder (nntp_folder->search, folder);
-	matches = camel_folder_search_search(nntp_folder->search, expression, uids, error);
+	matches = camel_folder_search_search (nntp_folder->search, expression, uids, error);
 
-	CAMEL_NNTP_FOLDER_UNLOCK(folder, search_lock);
+	CAMEL_NNTP_FOLDER_UNLOCK (folder, search_lock);
 
 	return matches;
 }
@@ -423,9 +423,9 @@ nntp_folder_search_free (CamelFolder *folder, GPtrArray *result)
 {
 	CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
 
-	CAMEL_NNTP_FOLDER_LOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_LOCK (nntp_folder, search_lock);
 	camel_folder_search_free_result (nntp_folder->search, result);
-	CAMEL_NNTP_FOLDER_UNLOCK(nntp_folder, search_lock);
+	CAMEL_NNTP_FOLDER_UNLOCK (nntp_folder, search_lock);
 }
 
 static gboolean
@@ -505,14 +505,14 @@ nntp_folder_append_message_online (CamelFolder *folder,
 	}
 
 	/* write the message */
-	if (camel_stream_write(stream, group, strlen(group), error) == -1
+	if (camel_stream_write (stream, group, strlen (group), error) == -1
 	    || camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (mime_message), filtered_stream, error) == -1
 	    || camel_stream_flush (filtered_stream, error) == -1
 	    || camel_stream_write (stream, "\r\n.\r\n", 5, error) == -1
 	    || (ret = camel_nntp_stream_line (nntp_store->stream, (guchar **)&line, &u, error)) == -1) {
 		g_prefix_error (error, _("Posting failed: "));
 		success = FALSE;
-	} else if (atoi(line) != 240) {
+	} else if (atoi (line) != 240) {
 		g_set_error (
 			error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
 			_("Posting failed: %s"), line);
@@ -520,7 +520,7 @@ nntp_folder_append_message_online (CamelFolder *folder,
 	}
 
 	g_object_unref (filtered_stream);
-	g_free(group);
+	g_free (group);
 	header->next = savedhdrs;
 
 	camel_service_unlock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -642,11 +642,11 @@ camel_nntp_folder_new (CamelStore *parent,
 	root = g_strdup_printf ("%s.cmeta", nntp_folder->storage_path);
 	camel_object_set_state_filename (CAMEL_OBJECT (nntp_folder), root);
 	camel_object_state_read (CAMEL_OBJECT (nntp_folder));
-	g_free(root);
+	g_free (root);
 
 	root = g_strdup_printf("%s.ev-summary", nntp_folder->storage_path);
 	folder->summary = (CamelFolderSummary *) camel_nntp_summary_new (folder, root);
-	g_free(root);
+	g_free (root);
 
 	camel_folder_summary_load_from_db (folder->summary, NULL);
 
diff --git a/camel/providers/nntp/camel-nntp-folder.h b/camel/providers/nntp/camel-nntp-folder.h
index 79613bf..4a72539 100644
--- a/camel/providers/nntp/camel-nntp-folder.h
+++ b/camel/providers/nntp/camel-nntp-folder.h
@@ -70,7 +70,7 @@ GType camel_nntp_folder_get_type (void);
 
 CamelFolder *camel_nntp_folder_new (CamelStore *parent, const gchar *folder_name, GError **error);
 
-gboolean camel_nntp_folder_selected(CamelNNTPFolder *folder, gchar *line, GError **error);
+gboolean camel_nntp_folder_selected (CamelNNTPFolder *folder, gchar *line, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
index 3f8a3ac..6c0acd1 100644
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ b/camel/providers/nntp/camel-nntp-provider.c
@@ -79,7 +79,7 @@ CamelServiceAuthType camel_nntp_password_authtype = {
 };
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	news_provider.object_types[CAMEL_PROVIDER_STORE] = camel_nntp_store_get_type ();
 
@@ -88,7 +88,7 @@ camel_provider_module_init(void)
 	news_provider.authtypes = g_list_append (NULL, &camel_nntp_password_authtype);
 	news_provider.translation_domain = GETTEXT_PACKAGE;
 
-	camel_provider_register(&news_provider);
+	camel_provider_register (&news_provider);
 }
 
 static void
@@ -132,7 +132,7 @@ nntp_url_equal (gconstpointer a, gconstpointer b)
 {
 	const CamelURL *u1 = a, *u2 = b;
 
-	return check_equal(u1->protocol, u2->protocol)
+	return check_equal (u1->protocol, u2->protocol)
 		&& check_equal (u1->user, u2->user)
 		&& check_equal (u1->host, u2->host)
 		&& u1->port == u2->port;
diff --git a/camel/providers/nntp/camel-nntp-store-summary.c b/camel/providers/nntp/camel-nntp-store-summary.c
index 01ecb9f..0c074ea 100644
--- a/camel/providers/nntp/camel-nntp-store-summary.c
+++ b/camel/providers/nntp/camel-nntp-store-summary.c
@@ -39,15 +39,15 @@
 
 #define CAMEL_NNTP_STORE_SUMMARY_VERSION (1)
 
-static gint summary_header_load(CamelStoreSummary *, FILE *);
-static gint summary_header_save(CamelStoreSummary *, FILE *);
+static gint summary_header_load (CamelStoreSummary *, FILE *);
+static gint summary_header_save (CamelStoreSummary *, FILE *);
 
-static CamelStoreInfo * store_info_load(CamelStoreSummary *, FILE *);
-static gint		 store_info_save(CamelStoreSummary *, FILE *, CamelStoreInfo *);
-static void		 store_info_free(CamelStoreSummary *, CamelStoreInfo *);
+static CamelStoreInfo * store_info_load (CamelStoreSummary *, FILE *);
+static gint		 store_info_save (CamelStoreSummary *, FILE *, CamelStoreInfo *);
+static void		 store_info_free (CamelStoreSummary *, CamelStoreInfo *);
 
-static const gchar *store_info_string(CamelStoreSummary *, const CamelStoreInfo *, gint);
-static void store_info_set_string(CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
+static const gchar *store_info_string (CamelStoreSummary *, const CamelStoreInfo *, gint);
+static void store_info_set_string (CamelStoreSummary *, CamelStoreInfo *, int, const gchar *);
 
 G_DEFINE_TYPE (CamelNNTPStoreSummary, camel_nntp_store_summary, CAMEL_TYPE_STORE_SUMMARY)
 
@@ -109,7 +109,7 @@ camel_nntp_store_summary_new (void)
  * It must be freed using camel_store_summary_info_free().
  **/
 CamelNNTPStoreInfo *
-camel_nntp_store_summary_full_name(CamelNNTPStoreSummary *s, const gchar *full_name)
+camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s, const gchar *full_name)
 {
 	gint count, i;
 	CamelNNTPStoreInfo *info;
@@ -206,7 +206,7 @@ camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s, const gchar *pa
 			} else {
 				if (c == '/')
 					c = dir_sep;
-				camel_utf8_putc((guchar **) &f, c);
+				camel_utf8_putc ((guchar **) &f, c);
 			}
 			break;
 		case 1:
@@ -246,7 +246,7 @@ camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *f
 
 	len = strlen (full);
 	full_name = g_alloca (len+1);
-	strcpy(full_name, full);
+	strcpy (full_name, full);
 	if (full_name[len-1] == dir_sep)
 		full_name[len-1] = 0;
 
@@ -262,7 +262,7 @@ camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *f
 	info = (CamelNNTPStoreInfo *) camel_store_summary_add_from_path ((CamelStoreSummary *) s, pathu8);
 	if (info) {
 		d(printf("  '%s' -> '%s'\n", pathu8, full_name));
-		camel_store_info_set_string((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_NNTP_STORE_INFO_FULL_NAME, full_name);
+		camel_store_info_set_string ((CamelStoreSummary *)s, (CamelStoreInfo *)info, CAMEL_NNTP_STORE_INFO_FULL_NAME, full_name);
 	} else {
 		d(printf("  failed\n"));
 	}
@@ -322,8 +322,8 @@ store_info_load (CamelStoreSummary *s, FILE *in)
 			return NULL;
 		}
 		if (((CamelNNTPStoreSummary *)s)->version >= CAMEL_NNTP_STORE_SUMMARY_VERSION_1) {
-			if (camel_file_util_decode_uint32(in, &ni->first) == -1
-			    || camel_file_util_decode_uint32(in, &ni->last) == -1) {
+			if (camel_file_util_decode_uint32 (in, &ni->first) == -1
+			    || camel_file_util_decode_uint32 (in, &ni->last) == -1) {
 				camel_store_summary_info_free (s, (CamelStoreInfo *) ni);
 				return NULL;
 			}
@@ -341,8 +341,8 @@ store_info_save (CamelStoreSummary *s, FILE *out, CamelStoreInfo *mi)
 
 	if (CAMEL_STORE_SUMMARY_CLASS (camel_nntp_store_summary_parent_class)->store_info_save (s, out, mi) == -1
 	    || camel_file_util_encode_string (out, isi->full_name) == -1
-	    || camel_file_util_encode_uint32(out, isi->first) == -1
-	    || camel_file_util_encode_uint32(out, isi->last) == -1)
+	    || camel_file_util_encode_uint32 (out, isi->first) == -1
+	    || camel_file_util_encode_uint32 (out, isi->last) == -1)
 		return -1;
 
 	return 0;
@@ -358,7 +358,7 @@ store_info_free (CamelStoreSummary *s, CamelStoreInfo *mi)
 }
 
 static const gchar *
-store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
+store_info_string (CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 {
 	CamelNNTPStoreInfo *nsi = (CamelNNTPStoreInfo *)mi;
 
@@ -370,16 +370,16 @@ store_info_string(CamelStoreSummary *s, const CamelStoreInfo *mi, gint type)
 	case CAMEL_NNTP_STORE_INFO_FULL_NAME:
 		return nsi->full_name;
 	default:
-		return CAMEL_STORE_SUMMARY_CLASS (camel_nntp_store_summary_parent_class)->store_info_string(s, mi, type);
+		return CAMEL_STORE_SUMMARY_CLASS (camel_nntp_store_summary_parent_class)->store_info_string (s, mi, type);
 	}
 }
 
 static void
-store_info_set_string(CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
+store_info_set_string (CamelStoreSummary *s, CamelStoreInfo *mi, gint type, const gchar *str)
 {
 	CamelNNTPStoreInfo *nsi = (CamelNNTPStoreInfo *)mi;
 
-	g_assert(mi != NULL);
+	g_assert (mi != NULL);
 
 	switch (type) {
 	case CAMEL_NNTP_STORE_INFO_FULL_NAME:
diff --git a/camel/providers/nntp/camel-nntp-store-summary.h b/camel/providers/nntp/camel-nntp-store-summary.h
index a9858c3..30a35f1 100644
--- a/camel/providers/nntp/camel-nntp-store-summary.h
+++ b/camel/providers/nntp/camel-nntp-store-summary.h
@@ -93,16 +93,16 @@ CamelNNTPStoreSummary      *camel_nntp_store_summary_new	(void);
 #define camel_nntp_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_NNTP_STORE_INFO_FULL_NAME))
 
 /* converts to/from utf8 canonical nasmes */
-gchar *camel_nntp_store_summary_full_to_path(CamelNNTPStoreSummary *s, const gchar *full_name, gchar dir_sep);
+gchar *camel_nntp_store_summary_full_to_path (CamelNNTPStoreSummary *s, const gchar *full_name, gchar dir_sep);
 
-gchar *camel_nntp_store_summary_path_to_full(CamelNNTPStoreSummary *s, const gchar *path, gchar dir_sep);
-gchar *camel_nntp_store_summary_dotted_to_full(CamelNNTPStoreSummary *s, const gchar *dotted, gchar dir_sep);
+gchar *camel_nntp_store_summary_path_to_full (CamelNNTPStoreSummary *s, const gchar *path, gchar dir_sep);
+gchar *camel_nntp_store_summary_dotted_to_full (CamelNNTPStoreSummary *s, const gchar *dotted, gchar dir_sep);
 
-CamelNNTPStoreInfo *camel_nntp_store_summary_full_name(CamelNNTPStoreSummary *s, const gchar *full_name);
-CamelNNTPStoreInfo *camel_nntp_store_summary_add_from_full(CamelNNTPStoreSummary *s, const gchar *full_name, gchar dir_sep);
+CamelNNTPStoreInfo *camel_nntp_store_summary_full_name (CamelNNTPStoreSummary *s, const gchar *full_name);
+CamelNNTPStoreInfo *camel_nntp_store_summary_add_from_full (CamelNNTPStoreSummary *s, const gchar *full_name, gchar dir_sep);
 
 /* a convenience lookup function. always use this if path known */
-gchar *camel_nntp_store_summary_full_from_path(CamelNNTPStoreSummary *s, const gchar *path);
+gchar *camel_nntp_store_summary_full_from_path (CamelNNTPStoreSummary *s, const gchar *path);
 
 G_END_DECLS
 
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 943368d..b61bb67 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -115,7 +115,7 @@ nntp_store_finalize (GObject *object)
 	xover = nntp_store->xover;
 	while (xover) {
 		xn = xover->next;
-		g_free(xover);
+		g_free (xover);
 		xover = xn;
 	}
 
@@ -124,7 +124,7 @@ nntp_store_finalize (GObject *object)
 }
 
 static gboolean
-nntp_can_work_offline(CamelDiscoStore *store)
+nntp_can_work_offline (CamelDiscoStore *store)
 {
 	return TRUE;
 }
@@ -142,7 +142,7 @@ static struct {
 };
 
 static gint
-xover_setup(CamelNNTPStore *store, GError **error)
+xover_setup (CamelNNTPStore *store, GError **error)
 {
 	gint ret, i;
 	gchar *line;
@@ -164,19 +164,19 @@ xover_setup(CamelNNTPStore *store, GError **error)
 	last = (struct _xover_header *)&store->xover;
 
 	/* supported command */
-	while ((ret = camel_nntp_stream_line(store->stream, (guchar **)&line, &len, error)) > 0) {
+	while ((ret = camel_nntp_stream_line (store->stream, (guchar **)&line, &len, error)) > 0) {
 		p = (guchar *) line;
-		xover = g_malloc0(sizeof(*xover));
+		xover = g_malloc0 (sizeof (*xover));
 		last->next = xover;
 		last = xover;
 		while ((c = *p++)) {
 			if (c == ':') {
 				p[-1] = 0;
 				for (i = 0; i < G_N_ELEMENTS (headers); i++) {
-					if (strcmp(line, headers[i].name) == 0) {
+					if (strcmp (line, headers[i].name) == 0) {
 						xover->name = headers[i].name;
 						if (strncmp((gchar *) p, "full", 4) == 0)
-							xover->skip = strlen(xover->name)+1;
+							xover->skip = strlen (xover->name)+1;
 						else
 							xover->skip = 0;
 						xover->type = headers[i].type;
@@ -185,7 +185,7 @@ xover_setup(CamelNNTPStore *store, GError **error)
 				}
 				break;
 			} else {
-				p[-1] = camel_tolower(c);
+				p[-1] = camel_tolower (c);
 			}
 		}
 	}
@@ -287,7 +287,7 @@ connect_to_server (CamelService *service, const gchar *host, const gchar *serv,
 	/* if we have username, try it here */
 	if (service->url->user != NULL
 	    && service->url->user[0]
-	    && camel_nntp_try_authenticate(store, error) != NNTP_AUTH_ACCEPTED)
+	    && camel_nntp_try_authenticate (store, error) != NNTP_AUTH_ACCEPTED)
 		goto fail;
 
 	/* set 'reader' mode & ignore return code, also ping the server, inn goes offline very quickly otherwise */
@@ -295,7 +295,7 @@ connect_to_server (CamelService *service, const gchar *host, const gchar *serv,
 	    || camel_nntp_raw_command_auth (store, error, (gchar **) &buf, "date") == -1)
 		goto fail;
 
-	if (xover_setup(store, error) == -1)
+	if (xover_setup (store, error) == -1)
 		goto fail;
 
 	if (!disco_store->diary) {
@@ -306,7 +306,7 @@ connect_to_server (CamelService *service, const gchar *host, const gchar *serv,
 
 	retval = TRUE;
 
-	g_free(store->current_folder);
+	g_free (store->current_folder);
 	store->current_folder = NULL;
 
  fail:
@@ -360,7 +360,7 @@ nntp_connect_online (CamelService *service, GError **error)
 static gboolean
 nntp_connect_offline (CamelService *service, GError **error)
 {
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(service);
+	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (service);
 	CamelDiscoStore *disco_store = (CamelDiscoStore *) nntp_store;
 	gchar *path;
 
@@ -404,7 +404,7 @@ nntp_disconnect_online (CamelService *service, gboolean clean, GError **error)
 
 	g_object_unref (store->stream);
 	store->stream = NULL;
-	g_free(store->current_folder);
+	g_free (store->current_folder);
 	store->current_folder = NULL;
 
 	camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
@@ -415,7 +415,7 @@ nntp_disconnect_online (CamelService *service, gboolean clean, GError **error)
 static gboolean
 nntp_disconnect_offline (CamelService *service, gboolean clean, GError **error)
 {
-	CamelDiscoStore *disco = CAMEL_DISCO_STORE(service);
+	CamelDiscoStore *disco = CAMEL_DISCO_STORE (service);
 
 	if (disco->diary) {
 		g_object_unref (disco->diary);
@@ -444,14 +444,14 @@ nntp_store_query_auth_types (CamelService *service, GError **error)
 }
 
 static CamelFolder *
-nntp_get_folder(CamelStore *store, const gchar *folder_name, guint32 flags, GError **error)
+nntp_get_folder (CamelStore *store, const gchar *folder_name, guint32 flags, GError **error)
 {
 	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
 	CamelFolder *folder;
 
 	camel_service_lock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	folder = camel_nntp_folder_new(store, folder_name, error);
+	folder = camel_nntp_folder_new (store, folder_name, error);
 
 	camel_service_unlock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
@@ -511,7 +511,7 @@ nntp_folder_info_from_store_info (CamelNNTPStore *store, gboolean short_notation
 	fi->unread = si->unread;
 	fi->total = si->total;
 	fi->flags = si->flags;
-	path = alloca(strlen(fi->full_name)+2);
+	path = alloca (strlen (fi->full_name)+2);
 	sprintf(path, "/%s", fi->full_name);
 	url = camel_url_new_with_base (base_url, path);
 	fi->uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
@@ -538,7 +538,7 @@ nntp_folder_info_from_name (CamelNNTPStore *store, gboolean short_notation, cons
 
 	fi->unread = -1;
 
-	path = alloca(strlen(fi->full_name)+2);
+	path = alloca (strlen (fi->full_name)+2);
 	sprintf(path, "/%s", fi->full_name);
 	url = camel_url_new_with_base (base_url, path);
 	fi->uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
@@ -549,7 +549,7 @@ nntp_folder_info_from_name (CamelNNTPStore *store, gboolean short_notation, cons
 
 /* handle list/newgroups response */
 static CamelNNTPStoreInfo *
-nntp_store_info_update(CamelNNTPStore *store, gchar *line)
+nntp_store_info_update (CamelNNTPStore *store, gchar *line)
 {
 	CamelStoreSummary *summ = (CamelStoreSummary *)store->summary;
 	CamelURL *base_url = ((CamelService *)store)->url;
@@ -558,15 +558,15 @@ nntp_store_info_update(CamelNNTPStore *store, gchar *line)
 	gchar *relpath, *tmp;
 	guint32 last = 0, first = 0, new = 0;
 
-	tmp = strchr(line, ' ');
+	tmp = strchr (line, ' ');
 	if (tmp)
 		*tmp++ = 0;
 
-	fsi = si = (CamelNNTPStoreInfo *)camel_store_summary_path((CamelStoreSummary *)store->summary, line);
+	fsi = si = (CamelNNTPStoreInfo *)camel_store_summary_path ((CamelStoreSummary *)store->summary, line);
 	if (si == NULL) {
-		si = (CamelNNTPStoreInfo*)camel_store_summary_info_new(summ);
+		si = (CamelNNTPStoreInfo*)camel_store_summary_info_new (summ);
 
-		relpath = g_alloca(strlen(line)+2);
+		relpath = g_alloca (strlen (line)+2);
 		sprintf(relpath, "/%s", line);
 		url = camel_url_new_with_base (base_url, relpath);
 		si->info.uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
@@ -574,16 +574,16 @@ nntp_store_info_update(CamelNNTPStore *store, gchar *line)
 
 		si->info.path = g_strdup (line);
 		si->full_name = g_strdup (line); /* why do we keep this? */
-		camel_store_summary_add((CamelStoreSummary *)store->summary, &si->info);
+		camel_store_summary_add ((CamelStoreSummary *)store->summary, &si->info);
 	} else {
 		first = si->first;
 		last = si->last;
 	}
 
 	if (tmp && *tmp >= '0' && *tmp <= '9') {
-		last = strtoul(tmp, &tmp, 10);
+		last = strtoul (tmp, &tmp, 10);
 		if (*tmp == ' ' && tmp[1] >= '0' && tmp[1] <= '9') {
-			first = strtoul(tmp+1, &tmp, 10);
+			first = strtoul (tmp+1, &tmp, 10);
 			if (*tmp == ' ' && tmp[1] != 'y')
 				si->info.flags |= CAMEL_STORE_INFO_FOLDER_READONLY;
 		}
@@ -605,7 +605,7 @@ nntp_store_info_update(CamelNNTPStore *store, gchar *line)
 	si->first = first;
 
 	if (fsi)
-		camel_store_summary_info_free((CamelStoreSummary *)store->summary, &fsi->info);
+		camel_store_summary_info_free ((CamelStoreSummary *)store->summary, &fsi->info);
 	else			/* TODO see if we really did touch it */
 		camel_store_summary_touch ((CamelStoreSummary *)store->summary);
 
@@ -634,20 +634,20 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *store, const gchar *top,
 				CamelNNTPFolder *folder;
 				gchar *line;
 
-				folder = (CamelNNTPFolder *)camel_store_get_folder((CamelStore *)store, si->path, 0, NULL);
+				folder = (CamelNNTPFolder *)camel_store_get_folder ((CamelStore *)store, si->path, 0, NULL);
 				if (folder) {
 					CamelFolderChangeInfo *changes = NULL;
 
 					camel_service_lock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
-					camel_nntp_command(store, NULL, folder, &line, NULL);
-					if (camel_folder_change_info_changed(folder->changes)) {
+					camel_nntp_command (store, NULL, folder, &line, NULL);
+					if (camel_folder_change_info_changed (folder->changes)) {
 						changes = folder->changes;
-						folder->changes = camel_folder_change_info_new();
+						folder->changes = camel_folder_change_info_new ();
 					}
 					camel_service_unlock (CAMEL_SERVICE (store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 					if (changes) {
 						camel_folder_changed (CAMEL_FOLDER (folder), changes);
-						camel_folder_change_info_free(changes);
+						camel_folder_change_info_free (changes);
 					}
 					g_object_unref (folder);
 				}
@@ -667,7 +667,7 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *store, const gchar *top,
 }
 
 static CamelFolderInfo *
-tree_insert(CamelFolderInfo *root, CamelFolderInfo *last, CamelFolderInfo *fi)
+tree_insert (CamelFolderInfo *root, CamelFolderInfo *last, CamelFolderInfo *fi)
 {
 	CamelFolderInfo *kfi;
 
@@ -728,7 +728,7 @@ nntp_push_to_hierarchy (CamelURL *base_url, CamelFolderInfo *root, CamelFolderIn
 			camel_url_free (url);
 
 			g_hash_table_insert (known, fi->full_name, fi);
-			root = tree_insert(root, last, fi);
+			root = tree_insert (root, last, fi);
 			last = fi;
 		} else {
 			last = kfi;
@@ -741,7 +741,7 @@ nntp_push_to_hierarchy (CamelURL *base_url, CamelFolderInfo *root, CamelFolderIn
 	g_free (pfi->name);
 	pfi->name = g_strdup (name);
 
-	return tree_insert(root, last, pfi);
+	return tree_insert (root, last, pfi);
 }
 
 /*
@@ -760,7 +760,7 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store, const gchar *orig_top,
 	GHashTable *known; /* folder name to folder info */
 	gchar *tmpname;
 	gchar *top = g_strconcat(orig_top?orig_top:"", ".", NULL);
-	gint toplen = strlen(top);
+	gint toplen = strlen (top);
 
 	known = g_hash_table_new (g_str_hash, g_str_equal);
 
@@ -769,7 +769,7 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store, const gchar *orig_top,
 		    && (root_or_flag || strncmp (si->path, top, toplen) == 0)) {
 			if (recursive_flag || is_folder_list || strchr (si->path + toplen, '.') == NULL) {
 				/* add the item */
-				fi = nntp_folder_info_from_store_info(store, FALSE, si);
+				fi = nntp_folder_info_from_store_info (store, FALSE, si);
 				if (!fi)
 					continue;
 				if (store->folder_hierarchy_relative) {
@@ -781,20 +781,20 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store, const gchar *orig_top,
 				   the item we added last, we need to add a portion of this item to
 				   the list as a placeholder */
 				if (!last ||
-				    strncmp(si->path, last->full_name, strlen(last->full_name)) != 0 ||
-				    si->path[strlen(last->full_name)] != '.') {
-					tmpname = g_strdup(si->path);
+				    strncmp (si->path, last->full_name, strlen (last->full_name)) != 0 ||
+				    si->path[strlen (last->full_name)] != '.') {
+					tmpname = g_strdup (si->path);
 					*(strchr(tmpname + toplen, '.')) = '\0';
-					fi = nntp_folder_info_from_name(store, FALSE, tmpname);
+					fi = nntp_folder_info_from_name (store, FALSE, tmpname);
 					if (!fi)
 						continue;
 
 					fi->flags |= CAMEL_FOLDER_NOSELECT;
 					if (store->folder_hierarchy_relative) {
-						g_free(fi->name);
-						fi->name = g_strdup(tmpname + ((toplen==1) ? 0 : toplen));
+						g_free (fi->name);
+						fi->name = g_strdup (tmpname + ((toplen==1) ? 0 : toplen));
 					}
-					g_free(tmpname);
+					g_free (tmpname);
 				} else {
 					continue;
 				}
@@ -820,20 +820,20 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store, const gchar *orig_top,
 			}
 		} else if (subscribed_or_flag && first) {
 			/* we have already added subitems, but this item is no longer a subitem */
-			camel_store_summary_info_free((CamelStoreSummary *)store->summary, si);
+			camel_store_summary_info_free ((CamelStoreSummary *)store->summary, si);
 			break;
 		}
-		camel_store_summary_info_free((CamelStoreSummary *)store->summary, si);
+		camel_store_summary_info_free ((CamelStoreSummary *)store->summary, si);
 	}
 
 	g_hash_table_destroy (known);
-	g_free(top);
+	g_free (top);
 	return first;
 }
 
 /* retrieves the date from the NNTP server */
 static gboolean
-nntp_get_date(CamelNNTPStore *nntp_store, GError **error)
+nntp_get_date (CamelNNTPStore *nntp_store, GError **error)
 {
 	guchar *line;
 	gint ret = camel_nntp_command(nntp_store, error, NULL, (gchar **)&line, "date");
@@ -855,12 +855,12 @@ nntp_get_date(CamelNNTPStore *nntp_store, GError **error)
 }
 
 static void
-store_info_remove(gpointer key, gpointer value, gpointer data)
+store_info_remove (gpointer key, gpointer value, gpointer data)
 {
 	CamelStoreSummary *summary = data;
 	CamelStoreInfo *si = value;
 
-	camel_store_summary_remove(summary, si);
+	camel_store_summary_remove (summary, si);
 }
 
 static gint
@@ -870,7 +870,7 @@ store_info_sort (gconstpointer a, gconstpointer b)
 }
 
 static CamelFolderInfo *
-nntp_store_get_folder_info_all(CamelNNTPStore *nntp_store, const gchar *top, guint32 flags, gboolean online, GError **error)
+nntp_store_get_folder_info_all (CamelNNTPStore *nntp_store, const gchar *top, guint32 flags, gboolean online, GError **error)
 {
 	CamelNNTPStoreSummary *summary = nntp_store->summary;
 	CamelNNTPStoreInfo *si;
@@ -888,9 +888,9 @@ nntp_store_get_folder_info_all(CamelNNTPStore *nntp_store, const gchar *top, gui
 		/* we may need to update */
 		if (summary->last_newslist[0] != 0) {
 			gchar date[14];
-			memcpy(date, summary->last_newslist + 2, 6); /* YYMMDDD */
+			memcpy (date, summary->last_newslist + 2, 6); /* YYMMDDD */
 			date[6] = ' ';
-			memcpy(date + 7, summary->last_newslist + 8, 6); /* HHMMSS */
+			memcpy (date + 7, summary->last_newslist + 8, 6); /* HHMMSS */
 			date[13] = '\0';
 
 			/* Some servers don't support date (!), so fallback if they dont */
@@ -907,7 +907,7 @@ nntp_store_get_folder_info_all(CamelNNTPStore *nntp_store, const gchar *top, gui
 			}
 
 			while ((ret = camel_nntp_stream_line (nntp_store->stream, &line, &len, error)) > 0)
-				nntp_store_info_update(nntp_store, (gchar *) line);
+				nntp_store_info_update (nntp_store, (gchar *) line);
 		} else {
 			GHashTable *all;
 			gint i;
@@ -928,17 +928,17 @@ nntp_store_get_folder_info_all(CamelNNTPStore *nntp_store, const gchar *top, gui
 				goto error;
 			}
 
-			all = g_hash_table_new(g_str_hash, g_str_equal);
+			all = g_hash_table_new (g_str_hash, g_str_equal);
 			for (i = 0; (si = (CamelNNTPStoreInfo *)camel_store_summary_index ((CamelStoreSummary *)nntp_store->summary, i)); i++)
-				g_hash_table_insert(all, si->info.path, si);
+				g_hash_table_insert (all, si->info.path, si);
 
-			while ((ret = camel_nntp_stream_line(nntp_store->stream, &line, &len, error)) > 0) {
-				si = nntp_store_info_update(nntp_store, (gchar *) line);
-				g_hash_table_remove(all, si->info.path);
+			while ((ret = camel_nntp_stream_line (nntp_store->stream, &line, &len, error)) > 0) {
+				si = nntp_store_info_update (nntp_store, (gchar *) line);
+				g_hash_table_remove (all, si->info.path);
 			}
 
-			g_hash_table_foreach(all, store_info_remove, nntp_store->summary);
-			g_hash_table_destroy(all);
+			g_hash_table_foreach (all, store_info_remove, nntp_store->summary);
+			g_hash_table_destroy (all);
 		}
 
 		/* sort the list */
@@ -959,7 +959,7 @@ nntp_store_get_folder_info_all(CamelNNTPStore *nntp_store, const gchar *top, gui
 static CamelFolderInfo *
 nntp_get_folder_info (CamelStore *store, const gchar *top, guint32 flags, gboolean online, GError **error)
 {
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(store);
+	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
 	CamelFolderInfo *first = NULL;
 
 	dd(printf("g_f_i: fast %d subscr %d recursive %d online %d top \"%s\"\n",
@@ -984,7 +984,7 @@ nntp_get_folder_info_online (CamelStore *store, const gchar *top, guint32 flags,
 }
 
 static CamelFolderInfo *
-nntp_get_folder_info_offline(CamelStore *store, const gchar *top, guint32 flags, GError **error)
+nntp_get_folder_info_offline (CamelStore *store, const gchar *top, guint32 flags, GError **error)
 {
 	return nntp_get_folder_info (store, top, flags, FALSE, error);
 }
@@ -1009,14 +1009,14 @@ static gboolean
 nntp_store_subscribe_folder (CamelStore *store, const gchar *folder_name,
 			     GError **error)
 {
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(store);
+	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
 	CamelStoreInfo *si;
 	CamelFolderInfo *fi;
 	gboolean success = TRUE;
 
 	camel_service_lock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	si = camel_store_summary_path(CAMEL_STORE_SUMMARY(nntp_store->summary), folder_name);
+	si = camel_store_summary_path (CAMEL_STORE_SUMMARY (nntp_store->summary), folder_name);
 	if (!si) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
@@ -1028,7 +1028,7 @@ nntp_store_subscribe_folder (CamelStore *store, const gchar *folder_name,
 	} else {
 		if (!(si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)) {
 			si->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
-			fi = nntp_folder_info_from_store_info(nntp_store, nntp_store->do_short_folder_notation, si);
+			fi = nntp_folder_info_from_store_info (nntp_store, nntp_store->do_short_folder_notation, si);
 			fi->flags |= CAMEL_FOLDER_NOINFERIORS | CAMEL_FOLDER_NOCHILDREN;
 			camel_store_summary_touch ((CamelStoreSummary *) nntp_store->summary);
 			camel_store_summary_save ((CamelStoreSummary *) nntp_store->summary);
@@ -1048,14 +1048,14 @@ static gboolean
 nntp_store_unsubscribe_folder (CamelStore *store, const gchar *folder_name,
 			       GError **error)
 {
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(store);
+	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (store);
 	CamelFolderInfo *fi;
 	CamelStoreInfo *fitem;
 	gboolean success = TRUE;
 
 	camel_service_lock (CAMEL_SERVICE (nntp_store), CAMEL_SERVICE_REC_CONNECT_LOCK);
 
-	fitem = camel_store_summary_path(CAMEL_STORE_SUMMARY(nntp_store->summary), folder_name);
+	fitem = camel_store_summary_path (CAMEL_STORE_SUMMARY (nntp_store->summary), folder_name);
 
 	if (!fitem) {
 		g_set_error (
@@ -1136,7 +1136,7 @@ nntp_construct (CamelService *service, CamelSession *session,
 		GError **error)
 {
 	CamelServiceClass *service_class;
-	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE(service);
+	CamelNNTPStore *nntp_store = CAMEL_NNTP_STORE (service);
 	CamelURL *summary_url;
 	gchar *tmp;
 
@@ -1176,13 +1176,13 @@ nntp_construct (CamelService *service, CamelSession *session,
 		nntp_store->folder_hierarchy_relative = FALSE;
 
 	/* setup store-wide cache */
-	nntp_store->cache = camel_data_cache_new(nntp_store->storage_path, error);
+	nntp_store->cache = camel_data_cache_new (nntp_store->storage_path, error);
 	if (nntp_store->cache == NULL)
 		return FALSE;
 
 	/* Default cache expiry - 2 weeks old, or not visited in 5 days */
-	camel_data_cache_set_expire_age(nntp_store->cache, 60*60*24*14);
-	camel_data_cache_set_expire_access(nntp_store->cache, 60*60*24*5);
+	camel_data_cache_set_expire_age (nntp_store->cache, 60*60*24*14);
+	camel_data_cache_set_expire_access (nntp_store->cache, 60*60*24*5);
 
 	return TRUE;
 }
@@ -1237,7 +1237,7 @@ camel_nntp_store_init (CamelNNTPStore *nntp_store)
 
 	store->flags = CAMEL_STORE_SUBSCRIPTIONS;
 
-	nntp_store->mem = (CamelStreamMem *)camel_stream_mem_new();
+	nntp_store->mem = (CamelStreamMem *)camel_stream_mem_new ();
 
 	nntp_store->priv = CAMEL_NNTP_STORE_GET_PRIVATE (nntp_store);
 }
@@ -1269,7 +1269,7 @@ camel_nntp_try_authenticate (CamelNNTPStore *store, GError **error)
 				_("Cannot authenticate to server: %s"), line);
 
 			prompt = g_strdup_printf("%s\n\n%s", top, base);
-			g_free(top);
+			g_free (top);
 		} else {
 			prompt = base;
 			base = NULL;
@@ -1278,8 +1278,8 @@ camel_nntp_try_authenticate (CamelNNTPStore *store, GError **error)
 		service->url->passwd =
 			camel_session_get_password (session, service, NULL,
 						    prompt, "password", CAMEL_SESSION_PASSWORD_SECRET | (store->password_reprompt ? CAMEL_SESSION_PASSWORD_REPROMPT : 0), error);
-		g_free(prompt);
-		g_free(base);
+		g_free (prompt);
+		g_free (base);
 
 		if (!service->url->passwd)
 			return -1;
@@ -1323,9 +1323,9 @@ camel_nntp_raw_commandv (CamelNNTPStore *store, GError **error, gchar **line, co
 	gint d;
 	guint u, u2;
 
-	g_assert(store->stream->mode != CAMEL_NNTP_STREAM_DATA);
+	g_assert (store->stream->mode != CAMEL_NNTP_STREAM_DATA);
 
-	camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_LINE);
+	camel_nntp_stream_set_mode (store->stream, CAMEL_NNTP_STREAM_LINE);
 
 	p = (const guchar *) fmt;
 	ps = (const guchar *) p;
@@ -1338,24 +1338,24 @@ camel_nntp_raw_commandv (CamelNNTPStore *store, GError **error, gchar **line, co
 			ps = p;
 			switch (c) {
 			case 's':
-				s = va_arg(ap, gchar *);
-				camel_stream_write((CamelStream *)store->mem, s, strlen(s), NULL);
+				s = va_arg (ap, gchar *);
+				camel_stream_write ((CamelStream *)store->mem, s, strlen (s), NULL);
 				break;
 			case 'd':
-				d = va_arg(ap, gint);
+				d = va_arg (ap, gint);
 				camel_stream_printf((CamelStream *)store->mem, "%d", d);
 				break;
 			case 'u':
-				u = va_arg(ap, guint);
+				u = va_arg (ap, guint);
 				camel_stream_printf((CamelStream *)store->mem, "%u", u);
 				break;
 			case 'm':
-				s = va_arg(ap, gchar *);
+				s = va_arg (ap, gchar *);
 				camel_stream_printf((CamelStream *)store->mem, "<%s>", s);
 				break;
 			case 'r':
-				u = va_arg(ap, guint);
-				u2 = va_arg(ap, guint);
+				u = va_arg (ap, guint);
+				u2 = va_arg (ap, guint);
 				if (u == u2)
 					camel_stream_printf((CamelStream *)store->mem, "%u", u);
 				else
@@ -1363,7 +1363,7 @@ camel_nntp_raw_commandv (CamelNNTPStore *store, GError **error, gchar **line, co
 				break;
 			default:
 				g_warning("Passing unknown format to nntp_command: %c\n", c);
-				g_assert(0);
+				g_assert (0);
 			}
 		}
 	}
@@ -1373,7 +1373,7 @@ camel_nntp_raw_commandv (CamelNNTPStore *store, GError **error, gchar **line, co
 
 	byte_array = camel_stream_mem_get_byte_array (store->mem);
 
-	if (camel_stream_write((CamelStream *) store->stream, (const gchar *) byte_array->data, byte_array->len, error) == -1)
+	if (camel_stream_write ((CamelStream *) store->stream, (const gchar *) byte_array->data, byte_array->len, error) == -1)
 		goto ioerror;
 
 	/* FIXME: hack */
@@ -1387,7 +1387,7 @@ camel_nntp_raw_commandv (CamelNNTPStore *store, GError **error, gchar **line, co
 
 	/* Handle all switching to data mode here, to make callers job easier */
 	if (u == 215 || (u >= 220 && u <=224) || (u >= 230 && u <= 231))
-		camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_DATA);
+		camel_nntp_stream_set_mode (store->stream, CAMEL_NNTP_STREAM_DATA);
 
 	return u;
 
@@ -1397,21 +1397,21 @@ ioerror:
 }
 
 gint
-camel_nntp_raw_command(CamelNNTPStore *store, GError **error, gchar **line, const gchar *fmt, ...)
+camel_nntp_raw_command (CamelNNTPStore *store, GError **error, gchar **line, const gchar *fmt, ...)
 {
 	gint ret;
 	va_list ap;
 
-	va_start(ap, fmt);
-	ret = camel_nntp_raw_commandv(store, error, line, fmt, ap);
-	va_end(ap);
+	va_start (ap, fmt);
+	ret = camel_nntp_raw_commandv (store, error, line, fmt, ap);
+	va_end (ap);
 
 	return ret;
 }
 
 /* use this where you also need auth to be handled, i.e. most cases where you'd try raw command */
 gint
-camel_nntp_raw_command_auth(CamelNNTPStore *store, GError **error, gchar **line, const gchar *fmt, ...)
+camel_nntp_raw_command_auth (CamelNNTPStore *store, GError **error, gchar **line, const gchar *fmt, ...)
 {
 	gint ret, retry, go;
 	va_list ap;
@@ -1422,12 +1422,12 @@ camel_nntp_raw_command_auth(CamelNNTPStore *store, GError **error, gchar **line,
 		go = FALSE;
 		retry++;
 
-		va_start(ap, fmt);
-		ret = camel_nntp_raw_commandv(store, error, line, fmt, ap);
-		va_end(ap);
+		va_start (ap, fmt);
+		ret = camel_nntp_raw_commandv (store, error, line, fmt, ap);
+		va_end (ap);
 
 		if (ret == NNTP_AUTH_REQUIRED) {
-			if (camel_nntp_try_authenticate(store, error) != NNTP_AUTH_ACCEPTED)
+			if (camel_nntp_try_authenticate (store, error) != NNTP_AUTH_ACCEPTED)
 				return -1;
 			go = TRUE;
 		}
@@ -1468,18 +1468,18 @@ camel_nntp_command (CamelNNTPStore *store, GError **error, CamelNNTPFolder *fold
 		/* Check for unprocessed data, !*/
 		if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) {
 			g_warning("Unprocessed data left in stream, flushing");
-			while (camel_nntp_stream_getd(store->stream, (guchar **)&p, &u) > 0)
+			while (camel_nntp_stream_getd (store->stream, (guchar **)&p, &u) > 0)
 				;
 		}
-		camel_nntp_stream_set_mode(store->stream, CAMEL_NNTP_STREAM_LINE);
+		camel_nntp_stream_set_mode (store->stream, CAMEL_NNTP_STREAM_LINE);
 
 		if (folder != NULL
-		    && (store->current_folder == NULL || strcmp(store->current_folder, full_name) != 0)) {
+		    && (store->current_folder == NULL || strcmp (store->current_folder, full_name) != 0)) {
 			ret = camel_nntp_raw_command_auth(store, &local_error, line, "group %s", full_name);
 			if (ret == 211) {
-				g_free(store->current_folder);
+				g_free (store->current_folder);
 				store->current_folder = g_strdup (full_name);
-				if (camel_nntp_folder_selected(folder, *line, &local_error) < 0) {
+				if (camel_nntp_folder_selected (folder, *line, &local_error) < 0) {
 					ret = -1;
 					goto error;
 				}
@@ -1492,13 +1492,13 @@ camel_nntp_command (CamelNNTPStore *store, GError **error, CamelNNTPFolder *fold
 		if (fmt == NULL)
 			return 0;
 
-		va_start(ap, fmt);
-		ret = camel_nntp_raw_commandv(store, &local_error, line, fmt, ap);
-		va_end(ap);
+		va_start (ap, fmt);
+		ret = camel_nntp_raw_commandv (store, &local_error, line, fmt, ap);
+		va_end (ap);
 	error:
 		switch (ret) {
 		case NNTP_AUTH_REQUIRED:
-			if (camel_nntp_try_authenticate(store, error) != NNTP_AUTH_ACCEPTED)
+			if (camel_nntp_try_authenticate (store, error) != NNTP_AUTH_ACCEPTED)
 				return -1;
 			retry--;
 			ret = -1;
diff --git a/camel/providers/nntp/camel-nntp-store.h b/camel/providers/nntp/camel-nntp-store.h
index 3f0de8d..1e968c2 100644
--- a/camel/providers/nntp/camel-nntp-store.h
+++ b/camel/providers/nntp/camel-nntp-store.h
@@ -110,8 +110,8 @@ struct _CamelNNTPStoreClass {
 GType camel_nntp_store_get_type (void);
 
 gint camel_nntp_raw_commandv (CamelNNTPStore *store, struct _GError **error, gchar **line, const gchar *fmt, va_list ap);
-gint camel_nntp_raw_command(CamelNNTPStore *store, struct _GError **error, gchar **line, const gchar *fmt, ...);
-gint camel_nntp_raw_command_auth(CamelNNTPStore *store, struct _GError **error, gchar **line, const gchar *fmt, ...);
+gint camel_nntp_raw_command (CamelNNTPStore *store, struct _GError **error, gchar **line, const gchar *fmt, ...);
+gint camel_nntp_raw_command_auth (CamelNNTPStore *store, struct _GError **error, gchar **line, const gchar *fmt, ...);
 gint camel_nntp_command (CamelNNTPStore *store, struct _GError **error, struct _CamelNNTPFolder *folder, gchar **line, const gchar *fmt, ...);
 
 G_END_DECLS
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index 815a42e..b0df90d 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -121,7 +121,7 @@ message_info_new_from_header (CamelFolderSummary *s,
 	if (cns->priv->uid == NULL)
 		return NULL;
 
-	mi = (CamelMessageInfoBase *)CAMEL_FOLDER_SUMMARY_CLASS (camel_nntp_summary_parent_class)->message_info_new_from_header(s, h);
+	mi = (CamelMessageInfoBase *)CAMEL_FOLDER_SUMMARY_CLASS (camel_nntp_summary_parent_class)->message_info_new_from_header (s, h);
 	if (mi) {
 		camel_pstring_free (mi->uid);
 		mi->uid = camel_pstring_strdup (cns->priv->uid);
@@ -399,7 +399,7 @@ error:
 				error, G_IO_ERROR,
 				g_io_error_from_errno (errno),
 				_("Operation failed: %s"),
-				g_strerror(errno));
+				g_strerror (errno));
 	}
 
 ioerror:
@@ -437,9 +437,9 @@ camel_nntp_summary_check (CamelNNTPSummary *cns, CamelNNTPStore *store, gchar *l
 	parent_store = camel_folder_get_parent_store (s->folder);
 
 	line +=3;
-	n = strtoul(line, &line, 10);
-	f = strtoul(line, &line, 10);
-	l = strtoul(line, &line, 10);
+	n = strtoul (line, &line, 10);
+	f = strtoul (line, &line, 10);
+	l = strtoul (line, &line, 10);
 	if (line[0] == ' ') {
 		gchar *tmp;
 
diff --git a/camel/providers/nntp/camel-nntp-summary.h b/camel/providers/nntp/camel-nntp-summary.h
index 71781ec..39c3f2c 100644
--- a/camel/providers/nntp/camel-nntp-summary.h
+++ b/camel/providers/nntp/camel-nntp-summary.h
@@ -64,9 +64,9 @@ struct _CamelNNTPSummaryClass {
 };
 
 GType	camel_nntp_summary_get_type	(void);
-CamelNNTPSummary *camel_nntp_summary_new(struct _CamelFolder *folder, const gchar *path);
+CamelNNTPSummary *camel_nntp_summary_new (struct _CamelFolder *folder, const gchar *path);
 
-gint camel_nntp_summary_check(CamelNNTPSummary *cns, struct _CamelNNTPStore *store, gchar *line, struct _CamelFolderChangeInfo *changes, struct _GError **error);
+gint camel_nntp_summary_check (CamelNNTPSummary *cns, struct _CamelNNTPStore *store, gchar *line, struct _CamelFolderChangeInfo *changes, struct _GError **error);
 
 G_END_DECLS
 
diff --git a/camel/providers/nntp/test-newsrc.c b/camel/providers/nntp/test-newsrc.c
index 6f997b6..3667cce 100644
--- a/camel/providers/nntp/test-newsrc.c
+++ b/camel/providers/nntp/test-newsrc.c
@@ -3,7 +3,7 @@
 #include "camel-nntp-newsrc.h"
 
 gint
-main(gint argc, gchar *argv[])
+main (gint argc, gchar *argv[])
 {
   CamelNNTPNewsrc *newsrc = camel_nntp_newsrc_read_for_server (argv[1]);
   camel_nntp_newsrc_write_to_file (newsrc, stdout);
diff --git a/camel/providers/pop3/camel-pop3-engine.c b/camel/providers/pop3/camel-pop3-engine.c
index ebf47d8..e8eec31 100644
--- a/camel/providers/pop3/camel-pop3-engine.c
+++ b/camel/providers/pop3/camel-pop3-engine.c
@@ -43,7 +43,7 @@ extern CamelServiceAuthType camel_pop3_apop_authtype;
 extern gint camel_verbose_debug;
 #define dd(x) (camel_verbose_debug?(x):0)
 
-static void get_capabilities(CamelPOP3Engine *pe);
+static void get_capabilities (CamelPOP3Engine *pe);
 
 G_DEFINE_TYPE (CamelPOP3Engine, camel_pop3_engine, CAMEL_TYPE_OBJECT)
 
@@ -129,13 +129,13 @@ read_greeting (CamelPOP3Engine *pe)
  * Returns: the stream
  **/
 CamelPOP3Engine *
-camel_pop3_engine_new(CamelStream *source, guint32 flags)
+camel_pop3_engine_new (CamelStream *source, guint32 flags)
 {
 	CamelPOP3Engine *pe;
 
 	pe = g_object_new (CAMEL_TYPE_POP3_ENGINE, NULL);
 
-	pe->stream = (CamelPOP3Stream *)camel_pop3_stream_new(source);
+	pe->stream = (CamelPOP3Stream *)camel_pop3_stream_new (source);
 	pe->state = CAMEL_POP3_ENGINE_AUTH;
 	pe->flags = flags;
 
@@ -177,7 +177,7 @@ static struct {
 };
 
 static void
-cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_capa (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 {
 	guchar *line, *tok, *next;
 	guint len;
@@ -188,19 +188,19 @@ cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 	dd(printf("cmd_capa\n"));
 
 	do {
-		ret = camel_pop3_stream_line(stream, &line, &len);
+		ret = camel_pop3_stream_line (stream, &line, &len);
 		if (ret >= 0) {
 			if (strncmp((gchar *) line, "SASL ", 5) == 0) {
 				tok = line+5;
 				dd(printf("scanning tokens '%s'\n", tok));
 				while (tok) {
-					next = (guchar *) strchr((gchar *) tok, ' ');
+					next = (guchar *) strchr ((gchar *) tok, ' ');
 					if (next)
 						*next++ = 0;
-					auth = camel_sasl_authtype((const gchar *) tok);
+					auth = camel_sasl_authtype ((const gchar *) tok);
 					if (auth) {
 						dd(printf("got auth type '%s'\n", tok));
-						pe->auth = g_list_prepend(pe->auth, auth);
+						pe->auth = g_list_prepend (pe->auth, auth);
 					} else {
 						dd(printf("unsupported auth type '%s'\n", tok));
 					}
@@ -208,7 +208,7 @@ cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 				}
 			} else {
 				for (i = 0; i < G_N_ELEMENTS (capa); i++) {
-					if (strcmp((gchar *) capa[i].cap, (gchar *) line) == 0)
+					if (strcmp ((gchar *) capa[i].cap, (gchar *) line) == 0)
 						pe->capa |= capa[i].flag;
 				}
 			}
@@ -217,15 +217,15 @@ cmd_capa(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 }
 
 static void
-get_capabilities(CamelPOP3Engine *pe)
+get_capabilities (CamelPOP3Engine *pe)
 {
 	CamelPOP3Command *pc;
 
 	if (!(pe->flags & CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS)) {
 		pc = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_capa, NULL, "CAPA\r\n");
-		while (camel_pop3_engine_iterate(pe, pc) > 0)
+		while (camel_pop3_engine_iterate (pe, pc) > 0)
 			;
-		camel_pop3_engine_command_free(pe, pc);
+		camel_pop3_engine_command_free (pe, pc);
 
 		if (pe->state == CAMEL_POP3_ENGINE_TRANSACTION && !(pe->capa & CAMEL_POP3_CAP_UIDL)) {
 			/* check for UIDL support manually */
@@ -243,35 +243,35 @@ get_capabilities(CamelPOP3Engine *pe)
 
 /* returns true if the command was sent, false if it was just queued */
 static gint
-engine_command_queue(CamelPOP3Engine *pe, CamelPOP3Command *pc)
+engine_command_queue (CamelPOP3Engine *pe, CamelPOP3Command *pc)
 {
-	if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen(pc->data)) > CAMEL_POP3_SEND_LIMIT)
+	if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen (pc->data)) > CAMEL_POP3_SEND_LIMIT)
 	    && pe->current != NULL) {
-		camel_dlist_addtail(&pe->queue, (CamelDListNode *)pc);
+		camel_dlist_addtail (&pe->queue, (CamelDListNode *)pc);
 		return FALSE;
 	}
 
 	/* ??? */
-	if (camel_stream_write((CamelStream *)pe->stream, pc->data, strlen(pc->data), NULL) == -1) {
-		camel_dlist_addtail(&pe->queue, (CamelDListNode *)pc);
+	if (camel_stream_write ((CamelStream *)pe->stream, pc->data, strlen (pc->data), NULL) == -1) {
+		camel_dlist_addtail (&pe->queue, (CamelDListNode *)pc);
 		return FALSE;
 	}
 
-	pe->sentlen += strlen(pc->data);
+	pe->sentlen += strlen (pc->data);
 
 	pc->state = CAMEL_POP3_COMMAND_DISPATCHED;
 
 	if (pe->current == NULL)
 		pe->current = pc;
 	else
-		camel_dlist_addtail(&pe->active, (CamelDListNode *)pc);
+		camel_dlist_addtail (&pe->active, (CamelDListNode *)pc);
 
 	return TRUE;
 }
 
 /* returns -1 on error (sets errno), 0 when no work to do, or >0 if work remaining */
 gint
-camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
+camel_pop3_engine_iterate (CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
 {
 	guchar *p;
 	guint len;
@@ -286,7 +286,7 @@ camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
 
 	/* LOCK */
 
-	if (camel_pop3_stream_line(pe->stream, &pe->line, &pe->linelen) == -1)
+	if (camel_pop3_stream_line (pe->stream, &pe->line, &pe->linelen) == -1)
 		goto ioerror;
 
 	p = pe->line;
@@ -295,15 +295,15 @@ camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
 		dd(printf("Got + response\n"));
 		if (pc->flags & CAMEL_POP3_COMMAND_MULTI) {
 			pc->state = CAMEL_POP3_COMMAND_DATA;
-			camel_pop3_stream_set_mode(pe->stream, CAMEL_POP3_STREAM_DATA);
+			camel_pop3_stream_set_mode (pe->stream, CAMEL_POP3_STREAM_DATA);
 
 			if (pc->func)
-				pc->func(pe, pe->stream, pc->func_data);
+				pc->func (pe, pe->stream, pc->func_data);
 
 			/* Make sure we get all data before going back to command mode */
-			while (camel_pop3_stream_getd(pe->stream, &p, &len) > 0)
+			while (camel_pop3_stream_getd (pe->stream, &p, &len) > 0)
 				;
-			camel_pop3_stream_set_mode(pe->stream, CAMEL_POP3_STREAM_LINE);
+			camel_pop3_stream_set_mode (pe->stream, CAMEL_POP3_STREAM_LINE);
 		} else {
 			pc->state = CAMEL_POP3_COMMAND_OK;
 		}
@@ -318,33 +318,33 @@ camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
 		break;
 	}
 
-	camel_dlist_addtail(&pe->done, (CamelDListNode *)pc);
-	pe->sentlen -= strlen(pc->data);
+	camel_dlist_addtail (&pe->done, (CamelDListNode *)pc);
+	pe->sentlen -= strlen (pc->data);
 
 	/* Set next command */
-	pe->current = (CamelPOP3Command *)camel_dlist_remhead(&pe->active);
+	pe->current = (CamelPOP3Command *)camel_dlist_remhead (&pe->active);
 
 	/* check the queue for sending any we can now send also */
 	pw = (CamelPOP3Command *)pe->queue.head;
 	pn = pw->next;
 
 	while (pn) {
-		if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen(pw->data)) > CAMEL_POP3_SEND_LIMIT)
+		if (((pe->capa & CAMEL_POP3_CAP_PIPE) == 0 || (pe->sentlen + strlen (pw->data)) > CAMEL_POP3_SEND_LIMIT)
 		    && pe->current != NULL)
 			break;
 
-		if (camel_stream_write((CamelStream *)pe->stream, pw->data, strlen(pw->data), NULL) == -1)
+		if (camel_stream_write ((CamelStream *)pe->stream, pw->data, strlen (pw->data), NULL) == -1)
 			goto ioerror;
 
-		camel_dlist_remove((CamelDListNode *)pw);
+		camel_dlist_remove ((CamelDListNode *)pw);
 
-		pe->sentlen += strlen(pw->data);
+		pe->sentlen += strlen (pw->data);
 		pw->state = CAMEL_POP3_COMMAND_DISPATCHED;
 
 		if (pe->current == NULL)
 			pe->current = pw;
 		else
-			camel_dlist_addtail(&pe->active, (CamelDListNode *)pw);
+			camel_dlist_addtail (&pe->active, (CamelDListNode *)pw);
 
 		pw = pn;
 		pn = pn->next;
@@ -358,19 +358,19 @@ camel_pop3_engine_iterate(CamelPOP3Engine *pe, CamelPOP3Command *pcwait)
 	return pe->current==NULL?0:1;
 ioerror:
 	/* we assume all outstanding commands are gunna fail now */
-	while ((pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->active))) {
+	while ((pw = (CamelPOP3Command*)camel_dlist_remhead (&pe->active))) {
 		pw->state = CAMEL_POP3_COMMAND_ERR;
-		camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
+		camel_dlist_addtail (&pe->done, (CamelDListNode *)pw);
 	}
 
-	while ((pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->queue))) {
+	while ((pw = (CamelPOP3Command*)camel_dlist_remhead (&pe->queue))) {
 		pw->state = CAMEL_POP3_COMMAND_ERR;
-		camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
+		camel_dlist_addtail (&pe->done, (CamelDListNode *)pw);
 	}
 
 	if (pe->current) {
 		pe->current->state = CAMEL_POP3_COMMAND_ERR;
-		camel_dlist_addtail(&pe->done, (CamelDListNode *)pe->current);
+		camel_dlist_addtail (&pe->done, (CamelDListNode *)pe->current);
 		pe->current = NULL;
 	}
 
@@ -378,31 +378,31 @@ ioerror:
 }
 
 CamelPOP3Command *
-camel_pop3_engine_command_new(CamelPOP3Engine *pe, guint32 flags, CamelPOP3CommandFunc func, gpointer data, const gchar *fmt, ...)
+camel_pop3_engine_command_new (CamelPOP3Engine *pe, guint32 flags, CamelPOP3CommandFunc func, gpointer data, const gchar *fmt, ...)
 {
 	CamelPOP3Command *pc;
 	va_list ap;
 
-	pc = g_malloc0(sizeof(*pc));
+	pc = g_malloc0 (sizeof (*pc));
 	pc->func = func;
 	pc->func_data = data;
 	pc->flags = flags;
 
-	va_start(ap, fmt);
-	pc->data = g_strdup_vprintf(fmt, ap);
+	va_start (ap, fmt);
+	pc->data = g_strdup_vprintf (fmt, ap);
 	pc->state = CAMEL_POP3_COMMAND_IDLE;
 
 	/* TODO: what about write errors? */
-	engine_command_queue(pe, pc);
+	engine_command_queue (pe, pc);
 
 	return pc;
 }
 
 void
-camel_pop3_engine_command_free(CamelPOP3Engine *pe, CamelPOP3Command *pc)
+camel_pop3_engine_command_free (CamelPOP3Engine *pe, CamelPOP3Command *pc)
 {
 	if (pe->current != pc)
-		camel_dlist_remove((CamelDListNode *)pc);
-	g_free(pc->data);
-	g_free(pc);
+		camel_dlist_remove ((CamelDListNode *)pc);
+	g_free (pc->data);
+	g_free (pc);
 }
diff --git a/camel/providers/pop3/camel-pop3-engine.h b/camel/providers/pop3/camel-pop3-engine.h
index 89dbaf6..856a84e 100644
--- a/camel/providers/pop3/camel-pop3-engine.h
+++ b/camel/providers/pop3/camel-pop3-engine.h
@@ -142,7 +142,7 @@ CamelPOP3Engine  *camel_pop3_engine_new		(CamelStream *source, guint32 flags);
 
 void              camel_pop3_engine_reget_capabilities (CamelPOP3Engine *engine);
 
-void              camel_pop3_engine_command_free(CamelPOP3Engine *pe, CamelPOP3Command *pc);
+void              camel_pop3_engine_command_free (CamelPOP3Engine *pe, CamelPOP3Command *pc);
 
 gint		  camel_pop3_engine_iterate	(CamelPOP3Engine *pe, CamelPOP3Command *pc);
 
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index 8dc74fb..b77129e 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -130,7 +130,7 @@ camel_pop3_folder_new (CamelStore *parent, GError **error)
 
 /* create a uid from md5 of 'top' output */
 static void
-cmd_builduid(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_builduid (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 {
 	GChecksum *checksum;
 	CamelPOP3FolderInfo *fi = data;
@@ -147,13 +147,13 @@ cmd_builduid(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 	camel_operation_progress (NULL, fi->id);
 
 	checksum = g_checksum_new (G_CHECKSUM_MD5);
-	mp = camel_mime_parser_new();
-	camel_mime_parser_init_with_stream(mp, (CamelStream *)stream, NULL);
-	switch (camel_mime_parser_step(mp, NULL, NULL)) {
+	mp = camel_mime_parser_new ();
+	camel_mime_parser_init_with_stream (mp, (CamelStream *)stream, NULL);
+	switch (camel_mime_parser_step (mp, NULL, NULL)) {
 	case CAMEL_MIME_PARSER_STATE_HEADER:
 	case CAMEL_MIME_PARSER_STATE_MESSAGE:
 	case CAMEL_MIME_PARSER_STATE_MULTIPART:
-		h = camel_mime_parser_headers_raw(mp);
+		h = camel_mime_parser_headers_raw (mp);
 		while (h) {
 			if (g_ascii_strcasecmp(h->name, "status") != 0
 			    && g_ascii_strcasecmp(h->name, "x-status") != 0) {
@@ -175,7 +175,7 @@ cmd_builduid(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 }
 
 static void
-cmd_list(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_list (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 {
 	gint ret;
 	guint len, id, size;
@@ -189,24 +189,24 @@ cmd_list(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 	pop3_store = CAMEL_POP3_STORE (parent_store);
 
 	do {
-		ret = camel_pop3_stream_line(stream, &line, &len);
+		ret = camel_pop3_stream_line (stream, &line, &len);
 		if (ret>=0) {
 			if (sscanf((gchar *) line, "%u %u", &id, &size) == 2) {
-				fi = g_malloc0(sizeof(*fi));
+				fi = g_malloc0 (sizeof (*fi));
 				fi->size = size;
 				fi->id = id;
 				fi->index = ((CamelPOP3Folder *)folder)->uids->len;
 				if ((pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) == 0)
 					fi->cmd = camel_pop3_engine_command_new(pe, CAMEL_POP3_COMMAND_MULTI, cmd_builduid, fi, "TOP %u 0\r\n", id);
-				g_ptr_array_add(((CamelPOP3Folder *)folder)->uids, fi);
-				g_hash_table_insert(((CamelPOP3Folder *)folder)->uids_id, GINT_TO_POINTER(id), fi);
+				g_ptr_array_add (((CamelPOP3Folder *)folder)->uids, fi);
+				g_hash_table_insert (((CamelPOP3Folder *)folder)->uids_id, GINT_TO_POINTER (id), fi);
 			}
 		}
 	} while (ret>0);
 }
 
 static void
-cmd_uidl(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_uidl (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 {
 	gint ret;
 	guint len;
@@ -217,16 +217,16 @@ cmd_uidl(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 	CamelPOP3Folder *folder = data;
 
 	do {
-		ret = camel_pop3_stream_line(stream, &line, &len);
+		ret = camel_pop3_stream_line (stream, &line, &len);
 		if (ret>=0) {
-			if (strlen((gchar *) line) > 1024)
+			if (strlen ((gchar *) line) > 1024)
 				line[1024] = 0;
 			if (sscanf((gchar *) line, "%u %s", &id, uid) == 2) {
-				fi = g_hash_table_lookup(folder->uids_id, GINT_TO_POINTER(id));
+				fi = g_hash_table_lookup (folder->uids_id, GINT_TO_POINTER (id));
 				if (fi) {
-					camel_operation_progress(NULL, (fi->index+1) * 100 / folder->uids->len);
-					fi->uid = g_strdup(uid);
-					g_hash_table_insert(folder->uids_uid, fi->uid, fi);
+					camel_operation_progress (NULL, (fi->index+1) * 100 / folder->uids->len);
+					fi->uid = g_strdup (uid);
+					g_hash_table_insert (folder->uids_uid, fi->uid, fi);
 				} else {
 					g_warning("ID %u (uid: %s) not in previous LIST output", id, uid);
 				}
@@ -251,14 +251,14 @@ pop3_refresh_info (CamelFolder *folder, GError **error)
 	camel_operation_start (NULL, _("Retrieving POP summary"));
 
 	pop3_folder->uids = g_ptr_array_new ();
-	pop3_folder->uids_uid = g_hash_table_new(g_str_hash, g_str_equal);
+	pop3_folder->uids_uid = g_hash_table_new (g_str_hash, g_str_equal);
 	/* only used during setup */
-	pop3_folder->uids_id = g_hash_table_new(NULL, NULL);
+	pop3_folder->uids_id = g_hash_table_new (NULL, NULL);
 
 	pcl = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_list, folder, "LIST\r\n");
 	if (pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL)
 		pcu = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI, cmd_uidl, folder, "UIDL\r\n");
-	while ((i = camel_pop3_engine_iterate(pop3_store->engine, NULL)) > 0)
+	while ((i = camel_pop3_engine_iterate (pop3_store->engine, NULL)) > 0)
 		;
 
 	if (i == -1) {
@@ -278,24 +278,24 @@ pop3_refresh_info (CamelFolder *folder, GError **error)
 
 	/* TODO: check every id has a uid & commands returned OK too? */
 
-	camel_pop3_engine_command_free(pop3_store->engine, pcl);
+	camel_pop3_engine_command_free (pop3_store->engine, pcl);
 
 	if (pop3_store->engine->capa & CAMEL_POP3_CAP_UIDL) {
-		camel_pop3_engine_command_free(pop3_store->engine, pcu);
+		camel_pop3_engine_command_free (pop3_store->engine, pcu);
 	} else {
 		for (i=0;i<pop3_folder->uids->len;i++) {
 			CamelPOP3FolderInfo *fi = pop3_folder->uids->pdata[i];
 			if (fi->cmd) {
-				camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+				camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 				fi->cmd = NULL;
 			}
 			if (fi->uid)
-				g_hash_table_insert(pop3_folder->uids_uid, fi->uid, fi);
+				g_hash_table_insert (pop3_folder->uids_uid, fi->uid, fi);
 		}
 	}
 
 	/* dont need this anymore */
-	g_hash_table_destroy(pop3_folder->uids_id);
+	g_hash_table_destroy (pop3_folder->uids_id);
 
 	camel_operation_end (NULL);
 
@@ -322,7 +322,7 @@ pop3_sync (CamelFolder *folder,
 		d(printf("%s(%d): pop3_store->delete_after = [%d], expunge=[%d]\n",
 			 __FILE__, __LINE__, pop3_store->delete_after, expunge));
 		camel_operation_start(NULL, _("Expunging old messages"));
-		camel_pop3_delete_old(folder, pop3_store->delete_after, error);
+		camel_pop3_delete_old (folder, pop3_store->delete_after, error);
 	}
 
 	if (!expunge) {
@@ -335,14 +335,14 @@ pop3_sync (CamelFolder *folder,
 		fi = pop3_folder->uids->pdata[i];
 		/* busy already?  wait for that to finish first */
 		if (fi->cmd) {
-			while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0)
+			while (camel_pop3_engine_iterate (pop3_store->engine, fi->cmd) > 0)
 				;
-			camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+			camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 			fi->cmd = NULL;
 		}
 
 		if (fi->flags & CAMEL_MESSAGE_DELETED) {
-			fi->cmd = camel_pop3_engine_command_new(pop3_store->engine,
+			fi->cmd = camel_pop3_engine_command_new (pop3_store->engine,
 								0,
 								NULL,
 								NULL,
@@ -359,15 +359,15 @@ pop3_sync (CamelFolder *folder,
 		fi = pop3_folder->uids->pdata[i];
 		/* wait for delete commands to finish */
 		if (fi->cmd) {
-			while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0)
+			while (camel_pop3_engine_iterate (pop3_store->engine, fi->cmd) > 0)
 				;
-			camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+			camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 			fi->cmd = NULL;
 		}
-		camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
+		camel_operation_progress (NULL, (i+1) * 100 / pop3_folder->uids->len);
 	}
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	camel_pop3_store_expunge (pop3_store, error);
 
@@ -435,7 +435,7 @@ camel_pop3_delete_old (CamelFolder *folder,
 
 	pop3_folder = CAMEL_POP3_FOLDER (folder);
 	pop3_store = CAMEL_POP3_STORE (parent_store);
-	temp = time(&temp);
+	temp = time (&temp);
 
 	d(printf("%s(%d): pop3_folder->uids->len=[%d]\n", __FILE__, __LINE__, pop3_folder->uids->len));
 	for (i = 0; i < pop3_folder->uids->len; i++) {
@@ -452,7 +452,7 @@ camel_pop3_delete_old (CamelFolder *folder,
 		}
 
 		if (message_time) {
-			gdouble time_diff = difftime(temp,message_time);
+			gdouble time_diff = difftime (temp,message_time);
 			gint day_lag = time_diff/(60*60*24);
 
 			d(printf("%s(%d): message_time= [%ld]\n", __FILE__, __LINE__, message_time));
@@ -461,15 +461,15 @@ camel_pop3_delete_old (CamelFolder *folder,
 
 			if (day_lag > days_to_delete) {
 				if (fi->cmd) {
-					while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0) {
+					while (camel_pop3_engine_iterate (pop3_store->engine, fi->cmd) > 0) {
 						; /* do nothing - iterating until end */
 					}
 
-					camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+					camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 					fi->cmd = NULL;
 				}
 				d(printf("%s(%d): Deleting old messages\n", __FILE__, __LINE__));
-				fi->cmd = camel_pop3_engine_command_new(pop3_store->engine,
+				fi->cmd = camel_pop3_engine_command_new (pop3_store->engine,
 									0,
 									NULL,
 									NULL,
@@ -487,15 +487,15 @@ camel_pop3_delete_old (CamelFolder *folder,
 		fi = pop3_folder->uids->pdata[i];
 		/* wait for delete commands to finish */
 		if (fi->cmd) {
-			while (camel_pop3_engine_iterate(pop3_store->engine, fi->cmd) > 0)
+			while (camel_pop3_engine_iterate (pop3_store->engine, fi->cmd) > 0)
 				;
-			camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+			camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 			fi->cmd = NULL;
 		}
-		camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
+		camel_operation_progress (NULL, (i+1) * 100 / pop3_folder->uids->len);
 	}
 
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	camel_pop3_store_expunge (pop3_store, error);
 
@@ -503,7 +503,7 @@ camel_pop3_delete_old (CamelFolder *folder,
 }
 
 static void
-cmd_tocache(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
+cmd_tocache (CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 {
 	CamelPOP3FolderInfo *fi = data;
 	gchar buffer[2048];
@@ -516,8 +516,8 @@ cmd_tocache(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 	if ((n = camel_stream_write (fi->stream, "*", 1, NULL)) == -1)
 		goto done;
 
-	while ((n = camel_stream_read((CamelStream *)stream, buffer, sizeof(buffer), NULL)) > 0) {
-		n = camel_stream_write(fi->stream, buffer, n, NULL);
+	while ((n = camel_stream_read ((CamelStream *)stream, buffer, sizeof (buffer), NULL)) > 0) {
+		n = camel_stream_write (fi->stream, buffer, n, NULL);
 		if (n == -1)
 			break;
 
@@ -525,12 +525,12 @@ cmd_tocache(CamelPOP3Engine *pe, CamelPOP3Stream *stream, gpointer data)
 		if (w > fi->size)
 			w = fi->size;
 		if (fi->size != 0)
-			camel_operation_progress(NULL, (w * 100) / fi->size);
+			camel_operation_progress (NULL, (w * 100) / fi->size);
 	}
 
 	/* it all worked, output a '#' to say we're a-ok */
 	if (n != -1) {
-		camel_stream_reset(fi->stream, NULL);
+		camel_stream_reset (fi->stream, NULL);
 		n = camel_stream_write(fi->stream, "#", 1, NULL);
 	}
 done:
@@ -558,7 +558,7 @@ pop3_get_filename (CamelFolder *folder, const gchar *uid, GError **error)
 	pop3_folder = CAMEL_POP3_FOLDER (folder);
 	pop3_store = CAMEL_POP3_STORE (parent_store);
 
-	fi = g_hash_table_lookup(pop3_folder->uids_uid, uid);
+	fi = g_hash_table_lookup (pop3_folder->uids_uid, uid);
 	if (fi == NULL) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
@@ -588,7 +588,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 	pop3_folder = CAMEL_POP3_FOLDER (folder);
 	pop3_store = CAMEL_POP3_STORE (parent_store);
 
-	fi = g_hash_table_lookup(pop3_folder->uids_uid, uid);
+	fi = g_hash_table_lookup (pop3_folder->uids_uid, uid);
 	if (fi == NULL) {
 		g_set_error (
 			error, CAMEL_FOLDER_ERROR,
@@ -606,7 +606,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 	   & then retrieve from cache, otherwise, start a new one, and similar */
 
 	if (fi->cmd != NULL) {
-		while ((i = camel_pop3_engine_iterate(pop3_store->engine, fi->cmd)) > 0)
+		while ((i = camel_pop3_engine_iterate (pop3_store->engine, fi->cmd)) > 0)
 			;
 
 		if (i == -1)
@@ -614,7 +614,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 
 		/* getting error code? */
 		/*g_assert (fi->cmd->state == CAMEL_POP3_COMMAND_DATA);*/
-		camel_pop3_engine_command_free(pop3_store->engine, fi->cmd);
+		camel_pop3_engine_command_free (pop3_store->engine, fi->cmd);
 		fi->cmd = NULL;
 
 		if (fi->err != 0) {
@@ -636,13 +636,13 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 	/* check to see if we have safely written flag set */
 	if (pop3_store->cache == NULL
 	    || (stream = camel_data_cache_get(pop3_store->cache, "cache", fi->uid, NULL)) == NULL
-	    || camel_stream_read(stream, buffer, 1, NULL) != 1
+	    || camel_stream_read (stream, buffer, 1, NULL) != 1
 	    || buffer[0] != '#') {
 
 		/* Initiate retrieval, if disk backing fails, use a memory backing */
 		if (pop3_store->cache == NULL
 		    || (stream = camel_data_cache_add(pop3_store->cache, "cache", fi->uid, NULL)) == NULL)
-			stream = camel_stream_mem_new();
+			stream = camel_stream_mem_new ();
 
 		/* ref it, the cache storage routine unref's when done */
 		fi->stream = g_object_ref (stream);
@@ -654,7 +654,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 			/* This should keep track of the last one retrieved, also how many are still
 			   oustanding incase of random access on large folders */
 			i = fi->index+1;
-			last = MIN(i+10, pop3_folder->uids->len);
+			last = MIN (i+10, pop3_folder->uids->len);
 			for (;i<last;i++) {
 				CamelPOP3FolderInfo *pfi = pop3_folder->uids->pdata[i];
 
@@ -662,7 +662,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 					pfi->stream = camel_data_cache_add(pop3_store->cache, "cache", pfi->uid, NULL);
 					if (pfi->stream) {
 						pfi->err = EIO;
-						pfi->cmd = camel_pop3_engine_command_new(pop3_store->engine, CAMEL_POP3_COMMAND_MULTI,
+						pfi->cmd = camel_pop3_engine_command_new (pop3_store->engine, CAMEL_POP3_COMMAND_MULTI,
 											 cmd_tocache, pfi, "RETR %u\r\n", pfi->id);
 					}
 				}
@@ -670,7 +670,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 		}
 
 		/* now wait for the first one to finish */
-		while ((i = camel_pop3_engine_iterate(pop3_store->engine, pcr)) > 0)
+		while ((i = camel_pop3_engine_iterate (pop3_store->engine, pcr)) > 0)
 			;
 
 		if (i == -1)
@@ -678,8 +678,8 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 
 		/* getting error code? */
 		/*g_assert (pcr->state == CAMEL_POP3_COMMAND_DATA);*/
-		camel_pop3_engine_command_free(pop3_store->engine, pcr);
-		camel_stream_reset(stream, NULL);
+		camel_pop3_engine_command_free (pop3_store->engine, pcr);
+		camel_stream_reset (stream, NULL);
 
 		/* Check to see we have safely written flag set */
 		if (fi->err != 0) {
@@ -710,7 +710,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 	}
 
 	message = camel_mime_message_new ();
-	if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)message, stream, error) == -1) {
+	if (camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)message, stream, error) == -1) {
 		g_prefix_error (error, _("Cannot get message %s: "), uid);
 		g_object_unref (message);
 		message = NULL;
@@ -718,7 +718,7 @@ pop3_get_message (CamelFolder *folder, const gchar *uid, GError **error)
 done:
 	g_object_unref (stream);
 fail:
-	camel_operation_end(NULL);
+	camel_operation_end (NULL);
 
 	return message;
 }
@@ -730,7 +730,7 @@ pop3_set_message_flags (CamelFolder *folder, const gchar *uid, guint32 flags, gu
 	CamelPOP3FolderInfo *fi;
 	gboolean res = FALSE;
 
-	fi = g_hash_table_lookup(pop3_folder->uids_uid, uid);
+	fi = g_hash_table_lookup (pop3_folder->uids_uid, uid);
 	if (fi) {
 		guint32 new = (fi->flags & ~flags) | (set & flags);
 
@@ -755,13 +755,13 @@ static GPtrArray *
 pop3_get_uids (CamelFolder *folder)
 {
 	CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder);
-	GPtrArray *uids = g_ptr_array_new();
+	GPtrArray *uids = g_ptr_array_new ();
 	CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **)pop3_folder->uids->pdata;
 	gint i;
 
 	for (i=0;i<pop3_folder->uids->len;i++,fi++) {
 		if (fi[0]->uid)
-			g_ptr_array_add(uids, fi[0]->uid);
+			g_ptr_array_add (uids, fi[0]->uid);
 	}
 
 	return uids;
diff --git a/camel/providers/pop3/camel-pop3-folder.h b/camel/providers/pop3/camel-pop3-folder.h
index aba32a6..d5edd0d 100644
--- a/camel/providers/pop3/camel-pop3-folder.h
+++ b/camel/providers/pop3/camel-pop3-folder.h
@@ -81,7 +81,7 @@ CamelFolder *camel_pop3_folder_new (CamelStore *parent, GError **error);
 
 GType camel_pop3_folder_get_type (void);
 
-gint camel_pop3_delete_old(CamelFolder *folder, gint days_to_delete, GError **error);
+gint camel_pop3_delete_old (CamelFolder *folder, gint days_to_delete, GError **error);
 
 G_END_DECLS
 
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
index 777c3a9..1c1196f 100644
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ b/camel/providers/pop3/camel-pop3-provider.c
@@ -88,7 +88,7 @@ CamelServiceAuthType camel_pop3_apop_authtype = {
 };
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	CamelServiceAuthType *auth;
 
@@ -99,12 +99,12 @@ camel_provider_module_init(void)
 	pop3_provider.authtypes = camel_sasl_authtype_list (FALSE);
 	auth = camel_sasl_authtype("LOGIN");
 	if (auth)
-		pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, auth);
-	pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_apop_authtype);
-	pop3_provider.authtypes = g_list_prepend(pop3_provider.authtypes, &camel_pop3_password_authtype);
+		pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, auth);
+	pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, &camel_pop3_apop_authtype);
+	pop3_provider.authtypes = g_list_prepend (pop3_provider.authtypes, &camel_pop3_password_authtype);
 	pop3_provider.translation_domain = GETTEXT_PACKAGE;
 
-	camel_provider_register(&pop3_provider);
+	camel_provider_register (&pop3_provider);
 }
 
 static void
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 75bf75a..1c92143 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -160,7 +160,7 @@ connect_to_server (CamelService *service,
 		flags |= CAMEL_POP3_ENGINE_DISABLE_EXTENSIONS;
 
 	if ((delete_days = (gchar *) camel_url_get_param(service->url,"delete_after")))
-		store->delete_after =  atoi(delete_days);
+		store->delete_after =  atoi (delete_days);
 
 	if (!(store->engine = camel_pop3_engine_new (tcp_stream, flags))) {
 		g_set_error (
@@ -307,7 +307,7 @@ try_sasl (CamelPOP3Store *store,
 		goto ioerror;
 
 	while (1) {
-		if (camel_pop3_stream_line(stream, &line, &len) == -1)
+		if (camel_pop3_stream_line (stream, &line, &len) == -1)
 			goto ioerror;
 		if (strncmp((gchar *) line, "+OK", 3) == 0)
 			break;
@@ -330,10 +330,10 @@ try_sasl (CamelPOP3Store *store,
 		/* If we dont get continuation, or the sasl object's run out of work, or we dont get a challenge,
 		   its a protocol error, so fail, and try reset the server */
 		if (strncmp((gchar *) line, "+ ", 2) != 0
-		    || camel_sasl_get_authenticated(sasl)
-		    || (resp = (guchar *) camel_sasl_challenge_base64(sasl, (const gchar *) line+2, error)) == NULL) {
+		    || camel_sasl_get_authenticated (sasl)
+		    || (resp = (guchar *) camel_sasl_challenge_base64 (sasl, (const gchar *) line+2, error)) == NULL) {
 			camel_stream_printf((CamelStream *)stream, "*\r\n");
-			camel_pop3_stream_line(stream, &line, &len);
+			camel_pop3_stream_line (stream, &line, &len);
 			g_set_error (
 				error, CAMEL_SERVICE_ERROR,
 				CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
@@ -344,7 +344,7 @@ try_sasl (CamelPOP3Store *store,
 		}
 
 		ret = camel_stream_printf((CamelStream *)stream, "%s\r\n", resp);
-		g_free(resp);
+		g_free (resp);
 		if (ret == -1)
 			goto ioerror;
 
@@ -412,7 +412,7 @@ pop3_try_authenticate (CamelService *service,
 		d = store->engine->apop;
 
 		while (*d != '\0') {
-			if (!isascii((gint)*d)) {
+			if (!isascii ((gint)*d)) {
 
 				/* README for Translators: The string APOP should not be translated */
 				g_set_error (
@@ -428,7 +428,7 @@ pop3_try_authenticate (CamelService *service,
 			d++;
 		}
 
-		secret = g_alloca(strlen(store->engine->apop)+strlen(service->url->passwd)+1);
+		secret = g_alloca (strlen (store->engine->apop)+strlen (service->url->passwd)+1);
 		sprintf(secret, "%s%s",  store->engine->apop, service->url->passwd);
 		md5asc = g_compute_checksum_for_string (G_CHECKSUM_MD5, secret, -1);
 		pcp = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "APOP %s %s\r\n",
@@ -441,7 +441,7 @@ pop3_try_authenticate (CamelService *service,
 		l = store->engine->auth;
 		while (l) {
 			auth = l->data;
-			if (strcmp(auth->authproto, service->url->authmech) == 0)
+			if (strcmp (auth->authproto, service->url->authmech) == 0)
 				return try_sasl (store, service->url->authmech, error);
 			l = l->next;
 		}
@@ -455,7 +455,7 @@ pop3_try_authenticate (CamelService *service,
 		return 0;
 	}
 
-	while ((status = camel_pop3_engine_iterate(store->engine, pcp)) > 0)
+	while ((status = camel_pop3_engine_iterate (store->engine, pcp)) > 0)
 		;
 
 	if (status == -1) {
@@ -504,7 +504,7 @@ pop3_try_authenticate (CamelService *service,
 	camel_pop3_engine_command_free (store->engine, pcp);
 
 	if (pcu)
-		camel_pop3_engine_command_free(store->engine, pcu);
+		camel_pop3_engine_command_free (store->engine, pcu);
 
 	return status;
 }
@@ -517,7 +517,7 @@ pop3_store_finalize (GObject *object)
 	/* force disconnect so we dont have it run later, after we've cleaned up some stuff */
 	/* SIGH */
 
-	camel_service_disconnect((CamelService *)pop3_store, TRUE, NULL);
+	camel_service_disconnect ((CamelService *)pop3_store, TRUE, NULL);
 
 	if (pop3_store->engine)
 		g_object_unref (pop3_store->engine);
@@ -547,11 +547,11 @@ pop3_store_connect (CamelService *service,
 		root = camel_session_get_storage_path (session, service, error);
 		if (root) {
 			store->cache = camel_data_cache_new (root, error);
-			g_free(root);
+			g_free (root);
 			if (store->cache) {
 				/* Default cache expiry - 1 week or not visited in a day */
-				camel_data_cache_set_expire_age(store->cache, 60*60*24*7);
-				camel_data_cache_set_expire_access(store->cache, 60*60*24);
+				camel_data_cache_set_expire_age (store->cache, 60*60*24*7);
+				camel_data_cache_set_expire_access (store->cache, 60*60*24);
 			}
 		}
 	}
@@ -585,7 +585,7 @@ pop3_store_connect (CamelService *service,
 
 	if (local_error != NULL) {
 		g_propagate_error (error, local_error);
-		camel_service_disconnect(service, TRUE, NULL);
+		camel_service_disconnect (service, TRUE, NULL);
 		return FALSE;
 	}
 
@@ -609,9 +609,9 @@ pop3_store_disconnect (CamelService *service,
 		CamelPOP3Command *pc;
 
 		pc = camel_pop3_engine_command_new(store->engine, 0, NULL, NULL, "QUIT\r\n");
-		while (camel_pop3_engine_iterate(store->engine, NULL) > 0)
+		while (camel_pop3_engine_iterate (store->engine, NULL) > 0)
 			;
-		camel_pop3_engine_command_free(store->engine, pc);
+		camel_pop3_engine_command_free (store->engine, pc);
 	}
 
 	/* Chain up to parent's disconnect() method. */
@@ -644,7 +644,7 @@ pop3_store_query_auth_types (CamelService *service,
 	}
 
 	if (connect_to_server_wrapper (service, NULL)) {
-		types = g_list_concat(types, g_list_copy(store->engine->auth));
+		types = g_list_concat (types, g_list_copy (store->engine->auth));
 		pop3_store_disconnect (service, TRUE, NULL);
 	} else {
 		g_set_error (
@@ -766,10 +766,10 @@ camel_pop3_store_expunge (CamelPOP3Store *store,
 	pc = camel_pop3_engine_command_new (
 		store->engine, 0, NULL, NULL, "QUIT\r\n");
 
-	while (camel_pop3_engine_iterate(store->engine, NULL) > 0)
+	while (camel_pop3_engine_iterate (store->engine, NULL) > 0)
 		;
 
-	camel_pop3_engine_command_free(store->engine, pc);
+	camel_pop3_engine_command_free (store->engine, pc);
 
 	camel_service_disconnect (CAMEL_SERVICE (store), FALSE, error);
 }
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c b/camel/providers/sendmail/camel-sendmail-provider.c
index da0aa28..566ea63 100644
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ b/camel/providers/sendmail/camel-sendmail-provider.c
@@ -48,7 +48,7 @@ static CamelProvider sendmail_provider = {
 };
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	sendmail_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_sendmail_transport_get_type ();
 
@@ -56,6 +56,6 @@ camel_provider_module_init(void)
 	sendmail_provider.url_equal = camel_url_equal;
 	sendmail_provider.translation_domain = GETTEXT_PACKAGE;
 
-	camel_provider_register(&sendmail_provider);
+	camel_provider_register (&sendmail_provider);
 }
 
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index e611711..08649db 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -55,7 +55,7 @@ static CamelProvider smtp_provider = {
 };
 
 void
-camel_provider_module_init(void)
+camel_provider_module_init (void)
 {
 	smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = camel_smtp_transport_get_type ();
 	smtp_provider.authtypes = g_list_append (camel_sasl_authtype_list (TRUE), camel_sasl_authtype ("LOGIN"));
@@ -64,7 +64,7 @@ camel_provider_module_init(void)
 	smtp_provider.url_equal = smtp_url_equal;
 	smtp_provider.translation_domain = GETTEXT_PACKAGE;
 
-	camel_provider_register(&smtp_provider);
+	camel_provider_register (&smtp_provider);
 }
 
 static void
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 4d855c6..428b3c8 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -587,7 +587,7 @@ smtp_disconnect (CamelService *service,
 		transport->ostream = NULL;
 	}
 
-	g_free(transport->localaddr);
+	g_free (transport->localaddr);
 	transport->localaddr = NULL;
 
 	transport->connected = FALSE;
@@ -733,13 +733,13 @@ smtp_send_to (CamelTransport *transport, CamelMimeMessage *message,
 			return FALSE;
 		}
 
-		enc = camel_internet_address_encode_address(NULL, NULL, addr);
+		enc = camel_internet_address_encode_address (NULL, NULL, addr);
 		if (!smtp_rcpt (smtp_transport, enc, error)) {
-			g_free(enc);
+			g_free (enc);
 			camel_operation_end (NULL);
 			return FALSE;
 		}
-		g_free(enc);
+		g_free (enc);
 	}
 
 	if (!smtp_data (smtp_transport, message, error)) {
diff --git a/camel/tests/folder/test1.c b/camel/tests/folder/test1.c
index 1fce10e..1ef2768 100644
--- a/camel/tests/folder/test1.c
+++ b/camel/tests/folder/test1.c
@@ -15,14 +15,14 @@ static const gchar *local_providers[] = {
 	"maildir"
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 	gchar *path;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -35,9 +35,9 @@ gint main(gint argc, gchar **argv)
 	for (i = 0; i < G_N_ELEMENTS (local_providers); i++) {
 		path = g_strdup_printf("%s:///tmp/camel-test/%s", local_providers[i], local_providers[i]);
 
-		test_folder_basic(session, path, TRUE, FALSE);
+		test_folder_basic (session, path, TRUE, FALSE);
 
-		g_free(path);
+		g_free (path);
 	}
 
 	g_object_unref (session);
diff --git a/camel/tests/folder/test10.c b/camel/tests/folder/test10.c
index 6c49db9..6d06f3e 100644
--- a/camel/tests/folder/test10.c
+++ b/camel/tests/folder/test10.c
@@ -25,14 +25,14 @@ static CamelSession *session;
 static gint testid;
 
 static gpointer
-worker(gpointer d)
+worker (gpointer d)
 {
 	gint i;
 	CamelStore *store;
 	CamelFolder *folder;
 
 	for (i=0;i<MAX_LOOP;i++) {
-		store = camel_session_get_store(session, path, NULL);
+		store = camel_session_get_store (session, path, NULL);
 		folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, NULL);
 		if (testid == 0) {
 			g_object_unref (folder);
@@ -47,13 +47,13 @@ worker(gpointer d)
 }
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	gint i, j;
 	GThread *threads[MAX_THREADS];
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -86,12 +86,12 @@ main(gint argc, gchar **argv)
 					g_thread_join (threads[i]);
 			}
 
-			test_free(path);
+			test_free (path);
 
-			camel_test_pull();
+			camel_test_pull ();
 		}
 
-		camel_test_end();
+		camel_test_end ();
 	}
 
 	g_object_unref (session);
diff --git a/camel/tests/folder/test11.c b/camel/tests/folder/test11.c
index d8191a8..f4efaec 100644
--- a/camel/tests/folder/test11.c
+++ b/camel/tests/folder/test11.c
@@ -41,67 +41,67 @@ static CamelFolderInfo fi_list_3[] = {
 };
 
 static gint
-cmp_fi(gconstpointer a, gconstpointer b)
+cmp_fi (gconstpointer a, gconstpointer b)
 {
 	const CamelFolderInfo *fa = ((const CamelFolderInfo **)a)[0];
 	const CamelFolderInfo *fb = ((const CamelFolderInfo **)b)[0];
 
-	return strcmp(fa->full_name, fb->full_name);
+	return strcmp (fa->full_name, fb->full_name);
 }
 
 static void
-add_fi(GPtrArray *folders, CamelFolderInfo *fi)
+add_fi (GPtrArray *folders, CamelFolderInfo *fi)
 {
 	while (fi) {
-		g_ptr_array_add(folders, fi);
+		g_ptr_array_add (folders, fi);
 		if (fi->child)
-			add_fi(folders, fi->child);
+			add_fi (folders, fi->child);
 		fi = fi->next;
 	}
 }
 
 static void
-check_fi(CamelFolderInfo *fi, CamelFolderInfo *list, gint len)
+check_fi (CamelFolderInfo *fi, CamelFolderInfo *list, gint len)
 {
-	GPtrArray *folders = g_ptr_array_new();
+	GPtrArray *folders = g_ptr_array_new ();
 	gint i;
 
-	add_fi(folders, fi);
+	add_fi (folders, fi);
 	check_msg(folders->len == len, "unexpected number of folders returned from folderinfo");
-	qsort(folders->pdata, folders->len, sizeof(folders->pdata[0]), cmp_fi);
+	qsort (folders->pdata, folders->len, sizeof (folders->pdata[0]), cmp_fi);
 	for (i=0;i<len;i++) {
 		CamelFolderInfo *f = folders->pdata[i];
 
 		camel_test_push("checking folder '%s'", list[i].uri);
 
 		check_msg(!strcmp(f->uri, list[i].uri), "got '%s' expecting '%s'", f->uri, list[i].uri);
-		check(!strcmp(f->full_name, list[i].full_name));
+		check (!strcmp (f->full_name, list[i].full_name));
 
 		/* this might be translated, but we can't know */
 		camel_test_nonfatal("Inbox not english");
-		check(!strcmp(f->name, list[i].name));
-		camel_test_fatal();
+		check (!strcmp (f->name, list[i].name));
+		camel_test_fatal ();
 
 		camel_test_nonfatal("Flags mismatch");
-		check(f->flags == list[i].flags);
-		camel_test_fatal();
+		check (f->flags == list[i].flags);
+		camel_test_fatal ();
 
-		camel_test_pull();
+		camel_test_pull ();
 	}
 
-	g_ptr_array_free(folders, TRUE);
+	g_ptr_array_free (folders, TRUE);
 }
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	CamelFolder *f1, *f2;
 	CamelStore *store;
 	CamelFolderInfo *fi;
 	GError *error = NULL;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -118,10 +118,10 @@ main(gint argc, gchar **argv)
 	f2 = camel_store_get_folder(store, "./testbox", CAMEL_STORE_FOLDER_CREATE, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(f1 == f2);
-	check_unref(f2, 2);
-	check_unref(f1, 1);
-	camel_test_pull();
+	check (f1 == f2);
+	check_unref (f2, 2);
+	check_unref (f1, 1);
+	camel_test_pull ();
 
 	camel_test_push("./ prefix path, one level, no create");
 	f1 = camel_store_get_folder(store, "testbox2", CAMEL_STORE_FOLDER_CREATE, &error);
@@ -130,10 +130,10 @@ main(gint argc, gchar **argv)
 	f2 = camel_store_get_folder(store, "./testbox2", 0, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(f1 == f2);
-	check_unref(f2, 2);
-	check_unref(f1, 1);
-	camel_test_pull();
+	check (f1 == f2);
+	check_unref (f2, 2);
+	check_unref (f1, 1);
+	camel_test_pull ();
 
 	camel_test_push("./ prefix path, two levels");
 	f1 = camel_store_get_folder(store, "testbox/foo", CAMEL_STORE_FOLDER_CREATE, &error);
@@ -142,51 +142,51 @@ main(gint argc, gchar **argv)
 	f2 = camel_store_get_folder(store, "./testbox/foo", CAMEL_STORE_FOLDER_CREATE, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(f1 == f2);
-	check_unref(f2, 2);
-	check_unref(f1, 1);
-	camel_test_pull();
+	check (f1 == f2);
+	check_unref (f2, 2);
+	check_unref (f1, 1);
+	camel_test_pull ();
 
 	camel_test_push("'.' == Inbox");
-	f2 = camel_store_get_inbox(store, &error);
+	f2 = camel_store_get_inbox (store, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
 	f1 = camel_store_get_folder(store, ".", 0, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(f1 == f2);
-	check_unref(f2, 2);
-	check_unref(f1, 1);
-	camel_test_pull();
+	check (f1 == f2);
+	check_unref (f2, 2);
+	check_unref (f1, 1);
+	camel_test_pull ();
 
 	camel_test_push("folder info, recursive");
 	fi = camel_store_get_folder_info(store, "", CAMEL_STORE_FOLDER_INFO_RECURSIVE, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(fi != NULL);
-	check_fi(fi, fi_list_1, G_N_ELEMENTS (fi_list_1));
-	camel_test_pull();
+	check (fi != NULL);
+	check_fi (fi, fi_list_1, G_N_ELEMENTS (fi_list_1));
+	camel_test_pull ();
 
 	camel_test_push("folder info, flat");
 	fi = camel_store_get_folder_info(store, "", 0, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(fi != NULL);
-	check_fi(fi, fi_list_2, G_N_ELEMENTS (fi_list_2));
-	camel_test_pull();
+	check (fi != NULL);
+	check_fi (fi, fi_list_2, G_N_ELEMENTS (fi_list_2));
+	camel_test_pull ();
 
 	camel_test_push("folder info, recursive, non root");
 	fi = camel_store_get_folder_info(store, "testbox", CAMEL_STORE_FOLDER_INFO_RECURSIVE, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	check(fi != NULL);
-	check_fi(fi, fi_list_3, G_N_ELEMENTS (fi_list_3));
-	camel_test_pull();
+	check (fi != NULL);
+	check_fi (fi, fi_list_3, G_N_ELEMENTS (fi_list_3));
+	camel_test_pull ();
 
-	check_unref(store, 1);
-	check_unref(session, 1);
+	check_unref (store, 1);
+	check_unref (session, 1);
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/folder/test2.c b/camel/tests/folder/test2.c
index 2ca8465..3f730c6 100644
--- a/camel/tests/folder/test2.c
+++ b/camel/tests/folder/test2.c
@@ -18,13 +18,13 @@ static const gchar *stores[] = {
 	"maildir:///tmp/camel-test/maildir"
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -42,7 +42,7 @@ gint main(gint argc, gchar **argv)
 	creat("/tmp/camel-test/testbox", 0600);
 	test_folder_message_ops(session, "spool:///tmp/camel-test/testbox", TRUE, "INBOX");
 
-	check_unref(session, 1);
+	check_unref (session, 1);
 
 	return 0;
 }
diff --git a/camel/tests/folder/test3.c b/camel/tests/folder/test3.c
index b6e7819..fc30d17 100644
--- a/camel/tests/folder/test3.c
+++ b/camel/tests/folder/test3.c
@@ -9,32 +9,32 @@
 #include "session.h"
 
 static void
-test_folder_search_sub(CamelFolder *folder, const gchar *expr, gint expected)
+test_folder_search_sub (CamelFolder *folder, const gchar *expr, gint expected)
 {
 	GPtrArray *uids;
 	GHashTable *hash;
 	gint i;
 	GError *error = NULL;
 
-	uids = camel_folder_search_by_expression(folder, expr, &error);
-	check(uids != NULL);
+	uids = camel_folder_search_by_expression (folder, expr, &error);
+	check (uids != NULL);
 	check_msg(uids->len == expected, "search %s expected %d got %d", expr, expected, uids->len);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
 
 	/* check the uid's are actually unique, too */
-	hash = g_hash_table_new(g_str_hash, g_str_equal);
+	hash = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i=0;i<uids->len;i++) {
-		check(g_hash_table_lookup(hash, uids->pdata[i]) == NULL);
-		g_hash_table_insert(hash, uids->pdata[i], uids->pdata[i]);
+		check (g_hash_table_lookup (hash, uids->pdata[i]) == NULL);
+		g_hash_table_insert (hash, uids->pdata[i], uids->pdata[i]);
 	}
-	g_hash_table_destroy(hash);
+	g_hash_table_destroy (hash);
 
-	camel_folder_search_free(folder, uids);
+	camel_folder_search_free (folder, uids);
 }
 
 static void
-test_folder_search(CamelFolder *folder, const gchar *expr, gint expected)
+test_folder_search (CamelFolder *folder, const gchar *expr, gint expected)
 {
 	gchar *matchall;
 
@@ -42,16 +42,16 @@ test_folder_search(CamelFolder *folder, const gchar *expr, gint expected)
 	/* FIXME: ??? */
 	camel_test_nonfatal("most searches require match-all construct");
 	push("Testing search: %s", expr);
-	test_folder_search_sub(folder, expr, expected);
-	pull();
-	camel_test_fatal();
+	test_folder_search_sub (folder, expr, expected);
+	pull ();
+	camel_test_fatal ();
 #endif
 
 	matchall = g_strdup_printf("(match-all %s)", expr);
 	push("Testing search: %s", matchall);
-	test_folder_search_sub(folder, matchall, expected);
-	test_free(matchall);
-	pull();
+	test_folder_search_sub (folder, matchall, expected);
+	test_free (matchall);
+	pull ();
 }
 
 static struct {
@@ -106,11 +106,11 @@ static struct {
 };
 
 static void
-run_search(CamelFolder *folder, gint m)
+run_search (CamelFolder *folder, gint m)
 {
 	gint i, j = 0;
 
-	check(m == 50 || m == 100 || m == 0);
+	check (m == 50 || m == 100 || m == 0);
 
 	/* *shrug* messy, but it'll do */
 	if (m==50)
@@ -121,10 +121,10 @@ run_search(CamelFolder *folder, gint m)
 	push("performing searches, expected %d", m);
 	for (i = 0; i < G_N_ELEMENTS (searches); i++) {
 		push("running search %d: %s", i, searches[i].expr);
-		test_folder_search(folder, searches[i].expr, searches[i].counts[j]);
-		pull();
+		test_folder_search (folder, searches[i].expr, searches[i].counts[j]);
+		pull ();
 	}
-	pull();
+	pull ();
 }
 
 static const gchar *local_drivers[] = { "local" };
@@ -135,7 +135,7 @@ static const gchar *stores[] = {
 	"maildir:///tmp/camel-test/maildir"
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	CamelStore *store;
@@ -146,8 +146,8 @@ gint main(gint argc, gchar **argv)
 	GPtrArray *uids;
 	GError *error = NULL;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -164,15 +164,15 @@ gint main(gint argc, gchar **argv)
 			gchar *what = g_strdup_printf("folder search: %s (%sindexed)", name, indexed?"":"non-");
 			gint flags;
 
-			camel_test_start(what);
-			test_free(what);
+			camel_test_start (what);
+			test_free (what);
 
 			push("getting store");
-			store = camel_session_get_store(session, stores[i], &error);
+			store = camel_session_get_store (session, stores[i], &error);
 			check_msg(error == NULL, "getting store: %s", error->message);
-			check(store != NULL);
+			check (store != NULL);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
 			push("creating %sindexed folder", indexed?"":"non-");
 			if (indexed)
@@ -181,12 +181,12 @@ gint main(gint argc, gchar **argv)
 				flags = CAMEL_STORE_FOLDER_CREATE;
 			folder = camel_store_get_folder(store, "testbox", flags, &error);
 			check_msg(error == NULL, "%s", error->message);
-			check(folder != NULL);
+			check (folder != NULL);
 
 			/* we need an empty folder for this to work */
-			test_folder_counts(folder, 0, 0);
+			test_folder_counts (folder, 0, 0);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
 			/* append a bunch of messages with specific content */
 			push("appending 100 test messages");
@@ -194,32 +194,32 @@ gint main(gint argc, gchar **argv)
 				gchar *content, *subject;
 
 				push("creating test message");
-				msg = test_message_create_simple();
+				msg = test_message_create_simple ();
 				content = g_strdup_printf("data%d content\n", j);
 				test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
-								content, strlen(content));
-				test_free(content);
+								content, strlen (content));
+				test_free (content);
 				subject = g_strdup_printf("Test%d message%d subject", j, 100-j);
-				camel_mime_message_set_subject(msg, subject);
+				camel_mime_message_set_subject (msg, subject);
 
-				camel_mime_message_set_date(msg, j*60*24, 0);
-				pull();
+				camel_mime_message_set_date (msg, j*60*24, 0);
+				pull ();
 
 				push("appending simple message %d", j);
-				camel_folder_append_message(folder, msg, NULL, NULL, &error);
+				camel_folder_append_message (folder, msg, NULL, NULL, &error);
 				check_msg(error == NULL, "%s", error->message);
 				g_clear_error (&error);
-				pull();
+				pull ();
 
-				test_free(subject);
+				test_free (subject);
 
-				check_unref(msg, 1);
+				check_unref (msg, 1);
 			}
-			pull();
+			pull ();
 
 			push("Setting up some flags &c");
-			uids = camel_folder_get_uids(folder);
-			check(uids->len == 100);
+			uids = camel_folder_get_uids (folder);
+			check (uids->len == 100);
 			for (j=0;j<100;j++) {
 				gchar *uid = uids->pdata[j];
 
@@ -232,103 +232,103 @@ gint main(gint argc, gchar **argv)
 				if ((j/7)*7 == j) {
 					gchar *tag = g_strdup_printf("7tag%d", j/7);
 					camel_folder_set_message_user_tag(folder, uid, "every7", tag);
-					test_free(tag);
+					test_free (tag);
 				}
 				if ((j/11)*11 == j) {
 					camel_folder_set_message_user_tag(folder, uid, "every11", "11tag");
 				}
 			}
-			camel_folder_free_uids(folder, uids);
-			pull();
+			camel_folder_free_uids (folder, uids);
+			pull ();
 
 			camel_test_nonfatal("Index not guaranteed to be accurate before sync: should be fixed eventually");
 			push("Search before sync");
-			run_search(folder, 100);
-			pull();
-			camel_test_fatal();
+			run_search (folder, 100);
+			pull ();
+			camel_test_fatal ();
 
 			push("syncing folder, searching");
-			camel_folder_sync(folder, FALSE, NULL);
-			run_search(folder, 100);
-			pull();
+			camel_folder_sync (folder, FALSE, NULL);
+			run_search (folder, 100);
+			pull ();
 
 			push("syncing wiht expunge, search");
-			camel_folder_sync(folder, TRUE, NULL);
-			run_search(folder, 100);
-			pull();
+			camel_folder_sync (folder, TRUE, NULL);
+			run_search (folder, 100);
+			pull ();
 
 			push("deleting every 2nd message");
-			uids = camel_folder_get_uids(folder);
-			check(uids->len == 100);
+			uids = camel_folder_get_uids (folder);
+			check (uids->len == 100);
 			for (j=0;j<uids->len;j+=2) {
-				camel_folder_delete_message(folder, uids->pdata[j]);
+				camel_folder_delete_message (folder, uids->pdata[j]);
 			}
-			camel_folder_free_uids(folder, uids);
-			run_search(folder, 100);
+			camel_folder_free_uids (folder, uids);
+			run_search (folder, 100);
 
 			push("syncing");
-			camel_folder_sync(folder, FALSE, &error);
+			camel_folder_sync (folder, FALSE, &error);
 			check_msg(error == NULL, "%s", error->message);
-			run_search(folder, 100);
+			run_search (folder, 100);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
 			push("expunging");
-			camel_folder_expunge(folder, &error);
+			camel_folder_expunge (folder, &error);
 			check_msg(error == NULL, "%s", error->message);
-			run_search(folder, 50);
+			run_search (folder, 50);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
-			pull();
+			pull ();
 
 			push("closing and re-opening folder");
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 			folder = camel_store_get_folder(store, "testbox", flags&~(CAMEL_STORE_FOLDER_CREATE), &error);
 			check_msg(error == NULL, "%s", error->message);
-			check(folder != NULL);
+			check (folder != NULL);
 			g_clear_error (&error);
 
 			push("deleting remaining messages");
-			uids = camel_folder_get_uids(folder);
-			check(uids->len == 50);
+			uids = camel_folder_get_uids (folder);
+			check (uids->len == 50);
 			for (j=0;j<uids->len;j++) {
-				camel_folder_delete_message(folder, uids->pdata[j]);
+				camel_folder_delete_message (folder, uids->pdata[j]);
 			}
-			camel_folder_free_uids(folder, uids);
-			run_search(folder, 50);
+			camel_folder_free_uids (folder, uids);
+			run_search (folder, 50);
 
 			push("syncing");
-			camel_folder_sync(folder, FALSE, &error);
+			camel_folder_sync (folder, FALSE, &error);
 			check_msg(error == NULL, "%s", error->message);
-			run_search(folder, 50);
+			run_search (folder, 50);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
 			push("expunging");
-			camel_folder_expunge(folder, &error);
+			camel_folder_expunge (folder, &error);
 			check_msg(error == NULL, "%s", error->message);
-			run_search(folder, 0);
+			run_search (folder, 0);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
-			pull();
+			pull ();
 
-			check_unref(folder, 1);
-			pull();
+			check_unref (folder, 1);
+			pull ();
 
 			push("deleting test folder, with no messages in it");
 			camel_store_delete_folder(store, "testbox", &error);
 			check_msg(error == NULL, "%s", error->message);
 			g_clear_error (&error);
-			pull();
+			pull ();
 
-			check_unref(store, 1);
-			camel_test_end();
+			check_unref (store, 1);
+			camel_test_end ();
 		}
 	}
 
-	check_unref(session, 1);
+	check_unref (session, 1);
 
 	return 0;
 }
diff --git a/camel/tests/folder/test4.c b/camel/tests/folder/test4.c
index f975bae..f32c02f 100644
--- a/camel/tests/folder/test4.c
+++ b/camel/tests/folder/test4.c
@@ -11,14 +11,14 @@ static const gchar *remote_providers[] = {
 	"IMAP_TEST_URL",
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 	gchar *path;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, imap_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, imap_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -28,16 +28,16 @@ gint main(gint argc, gchar **argv)
 	/* todo: cross-check everything with folder_info checks as well */
 	/* todo: subscriptions? */
 	for (i = 0; i < G_N_ELEMENTS (remote_providers); i++) {
-		path = getenv(remote_providers[i]);
+		path = getenv (remote_providers[i]);
 
 		if (path == NULL) {
 			printf("Aborted (ignored).\n");
 			printf("Set '%s', to re-run test.\n", remote_providers[i]);
 			/* tells make check to ignore us in the total count */
-			_exit(77);
+			_exit (77);
 		}
 		/*camel_test_nonfatal("The IMAP code is just rooted");*/
-		test_folder_basic(session, path, FALSE, FALSE);
+		test_folder_basic (session, path, FALSE, FALSE);
 		/*camel_test_fatal();*/
 	}
 
diff --git a/camel/tests/folder/test5.c b/camel/tests/folder/test5.c
index 3da2aa7..15dc843 100644
--- a/camel/tests/folder/test5.c
+++ b/camel/tests/folder/test5.c
@@ -11,14 +11,14 @@ static const gchar *remote_providers[] = {
 	"NNTP_TEST_URL",
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 	gchar *path;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, nntp_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, nntp_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -28,17 +28,17 @@ gint main(gint argc, gchar **argv)
 	/* todo: cross-check everything with folder_info checks as well */
 	/* todo: subscriptions? */
 	for (i = 0; i < G_N_ELEMENTS (remote_providers); i++) {
-		path = getenv(remote_providers[i]);
+		path = getenv (remote_providers[i]);
 
 		if (path == NULL) {
 			printf("Aborted (ignored).\n");
 			printf("Set '%s', to re-run test.\n", remote_providers[i]);
 			/* tells make check to ignore us in the total count */
-			_exit(77);
+			_exit (77);
 		}
 		camel_test_nonfatal("Not sure how many tests apply to NNTP");
-		test_folder_basic(session, path, FALSE, FALSE);
-		camel_test_fatal();
+		test_folder_basic (session, path, FALSE, FALSE);
+		camel_test_fatal ();
 	}
 
 	g_object_unref (session);
diff --git a/camel/tests/folder/test6.c b/camel/tests/folder/test6.c
index 5e8f42c..6f87ab7 100644
--- a/camel/tests/folder/test6.c
+++ b/camel/tests/folder/test6.c
@@ -10,14 +10,14 @@ static const gchar *remote_providers[] = {
 	"IMAP_TEST_URL",
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 	gchar *path;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, imap_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, imap_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -25,13 +25,13 @@ gint main(gint argc, gchar **argv)
 	session = camel_test_session_new ("/tmp/camel-test");
 
 	for (i = 0; i < G_N_ELEMENTS (remote_providers); i++) {
-		path = getenv(remote_providers[i]);
+		path = getenv (remote_providers[i]);
 
 		if (path == NULL) {
 			printf("Aborted (ignored).\n");
 			printf("Set '%s', to re-run test.\n", remote_providers[i]);
 			/* tells make check to ignore us in the total count */
-			_exit(77);
+			_exit (77);
 		}
 		/*camel_test_nonfatal("The IMAP code is just rooted");*/
 		test_folder_message_ops(session, path, FALSE, "testbox");
@@ -39,7 +39,7 @@ gint main(gint argc, gchar **argv)
 		/*camel_test_fatal();*/
 	}
 
-	check_unref(session, 1);
+	check_unref (session, 1);
 
 	return 0;
 }
diff --git a/camel/tests/folder/test7.c b/camel/tests/folder/test7.c
index d1180e6..0087ab6 100644
--- a/camel/tests/folder/test7.c
+++ b/camel/tests/folder/test7.c
@@ -11,14 +11,14 @@ static const gchar *remote_providers[] = {
 	"NNTP_TEST_URL",
 };
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i;
 	gchar *path;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, nntp_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, nntp_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -26,20 +26,20 @@ gint main(gint argc, gchar **argv)
 	session = camel_test_session_new ("/tmp/camel-test");
 
 	for (i = 0; i < G_N_ELEMENTS (remote_providers); i++) {
-		path = getenv(remote_providers[i]);
+		path = getenv (remote_providers[i]);
 
 		if (path == NULL) {
 			printf("Aborted (ignored).\n");
 			printf("Set '%s', to re-run test.\n", remote_providers[i]);
 			/* tells make check to ignore us in the total count */
-			_exit(77);
+			_exit (77);
 		}
 		camel_test_nonfatal("Dont know how many tests apply to NNTP");
 		test_folder_message_ops(session, path, FALSE, "testbox");
-		camel_test_fatal();
+		camel_test_fatal ();
 	}
 
-	check_unref(session, 1);
+	check_unref (session, 1);
 
 	return 0;
 }
diff --git a/camel/tests/folder/test8.c b/camel/tests/folder/test8.c
index 99e734a..82c59c7 100644
--- a/camel/tests/folder/test8.c
+++ b/camel/tests/folder/test8.c
@@ -22,7 +22,7 @@ static const gchar *local_providers[] = {
 };
 
 static void
-test_add_message(CamelFolder *folder, gint j)
+test_add_message (CamelFolder *folder, gint j)
 {
 	CamelMimeMessage *msg;
 	gchar *content;
@@ -30,22 +30,22 @@ test_add_message(CamelFolder *folder, gint j)
 	GError *error = NULL;
 
 	push("creating message %d\n", j);
-	msg = test_message_create_simple();
+	msg = test_message_create_simple ();
 	content = g_strdup_printf("Test message %08x contents\n\n", j);
 	test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
-							content, strlen(content));
-	test_free(content);
+							content, strlen (content));
+	test_free (content);
 	subject = g_strdup_printf("Test message %08x subject", j);
-	camel_mime_message_set_subject(msg, subject);
-	pull();
+	camel_mime_message_set_subject (msg, subject);
+	pull ();
 
 	push("appending simple message %d", j);
-	camel_folder_append_message(folder, msg, NULL, NULL, &error);
+	camel_folder_append_message (folder, msg, NULL, NULL, &error);
 	check_msg(error == NULL, "%s", error->message);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
-	check_unref(msg, 1);
+	check_unref (msg, 1);
 }
 
 struct _threadinfo {
@@ -54,7 +54,7 @@ struct _threadinfo {
 };
 
 static gpointer
-worker(gpointer d)
+worker (gpointer d)
 {
 	struct _threadinfo *info = d;
 	gint i, j, id = info->id;
@@ -67,57 +67,57 @@ worker(gpointer d)
 	/* and flat out */
 	for (i=0;i<MAX_MESSAGES;i++) {
 		d(printf ("Thread %p message %i\n", g_thread_self (), i));
-		test_add_message(info->folder, id+i);
+		test_add_message (info->folder, id+i);
 
 		sub = g_strdup_printf("(match-all (header-contains \"subject\" \"message %08x subject\"))", id+i);
 
 		push("searching for message %d\n\tusing: %s", id+i, sub);
-		res = camel_folder_search_by_expression(info->folder, sub, &error);
+		res = camel_folder_search_by_expression (info->folder, sub, &error);
 		check_msg(error == NULL, "%s", error->message);
 		check_msg(res->len == 1, "res->len = %d", res->len);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("getting message '%s'", res->pdata[0]);
-		msg = camel_folder_get_message(info->folder, (gchar *)res->pdata[0], &error);
+		msg = camel_folder_get_message (info->folder, (gchar *)res->pdata[0], &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		content = g_strdup_printf("Test message %08x contents\n\n", id+i);
 		push("comparing content '%s': '%s'", res->pdata[0], content);
-		test_message_compare_content(camel_medium_get_content((CamelMedium *)msg), content, strlen(content));
-		test_free(content);
-		pull();
+		test_message_compare_content (camel_medium_get_content ((CamelMedium *)msg), content, strlen (content));
+		test_free (content);
+		pull ();
 
 		push("deleting message, cleanup");
-		j=(100.0*rand()/(RAND_MAX+1.0));
+		j=(100.0*rand ()/(RAND_MAX+1.0));
 		if (j<=70) {
-			camel_folder_delete_message(info->folder, res->pdata[0]);
+			camel_folder_delete_message (info->folder, res->pdata[0]);
 		}
 
-		camel_folder_search_free(info->folder, res);
+		camel_folder_search_free (info->folder, res);
 		res = NULL;
-		test_free(sub);
+		test_free (sub);
 
-		check_unref(msg, 1);
-		pull();
+		check_unref (msg, 1);
+		pull ();
 
 		/* about 1-in 100 calls will expunge */
-		j=(200.0*rand()/(RAND_MAX+1.0));
+		j=(200.0*rand ()/(RAND_MAX+1.0));
 		if (j<=2) {
 			d(printf("Forcing an expuge\n"));
 			push("expunging folder");
-			camel_folder_expunge(info->folder, &error);
+			camel_folder_expunge (info->folder, &error);
 			check_msg(error == NULL, "%s", error->message);
-			pull();
+			pull ();
 		}
 	}
 
 	return info;
 }
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	gint i, j, index;
@@ -129,8 +129,8 @@ gint main(gint argc, gchar **argv)
 	GPtrArray *uids;
 	GError *error = NULL;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -140,15 +140,15 @@ gint main(gint argc, gchar **argv)
 	for (j = 0; j < G_N_ELEMENTS (local_providers); j++) {
 		for (index=0;index<2;index++) {
 			path = g_strdup_printf("method %s %s", local_providers[j], index?"indexed":"nonindexed");
-			camel_test_start(path);
-			test_free(path);
+			camel_test_start (path);
+			test_free (path);
 
 			push("trying %s index %d", local_providers[j], index);
 			path = g_strdup_printf("%s:///tmp/camel-test/%s", local_providers[j], local_providers[j]);
-			store = camel_session_get_store(session, path, &error);
+			store = camel_session_get_store (session, path, &error);
 			check_msg(error == NULL, "%s", error->message);
 			g_clear_error (&error);
-			test_free(path);
+			test_free (path);
 
 			if (index == 0)
 				folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, &error);
@@ -161,7 +161,7 @@ gint main(gint argc, gchar **argv)
 			for (i = 0; i < MAX_THREADS; i++) {
 				GError *error = NULL;
 
-				info = g_malloc(sizeof(*info));
+				info = g_malloc (sizeof (*info));
 				info->id = i*MAX_MESSAGES;
 				info->folder = folder;
 
@@ -178,29 +178,29 @@ gint main(gint argc, gchar **argv)
 					g_free (info);
 				}
 			}
-			pull();
+			pull ();
 
 			push("deleting remaining messages");
-			uids = camel_folder_get_uids(folder);
+			uids = camel_folder_get_uids (folder);
 			for (i=0;i<uids->len;i++) {
-				camel_folder_delete_message(folder, uids->pdata[i]);
+				camel_folder_delete_message (folder, uids->pdata[i]);
 			}
-			camel_folder_free_uids(folder, uids);
+			camel_folder_free_uids (folder, uids);
 
-			camel_folder_expunge(folder, &error);
+			camel_folder_expunge (folder, &error);
 			check_msg(error == NULL, "%s", error->message);
 
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 
 			camel_store_delete_folder(store, "testbox", &error);
 			check_msg(error == NULL, "%s", error->message);
 			g_clear_error (&error);
 
-			check_unref(store, 1);
+			check_unref (store, 1);
 
-			pull();
+			pull ();
 
-			camel_test_end();
+			camel_test_end ();
 		}
 	}
 
diff --git a/camel/tests/folder/test9.c b/camel/tests/folder/test9.c
index 1d1ac59..dd7f275 100644
--- a/camel/tests/folder/test9.c
+++ b/camel/tests/folder/test9.c
@@ -74,13 +74,13 @@ get_folder (CamelFilterDriver *d,
 	gint i;
 
 	for (i = 0; i < G_N_ELEMENTS (mailboxes); i++)
-		if (!strcmp(mailboxes[i].name, uri)) {
+		if (!strcmp (mailboxes[i].name, uri)) {
 			return g_object_ref (mailboxes[i].folder);
 		}
 	return NULL;
 }
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelSession *session;
 	CamelStore *store;
@@ -91,8 +91,8 @@ gint main(gint argc, gchar **argv)
 	CamelFilterDriver *driver;
 	GError *error = NULL;
 
-	camel_test_init(argc, argv);
-	camel_test_provider_init(1, local_drivers);
+	camel_test_init (argc, argv);
+	camel_test_provider_init (1, local_drivers);
 
 	/* clear out any camel-test data */
 	system("/bin/rm -rf /tmp/camel-test");
@@ -107,23 +107,23 @@ gint main(gint argc, gchar **argv)
 	push("getting store");
 	store = camel_session_get_store(session, "mbox:///tmp/camel-test/mbox", &error);
 	check_msg(error == NULL, "getting store: %s", error->message);
-	check(store != NULL);
+	check (store != NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	push("Creating output folders");
 	for (i = 0; i < G_N_ELEMENTS (mailboxes); i++) {
 		push("creating %s", mailboxes[i].name);
-		mailboxes[i].folder = folder = camel_store_get_folder(store, mailboxes[i].name, CAMEL_STORE_FOLDER_CREATE, &error);
+		mailboxes[i].folder = folder = camel_store_get_folder (store, mailboxes[i].name, CAMEL_STORE_FOLDER_CREATE, &error);
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 
 		/* we need an empty folder for this to work */
-		test_folder_counts(folder, 0, 0);
+		test_folder_counts (folder, 0, 0);
 		g_clear_error (&error);
-		pull();
+		pull ();
 	}
-	pull();
+	pull ();
 
 	/* append a bunch of messages with specific content */
 	push("creating 100 test message mbox");
@@ -132,91 +132,91 @@ gint main(gint argc, gchar **argv)
 		gchar *content, *subject;
 
 		push("creating test message");
-		msg = test_message_create_simple();
+		msg = test_message_create_simple ();
 		content = g_strdup_printf("data%d content\n", j);
 		test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
-						content, strlen(content));
-		test_free(content);
+						content, strlen (content));
+		test_free (content);
 		subject = g_strdup_printf("Test%d message%d subject", j, 100-j);
-		camel_mime_message_set_subject(msg, subject);
+		camel_mime_message_set_subject (msg, subject);
 
-		camel_mime_message_set_date(msg, j*60*24, 0);
-		pull();
+		camel_mime_message_set_date (msg, j*60*24, 0);
+		pull ();
 
 		camel_stream_printf(mbox, "From \n");
-		check(camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, mbox, NULL) != -1);
+		check (camel_data_wrapper_write_to_stream ((CamelDataWrapper *)msg, mbox, NULL) != -1);
 #if 0
 		push("appending simple message %d", j);
-		camel_folder_append_message(folder, msg, NULL, ex);
+		camel_folder_append_message (folder, msg, NULL, ex);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		pull();
+		pull ();
 #endif
-		test_free(subject);
+		test_free (subject);
 
-		check_unref(msg, 1);
+		check_unref (msg, 1);
 	}
-	check(camel_stream_close(mbox, NULL) != -1);
-	check_unref(mbox, 1);
-	pull();
+	check (camel_stream_close (mbox, NULL) != -1);
+	check_unref (mbox, 1);
+	pull ();
 
 	push("Building filters");
-	driver = camel_filter_driver_new(session);
-	camel_filter_driver_set_folder_func(driver, get_folder, NULL);
+	driver = camel_filter_driver_new (session);
+	camel_filter_driver_set_folder_func (driver, get_folder, NULL);
 	for (i = 0; i < G_N_ELEMENTS (rules); i++) {
-		camel_filter_driver_add_rule(driver, rules[i].name, rules[i].match, rules[i].action);
+		camel_filter_driver_add_rule (driver, rules[i].name, rules[i].match, rules[i].action);
 	}
-	pull();
+	pull ();
 
 	push("Executing filters");
-	camel_filter_driver_set_default_folder(driver, mailboxes[0].folder);
+	camel_filter_driver_set_default_folder (driver, mailboxes[0].folder);
 	camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", NULL, &error);
 	check_msg(error == NULL, "%s", error->message);
 
 	/* now need to check the folder counts/etc */
 
-	check_unref(driver, 1);
+	check_unref (driver, 1);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	/* this tests that invalid rules are caught */
 	push("Testing broken match rules");
 	for (i = 0; i < G_N_ELEMENTS (brokens); i++) {
 		push("rule %s", brokens[i].match);
-		driver = camel_filter_driver_new(session);
-		camel_filter_driver_set_folder_func(driver, get_folder, NULL);
-		camel_filter_driver_add_rule(driver, brokens[i].name, brokens[i].match, brokens[i].action);
+		driver = camel_filter_driver_new (session);
+		camel_filter_driver_set_folder_func (driver, get_folder, NULL);
+		camel_filter_driver_add_rule (driver, brokens[i].name, brokens[i].match, brokens[i].action);
 		camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", NULL, &error);
-		check(error != NULL);
-		check_unref(driver, 1);
+		check (error != NULL);
+		check_unref (driver, 1);
 		g_clear_error (&error);
-		pull();
+		pull ();
 	}
-	pull();
+	pull ();
 
 	push("Testing broken action rules");
 	for (i = 0; i < G_N_ELEMENTS (brokena); i++) {
 		push("rule %s", brokena[i].action);
-		driver = camel_filter_driver_new(session);
-		camel_filter_driver_set_folder_func(driver, get_folder, NULL);
-		camel_filter_driver_add_rule(driver, brokena[i].name, brokena[i].match, brokena[i].action);
+		driver = camel_filter_driver_new (session);
+		camel_filter_driver_set_folder_func (driver, get_folder, NULL);
+		camel_filter_driver_add_rule (driver, brokena[i].name, brokena[i].match, brokena[i].action);
 		camel_filter_driver_filter_mbox(driver, "/tmp/camel-test/inbox", NULL, &error);
-		check(error != NULL);
-		check_unref(driver, 1);
+		check (error != NULL);
+		check_unref (driver, 1);
 		g_clear_error (&error);
-		pull();
+		pull ();
 	}
-	pull();
+	pull ();
 
 	for (i = 0; i < G_N_ELEMENTS (mailboxes); i++) {
-		check_unref(mailboxes[i].folder, 1);
+		check_unref (mailboxes[i].folder, 1);
 	}
 
-	check_unref(store, 1);
+	check_unref (store, 1);
 
-	check_unref(session, 1);
+	check_unref (session, 1);
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/lib/address-data.h b/camel/tests/lib/address-data.h
index d212fcc..e9e3309 100644
--- a/camel/tests/lib/address-data.h
+++ b/camel/tests/lib/address-data.h
@@ -7,7 +7,7 @@ static struct _a {
 	gint count;
 	gchar *addr;
 	gchar *utf8;		/* the utf8 in this table was generated by camel itself.  As a result i'm making the assumption it
-				   was right when it was created.  It also depends on the format of ::format(),. which is likely to
+				   was right when it was created.  It also depends on the format of ::format (),. which is likely to
 				   change, to handle other bugs !*/
 } test_address[] = {
 	{ 1, "\"=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=\" <david iiia csic es>", "David Gutiérrez Magallanes <david iiia csic es>" },
diff --git a/camel/tests/lib/addresses.c b/camel/tests/lib/addresses.c
index 6c2594b..3dfcf81 100644
--- a/camel/tests/lib/addresses.c
+++ b/camel/tests/lib/addresses.c
@@ -6,49 +6,49 @@
 #include "camel-test.h"
 
 void
-test_address_compare(CamelInternetAddress *addr, CamelInternetAddress *addr2)
+test_address_compare (CamelInternetAddress *addr, CamelInternetAddress *addr2)
 {
 	const gchar *r1, *r2, *a1, *a2;
 	gchar *e1, *e2, *f1, *f2;
 	gint j;
 
-	check(camel_address_length(CAMEL_ADDRESS(addr)) == camel_address_length(CAMEL_ADDRESS(addr2)));
-	for (j=0;j<camel_address_length(CAMEL_ADDRESS(addr));j++) {
+	check (camel_address_length (CAMEL_ADDRESS (addr)) == camel_address_length (CAMEL_ADDRESS (addr2)));
+	for (j=0;j<camel_address_length (CAMEL_ADDRESS (addr));j++) {
 
-		check(camel_internet_address_get(addr, j, &r1, &a1) == TRUE);
-		check(camel_internet_address_get(addr2, j, &r2, &a2) == TRUE);
+		check (camel_internet_address_get (addr, j, &r1, &a1) == TRUE);
+		check (camel_internet_address_get (addr2, j, &r2, &a2) == TRUE);
 
-		check(string_equal(r1, r2));
-		check(strcmp(a1, a2) == 0);
+		check (string_equal (r1, r2));
+		check (strcmp (a1, a2) == 0);
 	}
-	check(camel_internet_address_get(addr, j, &r1, &a1) == FALSE);
-	check(camel_internet_address_get(addr2, j, &r2, &a2) == FALSE);
+	check (camel_internet_address_get (addr, j, &r1, &a1) == FALSE);
+	check (camel_internet_address_get (addr2, j, &r2, &a2) == FALSE);
 
-	e1 = camel_address_encode(CAMEL_ADDRESS(addr));
-	e2 = camel_address_encode(CAMEL_ADDRESS(addr2));
+	e1 = camel_address_encode (CAMEL_ADDRESS (addr));
+	e2 = camel_address_encode (CAMEL_ADDRESS (addr2));
 
-	if (camel_address_length(CAMEL_ADDRESS(addr)) == 0)
-		check(e1 == NULL && e2 == NULL);
+	if (camel_address_length (CAMEL_ADDRESS (addr)) == 0)
+		check (e1 == NULL && e2 == NULL);
 	else
-		check(e1 != NULL && e2 != NULL);
+		check (e1 != NULL && e2 != NULL);
 
 	if (e1 != NULL) {
 		check_msg(string_equal(e1, e2), "e1 = '%s' e2 = '%s'", e1, e2);
-		test_free(e1);
-		test_free(e2);
+		test_free (e1);
+		test_free (e2);
 	}
 
-	f1 = camel_address_format(CAMEL_ADDRESS(addr));
-	f2 = camel_address_format(CAMEL_ADDRESS(addr2));
+	f1 = camel_address_format (CAMEL_ADDRESS (addr));
+	f2 = camel_address_format (CAMEL_ADDRESS (addr2));
 
-	if (camel_address_length(CAMEL_ADDRESS(addr)) == 0)
-		check(f1 == NULL && f2 == NULL);
+	if (camel_address_length (CAMEL_ADDRESS (addr)) == 0)
+		check (f1 == NULL && f2 == NULL);
 	else
-		check(f1 != NULL && f2 != NULL);
+		check (f1 != NULL && f2 != NULL);
 
 	if (f1 != NULL) {
 		check_msg(string_equal(f1, f2), "f1 = '%s' f2 = '%s'", f1, f2);
-		test_free(f1);
-		test_free(f2);
+		test_free (f1);
+		test_free (f2);
 	}
 }
diff --git a/camel/tests/lib/addresses.h b/camel/tests/lib/addresses.h
index 4bb11e9..901273a 100644
--- a/camel/tests/lib/addresses.h
+++ b/camel/tests/lib/addresses.h
@@ -1,4 +1,4 @@
 #include <camel/camel.h>
 
 /* addresses.c */
-void test_address_compare(CamelInternetAddress *addr, CamelInternetAddress *addr2);
+void test_address_compare (CamelInternetAddress *addr, CamelInternetAddress *addr2);
diff --git a/camel/tests/lib/camel-test-provider.c b/camel/tests/lib/camel-test-provider.c
index 9a15fef..db3621f 100644
--- a/camel/tests/lib/camel-test-provider.c
+++ b/camel/tests/lib/camel-test-provider.c
@@ -11,9 +11,9 @@ camel_test_provider_init (gint argc, const gchar **argv)
 	for (i=0;i<argc;i++) {
 		name = g_strdup_printf("libcamel%s."G_MODULE_SUFFIX, argv[i]);
 		path = g_build_filename(CAMEL_BUILD_DIR, "providers", argv[i], ".libs", name, NULL);
-		g_free(name);
-		camel_provider_load(path, &error);
+		g_free (name);
+		camel_provider_load (path, &error);
 		check_msg(error == NULL, "Cannot load provider for '%s', test aborted", argv[i]);
-		g_free(path);
+		g_free (path);
 	}
 }
diff --git a/camel/tests/lib/camel-test-provider.h b/camel/tests/lib/camel-test-provider.h
index 3c90ce2..3ba257a 100644
--- a/camel/tests/lib/camel-test-provider.h
+++ b/camel/tests/lib/camel-test-provider.h
@@ -4,6 +4,6 @@
 
 #include <glib.h>
 
-void camel_test_provider_init(gint argc, const gchar **argv);
+void camel_test_provider_init (gint argc, const gchar **argv);
 
 #endif
diff --git a/camel/tests/lib/camel-test.c b/camel/tests/lib/camel-test.c
index f09fb85..3b90f3a 100644
--- a/camel/tests/lib/camel-test.c
+++ b/camel/tests/lib/camel-test.c
@@ -55,42 +55,42 @@ dump_action (GThread *thread, struct _state *s, gpointer d)
 	printf("\tTest: %s\n", s->test);
 }
 
-static void die(gint sig)
+static void die (gint sig)
 {
 	static gint indie = 0;
 
 	if (!indie) {
 		indie = 1;
 		printf("\n\nReceived fatal signal %d\n", sig);
-		g_hash_table_foreach(info_table, (GHFunc)dump_action, 0);
+		g_hash_table_foreach (info_table, (GHFunc)dump_action, 0);
 
 		if (camel_test_verbose > 2) {
 			printf("Attach debugger to pid %d to debug\n", getpid());
-			sleep(1000);
+			sleep (1000);
 		}
 	}
 
-	_exit(1);
+	_exit (1);
 }
 
 static struct _state *
-current_state(void)
+current_state (void)
 {
 	struct _state *info;
 
 	if (info_table == NULL)
-		info_table = g_hash_table_new(0, 0);
+		info_table = g_hash_table_new (0, 0);
 
-	info = g_hash_table_lookup(info_table, CAMEL_TEST_ID);
+	info = g_hash_table_lookup (info_table, CAMEL_TEST_ID);
 	if (info == NULL) {
-		info = g_malloc0(sizeof(*info));
-		g_hash_table_insert(info_table, CAMEL_TEST_ID, info);
+		info = g_malloc0 (sizeof (*info));
+		g_hash_table_insert (info_table, CAMEL_TEST_ID, info);
 	}
 	return info;
 }
 
 void
-camel_test_init(gint argc, gchar **argv)
+camel_test_init (gint argc, gchar **argv)
 {
 	struct stat st;
 	gchar *path;
@@ -114,10 +114,10 @@ camel_test_init(gint argc, gchar **argv)
 	camel_init (path, FALSE);
 	g_free (path);
 
-	info_table = g_hash_table_new(0, 0);
+	info_table = g_hash_table_new (0, 0);
 
-	signal(SIGSEGV, die);
-	signal(SIGABRT, die);
+	signal (SIGSEGV, die);
+	signal (SIGABRT, die);
 
 	/* default, just say what, how well we did, unless fail, then abort */
 	camel_test_verbose = 1;
@@ -126,7 +126,7 @@ camel_test_init(gint argc, gchar **argv)
 		if (argv[i][0] == '-') {
 			switch (argv[i][1]) {
 			case 'v':
-				camel_test_verbose = strlen(argv[i]);
+				camel_test_verbose = strlen (argv[i]);
 				break;
 			case 'q':
 				camel_test_verbose = 0;
@@ -136,30 +136,30 @@ camel_test_init(gint argc, gchar **argv)
 	}
 }
 
-void camel_test_start(const gchar *what)
+void camel_test_start (const gchar *what)
 {
 	struct _state *s;
 
 	CAMEL_TEST_LOCK;
 
-	s = current_state();
+	s = current_state ();
 
 	if (!setup)
-		camel_test_init(0, 0);
+		camel_test_init (0, 0);
 
 	ok = 1;
 
-	s->test = g_strdup(what);
+	s->test = g_strdup (what);
 
 	if (camel_test_verbose > 0) {
 		printf("Test: %s ... ", what);
-		fflush(stdout);
+		fflush (stdout);
 	}
 
 	CAMEL_TEST_UNLOCK;
 }
 
-void camel_test_push(const gchar *what, ...)
+void camel_test_push (const gchar *what, ...)
 {
 	struct _stack *node;
 	va_list ap;
@@ -168,16 +168,16 @@ void camel_test_push(const gchar *what, ...)
 
 	CAMEL_TEST_LOCK;
 
-	s = current_state();
+	s = current_state ();
 
-	va_start(ap, what);
-	text = g_strdup_vprintf(what, ap);
-	va_end(ap);
+	va_start (ap, what);
+	text = g_strdup_vprintf (what, ap);
+	va_end (ap);
 
 	if (camel_test_verbose > 3)
 		printf("Start step: %s\n", text);
 
-	node = g_malloc(sizeof(*node));
+	node = g_malloc (sizeof (*node));
 	node->what = text;
 	node->next = s->state;
 	node->fatal = 1;
@@ -186,16 +186,16 @@ void camel_test_push(const gchar *what, ...)
 	CAMEL_TEST_UNLOCK;
 }
 
-void camel_test_pull(void)
+void camel_test_pull (void)
 {
 	struct _stack *node;
 	struct _state *s;
 
 	CAMEL_TEST_LOCK;
 
-	s = current_state();
+	s = current_state ();
 
-	g_assert(s->state);
+	g_assert (s->state);
 
 	if (camel_test_verbose > 3)
 		printf("Finish step: %s\n", s->state->what);
@@ -204,66 +204,66 @@ void camel_test_pull(void)
 	s->state = node->next;
 	if (!node->fatal)
 		s->nonfatal--;
-	g_free(node->what);
-	g_free(node);
+	g_free (node->what);
+	g_free (node);
 
 	CAMEL_TEST_UNLOCK;
 }
 
 /* where to set breakpoints */
-void camel_test_break(void);
+void camel_test_break (void);
 
-void camel_test_break(void)
+void camel_test_break (void)
 {
 }
 
-void camel_test_fail(const gchar *why, ...)
+void camel_test_fail (const gchar *why, ...)
 {
 	va_list ap;
 
-	va_start(ap, why);
-	camel_test_failv(why, ap);
-	va_end(ap);
+	va_start (ap, why);
+	camel_test_failv (why, ap);
+	va_end (ap);
 }
 
-void camel_test_failv(const gchar *why, va_list ap)
+void camel_test_failv (const gchar *why, va_list ap)
 {
 	gchar *text;
 	struct _state *s;
 
 	CAMEL_TEST_LOCK;
 
-	s = current_state();
+	s = current_state ();
 
-	text = g_strdup_vprintf(why, ap);
+	text = g_strdup_vprintf (why, ap);
 
 	if ((s->nonfatal == 0 && camel_test_verbose > 0)
 	    || (s->nonfatal && camel_test_verbose > 1)) {
 		printf("Failed.\n%s\n", text);
-		camel_test_break();
+		camel_test_break ();
 	}
 
-	g_free(text);
+	g_free (text);
 
 	if ((s->nonfatal == 0 && camel_test_verbose > 0)
 	    || (s->nonfatal && camel_test_verbose > 2)) {
-		g_hash_table_foreach(info_table, (GHFunc)dump_action, 0);
+		g_hash_table_foreach (info_table, (GHFunc)dump_action, 0);
 	}
 
 	if (s->nonfatal == 0) {
-		exit(1);
+		exit (1);
 	} else {
 		ok=0;
 		if (camel_test_verbose > 1) {
 			printf("Known problem (ignored):\n");
-			dump_action(CAMEL_TEST_ID, s, 0);
+			dump_action (CAMEL_TEST_ID, s, 0);
 		}
 	}
 
 	CAMEL_TEST_UNLOCK;
 }
 
-void camel_test_nonfatal(const gchar *what, ...)
+void camel_test_nonfatal (const gchar *what, ...)
 {
 	struct _stack *node;
 	va_list ap;
@@ -272,16 +272,16 @@ void camel_test_nonfatal(const gchar *what, ...)
 
 	CAMEL_TEST_LOCK;
 
-	s = current_state();
+	s = current_state ();
 
-	va_start(ap, what);
-	text = g_strdup_vprintf(what, ap);
-	va_end(ap);
+	va_start (ap, what);
+	text = g_strdup_vprintf (what, ap);
+	va_end (ap);
 
 	if (camel_test_verbose > 3)
 		printf("Start nonfatal: %s\n", text);
 
-	node = g_malloc(sizeof(*node));
+	node = g_malloc (sizeof (*node));
 	node->what = text;
 	node->next = s->state;
 	node->fatal = 0;
@@ -291,12 +291,12 @@ void camel_test_nonfatal(const gchar *what, ...)
 	CAMEL_TEST_UNLOCK;
 }
 
-void camel_test_fatal(void)
+void camel_test_fatal (void)
 {
-	camel_test_pull();
+	camel_test_pull ();
 }
 
-void camel_test_end(void)
+void camel_test_end (void)
 {
 	if (camel_test_verbose > 0) {
 		if (ok)
@@ -305,11 +305,11 @@ void camel_test_end(void)
 			printf("Partial success\n");
 	}
 
-	fflush(stdout);
+	fflush (stdout);
 }
 
 /* compare strings, ignore whitespace though */
-gint string_equal(const gchar *a, const gchar *b)
+gint string_equal (const gchar *a, const gchar *b)
 {
 	const gchar *ap, *bp;
 
@@ -332,7 +332,7 @@ gint string_equal(const gchar *a, const gchar *b)
 
 		if (ap - a != bp - a
 		    && ap - 1 > 0
-		    && memcmp(a, b, ap-a) != 0) {
+		    && memcmp (a, b, ap-a) != 0) {
 			return 0;
 		}
 	}
diff --git a/camel/tests/lib/camel-test.h b/camel/tests/lib/camel-test.h
index f97c06a..49e83a1 100644
--- a/camel/tests/lib/camel-test.h
+++ b/camel/tests/lib/camel-test.h
@@ -7,7 +7,7 @@
 #include <glib/gstdio.h>
 #include <camel/camel.h>
 
-void camel_test_failv(const gchar *why, va_list ap);
+void camel_test_failv (const gchar *why, va_list ap);
 
 /* perform a check assertion */
 #define check(x) do {if (!(x)) { camel_test_fail("%s:%d: %s", __FILE__, __LINE__, #x); } } while (0)
@@ -15,14 +15,14 @@ void camel_test_failv(const gchar *why, va_list ap);
 #ifdef  __GNUC__
 #define check_msg(x, y, z...) do {if (!(x)) { camel_test_fail("%s:%d: %s\n\t" #y, __FILE__, __LINE__, #x, ##z); } } while (0)
 #else
-static void check_msg(gint truth, gchar *fmt, ...)
+static void check_msg (gint truth, gchar *fmt, ...)
 {
 	/* no gcc, we lose the condition that failed, nm */
 	if (!truth) {
 		va_list ap;
-		va_start(ap, fmt);
-		camel_test_failv(fmt, ap);
-		va_end(ap);
+		va_start (ap, fmt);
+		camel_test_failv (fmt, ap);
+		va_end (ap);
 	}
 }
 #endif
@@ -34,8 +34,8 @@ static void check_msg(gint truth, gchar *fmt, ...)
 } while (0)
 
 #define check_unref(object, expected) do { \
-	check_count(object, expected); \
-	g_object_unref(CAMEL_OBJECT(object)); \
+	check_count (object, expected); \
+	g_object_unref (CAMEL_OBJECT (object)); \
 	if (expected == 1) { \
 		object = NULL; \
 	} \
@@ -46,23 +46,23 @@ static void check_msg(gint truth, gchar *fmt, ...)
 #define push camel_test_push
 #define pull camel_test_pull
 
-void camel_test_init(gint argc, gchar **argv);
+void camel_test_init (gint argc, gchar **argv);
 
 /* start/finish a new test */
-void camel_test_start(const gchar *what);
-void camel_test_end(void);
+void camel_test_start (const gchar *what);
+void camel_test_end (void);
 
 /* start/finish a new test part */
-void camel_test_push(const gchar *what, ...);
-void camel_test_pull(void);
+void camel_test_push (const gchar *what, ...);
+void camel_test_pull (void);
 
 /* fail a test, with a reason why */
-void camel_test_fail(const gchar *why, ...);
+void camel_test_fail (const gchar *why, ...);
 
 /* Set whether a failed test quits.  May be nested, but must be called in nonfatal/fatal pairs  */
-void camel_test_nonfatal(const gchar *why, ...);
-void camel_test_fatal(void);
+void camel_test_nonfatal (const gchar *why, ...);
+void camel_test_fatal (void);
 
 /* utility functions */
 /* compare strings, ignore whitespace though */
-gint string_equal(const gchar *a, const gchar *b);
+gint string_equal (const gchar *a, const gchar *b);
diff --git a/camel/tests/lib/folders.c b/camel/tests/lib/folders.c
index a85670c..9a5f8fb 100644
--- a/camel/tests/lib/folders.c
+++ b/camel/tests/lib/folders.c
@@ -6,7 +6,7 @@
 
 /* check the total/unread is what we think it should be */
 void
-test_folder_counts(CamelFolder *folder, gint total, gint unread)
+test_folder_counts (CamelFolder *folder, gint total, gint unread)
 {
 	GPtrArray *s;
 	gint i, myunread;
@@ -16,37 +16,37 @@ test_folder_counts(CamelFolder *folder, gint total, gint unread)
 	push("test folder counts %d total %d unread", total, unread);
 
 	/* use the summary */
-	s = camel_folder_get_summary(folder);
-	check(s != NULL);
-	check(s->len == total);
+	s = camel_folder_get_summary (folder);
+	check (s != NULL);
+	check (s->len == total);
 	myunread = s->len;
 	for (i=0;i<s->len;i++) {
 		info = s->pdata[i];
-		if (camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN)
+		if (camel_message_info_flags (info) & CAMEL_MESSAGE_SEEN)
 			myunread--;
 	}
-	check(unread == myunread);
-	camel_folder_free_summary(folder, s);
+	check (unread == myunread);
+	camel_folder_free_summary (folder, s);
 
 	/* use the uid list */
-	s = camel_folder_get_uids(folder);
-	check(s != NULL);
-	check(s->len == total);
+	s = camel_folder_get_uids (folder);
+	check (s != NULL);
+	check (s->len == total);
 	myunread = s->len;
 	for (i=0;i<s->len;i++) {
-		info = camel_folder_get_message_info(folder, s->pdata[i]);
-		if (camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN)
+		info = camel_folder_get_message_info (folder, s->pdata[i]);
+		if (camel_message_info_flags (info) & CAMEL_MESSAGE_SEEN)
 			myunread--;
-		camel_folder_free_message_info(folder, info);
+		camel_folder_free_message_info (folder, info);
 	}
-	check(unread == myunread);
-	camel_folder_free_uids(folder, s);
+	check (unread == myunread);
+	camel_folder_free_uids (folder, s);
 
-	pull();
+	pull ();
 }
 
 static gint
-safe_strcmp(const gchar *a, const gchar *b)
+safe_strcmp (const gchar *a, const gchar *b)
 {
 	if (a == NULL && b == NULL)
 		return 0;
@@ -54,18 +54,18 @@ safe_strcmp(const gchar *a, const gchar *b)
 		return 1;
 	if (b == NULL)
 		return -1;
-	return strcmp(a, b);
+	return strcmp (a, b);
 }
 
 void
-test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info)
+test_message_info (CamelMimeMessage *msg, const CamelMessageInfo *info)
 {
-	check_msg(safe_strcmp(camel_message_info_subject(info), camel_mime_message_get_subject(msg)) == 0,
+	check_msg (safe_strcmp (camel_message_info_subject (info), camel_mime_message_get_subject (msg)) == 0,
 		  "info->subject = '%s', get_subject() = '%s'", camel_message_info_subject(info), camel_mime_message_get_subject(msg));
 
 	/* FIXME: testing from/cc/to, etc is more tricky */
 
-	check(camel_message_info_date_sent(info) == camel_mime_message_get_date(msg, NULL));
+	check (camel_message_info_date_sent (info) == camel_mime_message_get_date (msg, NULL));
 
 	/* date received isn't set for messages that haven't been sent anywhere ... */
 	/*check(info->date_received == camel_mime_message_get_date_received(msg, NULL));*/
@@ -75,7 +75,7 @@ test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info)
 
 /* check a message is present */
 void
-test_folder_message(CamelFolder *folder, const gchar *uid)
+test_folder_message (CamelFolder *folder, const gchar *uid)
 {
 	CamelMimeMessage *msg;
 	CamelMessageInfo *info;
@@ -87,52 +87,52 @@ test_folder_message(CamelFolder *folder, const gchar *uid)
 	push("uid %s is in folder", uid);
 
 	/* first try getting info */
-	info = camel_folder_get_message_info(folder, uid);
-	check(info != NULL);
-	check(strcmp(camel_message_info_uid(info), uid) == 0);
-	camel_folder_free_message_info(folder, info);
+	info = camel_folder_get_message_info (folder, uid);
+	check (info != NULL);
+	check (strcmp (camel_message_info_uid (info), uid) == 0);
+	camel_folder_free_message_info (folder, info);
 
 	/* then, getting message */
-	msg = camel_folder_get_message(folder, uid, &error);
+	msg = camel_folder_get_message (folder, uid, &error);
 	check_msg(error == NULL, "%s", error->message);
-	check(msg != NULL);
+	check (msg != NULL);
 
 	/* cross check with info */
-	test_message_info(msg, info);
+	test_message_info (msg, info);
 
 	g_object_unref (msg);
 
 	/* see if it is in the summary (only once) */
-	s = camel_folder_get_summary(folder);
-	check(s != NULL);
+	s = camel_folder_get_summary (folder);
+	check (s != NULL);
 	found = 0;
 	for (i=0;i<s->len;i++) {
 		info = s->pdata[i];
-		if (strcmp(camel_message_info_uid(info), uid) == 0)
+		if (strcmp (camel_message_info_uid (info), uid) == 0)
 			found++;
 	}
-	check(found == 1);
-	camel_folder_free_summary(folder, s);
+	check (found == 1);
+	camel_folder_free_summary (folder, s);
 
 	/* check it is in the uid list */
-	s = camel_folder_get_uids(folder);
-	check(s != NULL);
+	s = camel_folder_get_uids (folder);
+	check (s != NULL);
 	found = 0;
 	for (i=0;i<s->len;i++) {
-		if (strcmp(s->pdata[i], uid) == 0)
+		if (strcmp (s->pdata[i], uid) == 0)
 			found++;
 	}
-	check(found == 1);
-	camel_folder_free_uids(folder, s);
+	check (found == 1);
+	camel_folder_free_uids (folder, s);
 
 	g_clear_error (&error);
 
-	pull();
+	pull ();
 }
 
 /* check message not present */
 void
-test_folder_not_message(CamelFolder *folder, const gchar *uid)
+test_folder_not_message (CamelFolder *folder, const gchar *uid)
 {
 	CamelMimeMessage *msg;
 	CamelMessageInfo *info;
@@ -145,179 +145,179 @@ test_folder_not_message(CamelFolder *folder, const gchar *uid)
 
 	/* first try getting info */
 	push("no message info");
-	info = camel_folder_get_message_info(folder, uid);
-	check(info == NULL);
-	pull();
+	info = camel_folder_get_message_info (folder, uid);
+	check (info == NULL);
+	pull ();
 
 	/* then, getting message */
 	push("no message");
-	msg = camel_folder_get_message(folder, uid, &error);
-	check(error != NULL);
-	check(msg == NULL);
+	msg = camel_folder_get_message (folder, uid, &error);
+	check (error != NULL);
+	check (msg == NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	/* see if it is not in the summary (only once) */
 	push("not in summary list");
-	s = camel_folder_get_summary(folder);
-	check(s != NULL);
+	s = camel_folder_get_summary (folder);
+	check (s != NULL);
 	found = 0;
 	for (i=0;i<s->len;i++) {
 		info = s->pdata[i];
-		if (strcmp(camel_message_info_uid(info), uid) == 0)
+		if (strcmp (camel_message_info_uid (info), uid) == 0)
 			found++;
 	}
-	check(found == 0);
-	camel_folder_free_summary(folder, s);
-	pull();
+	check (found == 0);
+	camel_folder_free_summary (folder, s);
+	pull ();
 
 	/* check it is not in the uid list */
 	push("not in uid list");
-	s = camel_folder_get_uids(folder);
-	check(s != NULL);
+	s = camel_folder_get_uids (folder);
+	check (s != NULL);
 	found = 0;
 	for (i=0;i<s->len;i++) {
-		if (strcmp(s->pdata[i], uid) == 0)
+		if (strcmp (s->pdata[i], uid) == 0)
 			found++;
 	}
-	check(found == 0);
-	camel_folder_free_uids(folder, s);
-	pull();
+	check (found == 0);
+	camel_folder_free_uids (folder, s);
+	pull ();
 
 	g_clear_error (&error);
 
-	pull();
+	pull ();
 }
 
 /* test basic store operations on folders */
 /* TODO: Add subscription stuff */
 void
-test_folder_basic(CamelSession *session, const gchar *storename, gint local, gint spool)
+test_folder_basic (CamelSession *session, const gchar *storename, gint local, gint spool)
 {
 	CamelStore *store;
 	CamelFolder *folder;
 	gchar *what = g_strdup_printf("testing store: %s", storename);
 	GError *error = NULL;
 
-	camel_test_start(what);
-	test_free(what);
+	camel_test_start (what);
+	test_free (what);
 
 	push("getting store");
-	store = camel_session_get_store(session, storename, &error);
+	store = camel_session_get_store (session, storename, &error);
 	check_msg(error == NULL, "getting store: %s", error->message);
-	check(store != NULL);
+	check (store != NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	/* local providers == no inbox */
 	push("getting inbox folder");
-	folder = camel_store_get_inbox(store, &error);
+	folder = camel_store_get_inbox (store, &error);
 	if (local) {
 		/* Well, maildir can have an inbox */
 		if (folder) {
-			check(error == NULL);
-			check_unref(folder, 1);
+			check (error == NULL);
+			check_unref (folder, 1);
 		} else {
-			check(error != NULL);
+			check (error != NULL);
 		}
 	} else {
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
-		check_unref(folder, 2);
+		check (folder != NULL);
+		check_unref (folder, 2);
 	}
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	push("getting a non-existant folder, no create");
 	folder = camel_store_get_folder(store, "unknown", 0, &error);
-	check(error != NULL);
-	check(folder == NULL);
+	check (error != NULL);
+	check (folder == NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	if (!spool) {
 		push("getting a non-existant folder, with create");
 		folder = camel_store_get_folder(store, "testbox", CAMEL_STORE_FOLDER_CREATE, &error);
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 		if (local)
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 		else
-			check_unref(folder, 2);
+			check_unref (folder, 2);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("getting an existing folder");
 		folder = camel_store_get_folder(store, "testbox", 0, &error);
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 		if (local)
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 		else
-			check_unref(folder, 2);
+			check_unref (folder, 2);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("renaming a non-existant folder");
 		camel_store_rename_folder(store, "unknown1", "unknown2", &error);
-		check(error != NULL);
+		check (error != NULL);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("renaming an existing folder");
 		camel_store_rename_folder(store, "testbox", "testbox2", &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("opening the old name of a renamed folder");
 		folder = camel_store_get_folder(store, "testbox", 0, &error);
-		check(error != NULL);
-		check(folder == NULL);
+		check (error != NULL);
+		check (folder == NULL);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("opening the new name of a renamed folder");
 		folder = camel_store_get_folder(store, "testbox2", 0, &error);
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 		if (local)
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 		else
-			check_unref(folder, 2);
-		pull();
+			check_unref (folder, 2);
+		pull ();
 	}
 
 	push("deleting a non-existant folder");
 	camel_store_delete_folder(store, "unknown", &error);
-	check(error != NULL);
+	check (error != NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
 	if (!spool) {
 		push("deleting an existing folder");
 		camel_store_delete_folder(store, "testbox2", &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		pull();
+		pull ();
 	}
 
 	push("opening a folder that has been deleted");
 	folder = camel_store_get_folder(store, "testbox2", 0, &error);
-	check(error != NULL);
-	check(folder == NULL);
+	check (error != NULL);
+	check (folder == NULL);
 	g_clear_error (&error);
-	pull();
+	pull ();
 
-	check_unref(store, 1);
+	check_unref (store, 1);
 
-	camel_test_end();
+	camel_test_end ();
 }
 
 /* todo: cross-check everything with folder_info checks as well */
 /* this should probably take a folder instead of a session ... */
 void
-test_folder_message_ops(CamelSession *session, const gchar *name, gint local, const gchar *mailbox)
+test_folder_message_ops (CamelSession *session, const gchar *name, gint local, const gchar *mailbox)
 {
 	CamelStore *store;
 	CamelFolder *folder;
@@ -334,22 +334,22 @@ test_folder_message_ops(CamelSession *session, const gchar *name, gint local, co
 		gchar *what = g_strdup_printf("folder ops: %s %s", name, local?(indexed?"indexed":"non-indexed"):"");
 		gint flags;
 
-		camel_test_start(what);
-		test_free(what);
+		camel_test_start (what);
+		test_free (what);
 
 		push("getting store");
-		store = camel_session_get_store(session, name, &error);
+		store = camel_session_get_store (session, name, &error);
 		check_msg(error == NULL, "getting store: %s", error->message);
-		check(store != NULL);
+		check (store != NULL);
 		g_clear_error (&error);
-		pull();
+		pull ();
 
 		push("creating %sindexed folder", indexed?"":"non-");
 		if (indexed)
 			flags = CAMEL_STORE_FOLDER_CREATE|CAMEL_STORE_FOLDER_BODY_INDEX;
 		else
 			flags = CAMEL_STORE_FOLDER_CREATE;
-		folder = camel_store_get_folder(store, mailbox, flags, &error);
+		folder = camel_store_get_folder (store, mailbox, flags, &error);
 
 		/* we can't create mailbox outside of namespace, since we have no api for it, try
 		   using inbox namespace, works for courier */
@@ -357,14 +357,14 @@ test_folder_message_ops(CamelSession *session, const gchar *name, gint local, co
 			gchar *mbox = g_strdup_printf("INBOX/%s", mailbox);
 			mailbox = mbox;
 			g_clear_error (&error);
-			folder = camel_store_get_folder(store, mailbox, flags, &error);
+			folder = camel_store_get_folder (store, mailbox, flags, &error);
 		}
 
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 
 		/* verify empty/can't get nonexistant stuff */
-		test_folder_counts(folder, 0, 0);
+		test_folder_counts (folder, 0, 0);
 		test_folder_not_message(folder, "0");
 		test_folder_not_message(folder, "");
 
@@ -372,204 +372,204 @@ test_folder_message_ops(CamelSession *session, const gchar *name, gint local, co
 			gchar *content, *subject;
 
 			push("creating test message");
-			msg = test_message_create_simple();
+			msg = test_message_create_simple ();
 			content = g_strdup_printf("Test message %d contents\n\n", j);
 			test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain",
-							content, strlen(content));
-			test_free(content);
+							content, strlen (content));
+			test_free (content);
 			subject = g_strdup_printf("Test message %d", j);
-			camel_mime_message_set_subject(msg, subject);
-			pull();
+			camel_mime_message_set_subject (msg, subject);
+			pull ();
 
 			push("appending simple message %d", j);
-			camel_folder_append_message(folder, msg, NULL, NULL, &error);
+			camel_folder_append_message (folder, msg, NULL, NULL, &error);
 			check_msg(error == NULL, "%s", error->message);
 
 #if 0
 			/* sigh, this shouldn't be required, but the imap code is too dumb to do it itself */
 			if (!local) {
 				push("forcing a refresh of folder updates");
-				camel_folder_refresh_info(folder, ex);
+				camel_folder_refresh_info (folder, ex);
 				check_msg(error == NULL, "%s", error->message);
-				pull();
+				pull ();
 			}
 #endif
 			/*if (!local)
 			  camel_test_nonfatal("unread counts dont seem right for imap");*/
 
-			test_folder_counts(folder, j+1, j+1);
+			test_folder_counts (folder, j+1, j+1);
 
 			/*if (!local)
-			  camel_test_fatal();*/
+			  camel_test_fatal ();*/
 
 			push("checking it is in the right uid slot & exists");
-			uids = camel_folder_get_uids(folder);
-			check(uids != NULL);
-			check(uids->len == j+1);
+			uids = camel_folder_get_uids (folder);
+			check (uids != NULL);
+			check (uids->len == j+1);
 			if (uids->len > j)
-				test_folder_message(folder, uids->pdata[j]);
-			pull();
+				test_folder_message (folder, uids->pdata[j]);
+			pull ();
 
 			push("checking it is the right message (subject): %s", subject);
 			if (uids->len > j) {
-				info = camel_folder_get_message_info(folder, uids->pdata[j]);
-				check(info != NULL);
-				check_msg(strcmp(camel_message_info_subject(info), subject)==0,
+				info = camel_folder_get_message_info (folder, uids->pdata[j]);
+				check (info != NULL);
+				check_msg (strcmp (camel_message_info_subject (info), subject)==0,
 					  "info->subject %s", camel_message_info_subject(info));
-				camel_folder_free_message_info(folder, info);
+				camel_folder_free_message_info (folder, info);
 			}
-			camel_folder_free_uids(folder, uids);
-			pull();
+			camel_folder_free_uids (folder, uids);
+			pull ();
 
-			test_free(subject);
+			test_free (subject);
 
 			/*if (!local)
-			  camel_test_fatal();*/
+			  camel_test_fatal ();*/
 
-			check_unref(msg, 1);
-			pull();
+			check_unref (msg, 1);
+			pull ();
 		}
 
 		if (local)
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 		else
-			check_unref(folder, 2);
-		pull();
+			check_unref (folder, 2);
+		pull ();
 
 #if 0
 		push("deleting test folder, with messages in it");
-		camel_store_delete_folder(store, mailbox, ex);
-		check(camel_exception_is_set(ex));
-		camel_exception_clear(ex);
-		pull();
+		camel_store_delete_folder (store, mailbox, ex);
+		check (camel_exception_is_set (ex));
+		camel_exception_clear (ex);
+		pull ();
 #endif
 
 		push("re-opening folder");
-		folder = camel_store_get_folder(store, mailbox, flags, &error);
+		folder = camel_store_get_folder (store, mailbox, flags, &error);
 		check_msg(error == NULL, "%s", error->message);
-		check(folder != NULL);
+		check (folder != NULL);
 		g_clear_error (&error);
 
 			/* verify counts */
-		test_folder_counts(folder, 10, 10);
+		test_folder_counts (folder, 10, 10);
 
 		/* re-check uid's, after a reload */
-		uids = camel_folder_get_uids(folder);
-		check(uids != NULL);
-		check(uids->len == 10);
+		uids = camel_folder_get_uids (folder);
+		check (uids != NULL);
+		check (uids->len == 10);
 		for (j=0;j<10;j++) {
 			gchar *subject = g_strdup_printf("Test message %d", j);
 
 			push("verify reload of %s", subject);
-			test_folder_message(folder, uids->pdata[j]);
+			test_folder_message (folder, uids->pdata[j]);
 
-			info = camel_folder_get_message_info(folder, uids->pdata[j]);
-			check_msg(strcmp(camel_message_info_subject(info), subject)==0,
+			info = camel_folder_get_message_info (folder, uids->pdata[j]);
+			check_msg (strcmp (camel_message_info_subject (info), subject)==0,
 				  "info->subject %s", camel_message_info_subject(info));
-			test_free(subject);
-			camel_folder_free_message_info(folder, info);
-			pull();
+			test_free (subject);
+			camel_folder_free_message_info (folder, info);
+			pull ();
 		}
 
 		push("deleting first message & expunging");
-		camel_folder_delete_message(folder, uids->pdata[0]);
-		test_folder_counts(folder, 10, 9);
-		camel_folder_expunge(folder, &error);
+		camel_folder_delete_message (folder, uids->pdata[0]);
+		test_folder_counts (folder, 10, 9);
+		camel_folder_expunge (folder, &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		test_folder_not_message(folder, uids->pdata[0]);
-		test_folder_counts(folder, 9, 9);
+		test_folder_not_message (folder, uids->pdata[0]);
+		test_folder_counts (folder, 9, 9);
 
-		camel_folder_free_uids(folder, uids);
+		camel_folder_free_uids (folder, uids);
 
-		uids = camel_folder_get_uids(folder);
-		check(uids != NULL);
-		check(uids->len == 9);
+		uids = camel_folder_get_uids (folder);
+		check (uids != NULL);
+		check (uids->len == 9);
 		for (j=0;j<9;j++) {
 			gchar *subject = g_strdup_printf("Test message %d", j+1);
 
 			push("verify after expunge of %s", subject);
-			test_folder_message(folder, uids->pdata[j]);
+			test_folder_message (folder, uids->pdata[j]);
 
-			info = camel_folder_get_message_info(folder, uids->pdata[j]);
-			check_msg(strcmp(camel_message_info_subject(info), subject)==0,
+			info = camel_folder_get_message_info (folder, uids->pdata[j]);
+			check_msg (strcmp (camel_message_info_subject (info), subject)==0,
 				  "info->subject %s", camel_message_info_subject(info));
-			test_free(subject);
-			camel_folder_free_message_info(folder, info);
-			pull();
+			test_free (subject);
+			camel_folder_free_message_info (folder, info);
+			pull ();
 		}
-		pull();
+		pull ();
 
 		push("deleting last message & expunging");
-		camel_folder_delete_message(folder, uids->pdata[8]);
+		camel_folder_delete_message (folder, uids->pdata[8]);
 		/* sync? */
-		test_folder_counts(folder, 9, 8);
-		camel_folder_expunge(folder, &error);
+		test_folder_counts (folder, 9, 8);
+		camel_folder_expunge (folder, &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
-		test_folder_not_message(folder, uids->pdata[8]);
-		test_folder_counts(folder, 8, 8);
+		test_folder_not_message (folder, uids->pdata[8]);
+		test_folder_counts (folder, 8, 8);
 
-		camel_folder_free_uids(folder, uids);
+		camel_folder_free_uids (folder, uids);
 
-		uids = camel_folder_get_uids(folder);
-		check(uids != NULL);
-		check(uids->len == 8);
+		uids = camel_folder_get_uids (folder);
+		check (uids != NULL);
+		check (uids->len == 8);
 		for (j=0;j<8;j++) {
 			gchar *subject = g_strdup_printf("Test message %d", j+1);
 
 			push("verify after expunge of %s", subject);
-			test_folder_message(folder, uids->pdata[j]);
+			test_folder_message (folder, uids->pdata[j]);
 
-			info = camel_folder_get_message_info(folder, uids->pdata[j]);
-			check_msg(strcmp(camel_message_info_subject(info), subject)==0,
+			info = camel_folder_get_message_info (folder, uids->pdata[j]);
+			check_msg (strcmp (camel_message_info_subject (info), subject)==0,
 				  "info->subject %s", camel_message_info_subject(info));
-			test_free(subject);
-			camel_folder_free_message_info(folder, info);
-			pull();
+			test_free (subject);
+			camel_folder_free_message_info (folder, info);
+			pull ();
 		}
-		pull();
+		pull ();
 
 		push("deleting all messages & expunging");
 		for (j=0;j<8;j++) {
-			camel_folder_delete_message(folder, uids->pdata[j]);
+			camel_folder_delete_message (folder, uids->pdata[j]);
 		}
 		/* sync? */
-		test_folder_counts(folder, 8, 0);
-		camel_folder_expunge(folder, &error);
+		test_folder_counts (folder, 8, 0);
+		camel_folder_expunge (folder, &error);
 		check_msg(error == NULL, "%s", error->message);
 		g_clear_error (&error);
 		for (j=0;j<8;j++) {
-			test_folder_not_message(folder, uids->pdata[j]);
+			test_folder_not_message (folder, uids->pdata[j]);
 		}
-		test_folder_counts(folder, 0, 0);
+		test_folder_counts (folder, 0, 0);
 
-		camel_folder_free_uids(folder, uids);
-		pull();
+		camel_folder_free_uids (folder, uids);
+		pull ();
 
 		if (local)
-			check_unref(folder, 1);
+			check_unref (folder, 1);
 		else
-			check_unref(folder, 2);
-		pull(); /* re-opening folder */
+			check_unref (folder, 2);
+		pull (); /* re-opening folder */
 
 		if (g_ascii_strcasecmp(mailbox, "INBOX") != 0) {
 			push("deleting test folder, with no messages in it");
-			camel_store_delete_folder(store, mailbox, &error);
+			camel_store_delete_folder (store, mailbox, &error);
 			check_msg(error == NULL, "%s", error->message);
 			g_clear_error (&error);
-			pull();
+			pull ();
 		}
 
 		if (!local) {
 			push("disconneect service");
-			camel_service_disconnect((CamelService *)store, TRUE, &error);
+			camel_service_disconnect ((CamelService *)store, TRUE, &error);
 			check_msg(error == NULL, "%s", error->message);
 			g_clear_error (&error);
-			pull();
+			pull ();
 		}
 
-		check_unref(store, 1);
-		camel_test_end();
+		check_unref (store, 1);
+		camel_test_end ();
 	}
 }
diff --git a/camel/tests/lib/folders.h b/camel/tests/lib/folders.h
index 006a297..32d1e85 100644
--- a/camel/tests/lib/folders.h
+++ b/camel/tests/lib/folders.h
@@ -2,14 +2,14 @@
 #include <camel/camel.h>
 
 /* check the total/unread is what we think it should be, everywhere it can be determined */
-void test_folder_counts(CamelFolder *folder, gint total, gint unread);
+void test_folder_counts (CamelFolder *folder, gint total, gint unread);
 /* cross-check info/msg */
-void test_message_info(CamelMimeMessage *msg, const CamelMessageInfo *info);
+void test_message_info (CamelMimeMessage *msg, const CamelMessageInfo *info);
 /* check a message is present everywhere it should be */
-void test_folder_message(CamelFolder *folder, const gchar *uid);
+void test_folder_message (CamelFolder *folder, const gchar *uid);
 /* check message not present everywhere it shouldn't be */
-void test_folder_not_message(CamelFolder *folder, const gchar *uid);
+void test_folder_not_message (CamelFolder *folder, const gchar *uid);
 /* test basic folder ops on a store */
-void test_folder_basic(CamelSession *session, const gchar *storename, gint local, gint spool);
+void test_folder_basic (CamelSession *session, const gchar *storename, gint local, gint spool);
 /* test basic message operations on a folder */
-void test_folder_message_ops(CamelSession *session, const gchar *storename, gint local, const gchar *foldername);
+void test_folder_message_ops (CamelSession *session, const gchar *storename, gint local, const gchar *foldername);
diff --git a/camel/tests/lib/messages.c b/camel/tests/lib/messages.c
index d8fd8da..2275501 100644
--- a/camel/tests/lib/messages.c
+++ b/camel/tests/lib/messages.c
@@ -6,27 +6,27 @@
 #include "camel-test.h"
 
 CamelMimeMessage *
-test_message_create_simple(void)
+test_message_create_simple (void)
 {
 	CamelMimeMessage *msg;
 	CamelInternetAddress *addr;
 
-	msg = camel_mime_message_new();
+	msg = camel_mime_message_new ();
 
-	addr = camel_internet_address_new();
+	addr = camel_internet_address_new ();
 	camel_internet_address_add(addr, "Michael Zucchi", "zed nowhere com");
-	camel_mime_message_set_from(msg, addr);
-	camel_address_remove((CamelAddress *)addr, -1);
+	camel_mime_message_set_from (msg, addr);
+	camel_address_remove ((CamelAddress *)addr, -1);
 	camel_internet_address_add(addr, "POSTMASTER", "POSTMASTER somewhere net");
-	camel_mime_message_set_recipients(msg, CAMEL_RECIPIENT_TYPE_TO, addr);
-	camel_address_remove((CamelAddress *)addr, -1);
+	camel_mime_message_set_recipients (msg, CAMEL_RECIPIENT_TYPE_TO, addr);
+	camel_address_remove ((CamelAddress *)addr, -1);
 	camel_internet_address_add(addr, "Michael Zucchi", "zed nowhere com");
-	camel_mime_message_set_recipients(msg, CAMEL_RECIPIENT_TYPE_CC, addr);
+	camel_mime_message_set_recipients (msg, CAMEL_RECIPIENT_TYPE_CC, addr);
 
-	check_unref(addr, 1);
+	check_unref (addr, 1);
 
 	camel_mime_message_set_subject(msg, "Simple message subject");
-	camel_mime_message_set_date(msg, time(0), 930);
+	camel_mime_message_set_date (msg, time (0), 930);
 
 	return msg;
 }
@@ -39,7 +39,7 @@ content_weak_notify (GByteArray *ba,
 }
 
 void
-test_message_set_content_simple(CamelMimePart *part, gint how, const gchar *type, const gchar *text, gint len)
+test_message_set_content_simple (CamelMimePart *part, gint how, const gchar *type, const gchar *text, gint len)
 {
 	CamelStreamMem *content = NULL;
 	CamelDataWrapper *dw;
@@ -47,28 +47,28 @@ test_message_set_content_simple(CamelMimePart *part, gint how, const gchar *type
 
 	switch (how) {
 	case 0:
-		camel_mime_part_set_content(part, text, len, type);
+		camel_mime_part_set_content (part, text, len, type);
 		break;
 	case 1:
-		content = (CamelStreamMem *)camel_stream_mem_new_with_buffer(text, len);
+		content = (CamelStreamMem *)camel_stream_mem_new_with_buffer (text, len);
 		break;
 	case 2:
-		content = (CamelStreamMem *)camel_stream_mem_new();
-		camel_stream_mem_set_buffer(content, text, len);
+		content = (CamelStreamMem *)camel_stream_mem_new ();
+		camel_stream_mem_set_buffer (content, text, len);
 		break;
 	case 3:
-		ba = g_byte_array_new();
-		g_byte_array_append(ba, (guint8 *) text, len);
+		ba = g_byte_array_new ();
+		g_byte_array_append (ba, (guint8 *) text, len);
 
-		content = (CamelStreamMem *)camel_stream_mem_new_with_byte_array(ba);
+		content = (CamelStreamMem *)camel_stream_mem_new_with_byte_array (ba);
 		ba = NULL;
 		break;
 	case 4:
-		ba = g_byte_array_new();
-		g_byte_array_append(ba, (guint8 *) text, len);
+		ba = g_byte_array_new ();
+		g_byte_array_append (ba, (guint8 *) text, len);
 
-		content = (CamelStreamMem *)camel_stream_mem_new();
-		camel_stream_mem_set_byte_array(content, ba);
+		content = (CamelStreamMem *)camel_stream_mem_new ();
+		camel_stream_mem_set_byte_array (content, ba);
 
 		g_object_weak_ref (
 			G_OBJECT (content), (GWeakNotify)
@@ -77,45 +77,45 @@ test_message_set_content_simple(CamelMimePart *part, gint how, const gchar *type
 	}
 
 	if (content != 0) {
-		dw = camel_data_wrapper_new();
+		dw = camel_data_wrapper_new ();
                 camel_data_wrapper_set_mime_type (dw, type);
 
-		camel_data_wrapper_construct_from_stream(dw, (CamelStream *)content, NULL);
+		camel_data_wrapper_construct_from_stream (dw, (CamelStream *)content, NULL);
 		camel_medium_set_content ((CamelMedium *)part, dw);
 
-		check_unref(content, 2);
-		check_unref(dw, 2);
+		check_unref (content, 2);
+		check_unref (dw, 2);
 	}
 }
 
 gint
-test_message_write_file(CamelMimeMessage *msg, const gchar *name)
+test_message_write_file (CamelMimeMessage *msg, const gchar *name)
 {
 	CamelStreamFs *file;
 	gint ret;
 
-	file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_CREAT|O_WRONLY, 0600, NULL);
-	camel_data_wrapper_write_to_stream((CamelDataWrapper *)msg, (CamelStream *)file, NULL);
-	ret = camel_stream_close((CamelStream *)file, NULL);
+	file = (CamelStreamFs *)camel_stream_fs_new_with_name (name, O_CREAT|O_WRONLY, 0600, NULL);
+	camel_data_wrapper_write_to_stream ((CamelDataWrapper *)msg, (CamelStream *)file, NULL);
+	ret = camel_stream_close ((CamelStream *)file, NULL);
 
-	check(G_OBJECT (file)->ref_count == 1);
+	check (G_OBJECT (file)->ref_count == 1);
 	g_object_unref (file);
 
 	return ret;
 }
 
 CamelMimeMessage *
-test_message_read_file(const gchar *name)
+test_message_read_file (const gchar *name)
 {
 	CamelStreamFs *file;
 	CamelMimeMessage *msg2;
 
-	file = (CamelStreamFs *)camel_stream_fs_new_with_name(name, O_RDONLY, 0, NULL);
-	msg2 = camel_mime_message_new();
+	file = (CamelStreamFs *)camel_stream_fs_new_with_name (name, O_RDONLY, 0, NULL);
+	msg2 = camel_mime_message_new ();
 
-	camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg2, (CamelStream *)file, NULL);
+	camel_data_wrapper_construct_from_stream ((CamelDataWrapper *)msg2, (CamelStream *)file, NULL);
 	/* file's refcount may be > 1 if the message is real big */
-	check(G_OBJECT(file)->ref_count >=1);
+	check (G_OBJECT (file)->ref_count >=1);
 	g_object_unref (file);
 
 	return msg2;
@@ -152,7 +152,7 @@ hexdump (const guchar *in, gint inlen)
 }
 
 gint
-test_message_compare_content(CamelDataWrapper *dw, const gchar *text, gint len)
+test_message_compare_content (CamelDataWrapper *dw, const gchar *text, gint len)
 {
 	GByteArray *byte_array;
 	CamelStream *content;
@@ -177,7 +177,7 @@ test_message_compare_content(CamelDataWrapper *dw, const gchar *text, gint len)
 	check_msg(byte_array->len == len, "buffer->len = %d, len = %d", byte_array->len, len);
 	check_msg(memcmp(byte_array->data, text, byte_array->len) == 0, "len = %d", len);
 
-	check_unref(content, 1);
+	check_unref (content, 1);
 
 	return 0;
 }
@@ -211,14 +211,14 @@ test_message_compare (CamelMimeMessage *msg)
 		printf ("stream2 stream:\n%.*s\n\n", byte_array2->len, byte_array2->data);
 
 		printf("msg1:\n");
-		test_message_dump_structure(msg);
+		test_message_dump_structure (msg);
 		printf("msg2:\n");
-		test_message_dump_structure(msg2);
+		test_message_dump_structure (msg2);
 
 		content = camel_medium_get_content ((CamelMedium *) msg);
 	}
 
-	check_unref(msg2, 1);
+	check_unref (msg2, 1);
 
 	check_msg (byte_array1->len == byte_array2->len,
 		   "byte_array1->len = %d, byte_array2->len = %d",
@@ -233,33 +233,33 @@ test_message_compare (CamelMimeMessage *msg)
 }
 
 gint
-test_message_compare_header(CamelMimeMessage *m1, CamelMimeMessage *m2)
+test_message_compare_header (CamelMimeMessage *m1, CamelMimeMessage *m2)
 {
 	return 0;
 }
 
 gint
-test_message_compare_messages(CamelMimeMessage *m1, CamelMimeMessage *m2)
+test_message_compare_messages (CamelMimeMessage *m1, CamelMimeMessage *m2)
 {
 	return 0;
 }
 
 static void
-message_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint depth)
+message_dump_rec (CamelMimeMessage *msg, CamelMimePart *part, gint depth)
 {
 	CamelDataWrapper *containee;
 	gint parts, i;
 	gchar *s;
 	gchar *mime_type;
 
-	s = alloca(depth+1);
-	memset(s, ' ', depth);
+	s = alloca (depth+1);
+	memset (s, ' ', depth);
 	s[depth] = 0;
 
-	mime_type = camel_data_wrapper_get_mime_type((CamelDataWrapper *)part);
+	mime_type = camel_data_wrapper_get_mime_type ((CamelDataWrapper *)part);
 	printf("%sPart <%s>\n", s, G_OBJECT_TYPE_NAME (part));
 	printf("%sContent-Type: %s\n", s, mime_type);
-	g_free(mime_type);
+	g_free (mime_type);
 	printf("%s encoding: %s\n", s, camel_transfer_encoding_to_string(((CamelDataWrapper *)part)->encoding));
 	printf("%s part encoding: %s\n", s, camel_transfer_encoding_to_string(camel_mime_part_get_encoding (part)));
 
@@ -268,7 +268,7 @@ message_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint depth)
 	if (containee == NULL)
 		return;
 
-	mime_type = camel_data_wrapper_get_mime_type(containee);
+	mime_type = camel_data_wrapper_get_mime_type (containee);
 	printf("%sContent <%s>\n", s, G_OBJECT_TYPE_NAME (containee));
 	printf ("%sContent-Type: %s\n", s, mime_type);
 	g_free (mime_type);
@@ -280,15 +280,15 @@ message_dump_rec(CamelMimeMessage *msg, CamelMimePart *part, gint depth)
 		for (i = 0; i < parts; i++) {
 			CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
 
-			message_dump_rec(msg, part, depth+1);
+			message_dump_rec (msg, part, depth+1);
 		}
 	} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
-		message_dump_rec(msg, (CamelMimePart *)containee, depth+1);
+		message_dump_rec (msg, (CamelMimePart *)containee, depth+1);
 	}
 }
 
 void
-test_message_dump_structure(CamelMimeMessage *m)
+test_message_dump_structure (CamelMimeMessage *m)
 {
-	message_dump_rec(m, (CamelMimePart *)m, 0);
+	message_dump_rec (m, (CamelMimePart *)m, 0);
 }
diff --git a/camel/tests/lib/messages.h b/camel/tests/lib/messages.h
index 807ba74..042bd37 100644
--- a/camel/tests/lib/messages.h
+++ b/camel/tests/lib/messages.h
@@ -4,14 +4,14 @@
 #define SET_CONTENT_WAYS (5)
 
 /* messages.c */
-CamelMimeMessage *test_message_create_simple(void);
-void test_message_set_content_simple(CamelMimePart *part, gint how, const gchar *type, const gchar *text, gint len);
-gint test_message_write_file(CamelMimeMessage *msg, const gchar *name);
-CamelMimeMessage *test_message_read_file(const gchar *name);
-gint test_message_compare_content(CamelDataWrapper *dw, const gchar *text, gint len);
+CamelMimeMessage *test_message_create_simple (void);
+void test_message_set_content_simple (CamelMimePart *part, gint how, const gchar *type, const gchar *text, gint len);
+gint test_message_write_file (CamelMimeMessage *msg, const gchar *name);
+CamelMimeMessage *test_message_read_file (const gchar *name);
+gint test_message_compare_content (CamelDataWrapper *dw, const gchar *text, gint len);
 gint test_message_compare (CamelMimeMessage *msg);
 
-void test_message_dump_structure(CamelMimeMessage *m);
+void test_message_dump_structure (CamelMimeMessage *m);
 
-gint test_message_compare_header(CamelMimeMessage *m1, CamelMimeMessage *m2);
-gint test_message_compare_messages(CamelMimeMessage *m1, CamelMimeMessage *m2);
+gint test_message_compare_header (CamelMimeMessage *m1, CamelMimeMessage *m2);
+gint test_message_compare_messages (CamelMimeMessage *m1, CamelMimeMessage *m2);
diff --git a/camel/tests/lib/streams.c b/camel/tests/lib/streams.c
index 6165f70..a81ab2c 100644
--- a/camel/tests/lib/streams.c
+++ b/camel/tests/lib/streams.c
@@ -16,53 +16,53 @@ static gchar testbuf[10240];
 
 /* pass in an empty read/write stream */
 void
-test_stream_seekable_writepart(CamelSeekableStream *s)
+test_stream_seekable_writepart (CamelSeekableStream *s)
 {
 	goffset end;
 	gint i;
 
 	push("seekable stream test, writing ");
 
-	check(camel_seekable_stream_tell(s) == 0);
-	check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_SET, NULL) == 0);
-	check(camel_seekable_stream_tell(s) == 0);
+	check (camel_seekable_stream_tell (s) == 0);
+	check (camel_seekable_stream_seek (s, 0, CAMEL_STREAM_SET, NULL) == 0);
+	check (camel_seekable_stream_tell (s) == 0);
 
 	check(camel_stream_write(CAMEL_STREAM(s), "", 0, NULL) == 0);
-	check(camel_seekable_stream_tell(s) == 0);
+	check (camel_seekable_stream_tell (s) == 0);
 	check(camel_stream_write(CAMEL_STREAM(s), "\n", 1, NULL) == 1);
-	check(camel_seekable_stream_tell(s) == 1);
+	check (camel_seekable_stream_tell (s) == 1);
 
 	for (i=0;i<10240;i++) {
-		check(camel_stream_write(CAMEL_STREAM(s), teststring, sizeof(teststring), NULL) == sizeof(teststring));
-		check(camel_seekable_stream_tell(s) == 1 + (i+1)*sizeof(teststring));
+		check (camel_stream_write (CAMEL_STREAM (s), teststring, sizeof (teststring), NULL) == sizeof (teststring));
+		check (camel_seekable_stream_tell (s) == 1 + (i+1)*sizeof (teststring));
 	}
-	end = 10240*sizeof(teststring)+1;
+	end = 10240*sizeof (teststring)+1;
 
 	check_msg(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END, NULL) == end, "seek =%d end = %d",
-		  camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END, NULL), end);
+		  camel_seekable_stream_seek (s, 0, CAMEL_STREAM_END, NULL), end);
 
-	check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_END, NULL) == end);
-	check(camel_seekable_stream_tell(s) == end);
+	check (camel_seekable_stream_seek (s, 0, CAMEL_STREAM_END, NULL) == end);
+	check (camel_seekable_stream_tell (s) == end);
 	/* need to read 0 first to set eos */
-	check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240, NULL) == 0);
-	check(camel_stream_eos(CAMEL_STREAM(s)));
+	check (camel_stream_read (CAMEL_STREAM (s), testbuf, 10240, NULL) == 0);
+	check (camel_stream_eos (CAMEL_STREAM (s)));
 
-	pull();
+	pull ();
 }
 
 void
-test_stream_seekable_readpart(CamelSeekableStream *s)
+test_stream_seekable_readpart (CamelSeekableStream *s)
 {
 	goffset off, new, end;
 	gint i, j;
 
 	push("seekable stream test, re-reading");
 
-	end = 10240*sizeof(teststring)+1;
+	end = 10240*sizeof (teststring)+1;
 
-	check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_SET, NULL) == 0);
-	check(camel_seekable_stream_tell(s) == 0);
-	check(!camel_stream_eos(CAMEL_STREAM(s)));
+	check (camel_seekable_stream_seek (s, 0, CAMEL_STREAM_SET, NULL) == 0);
+	check (camel_seekable_stream_tell (s) == 0);
+	check (!camel_stream_eos (CAMEL_STREAM (s)));
 
 	off = 0;
 	for (i=0;i<1024;i++) {
@@ -72,43 +72,43 @@ test_stream_seekable_readpart(CamelSeekableStream *s)
 		/* exercise all seek methods */
 		switch (i % 3) {
 		case 0:
-			check(camel_seekable_stream_seek(s, new, CAMEL_STREAM_SET, NULL) == new);
+			check (camel_seekable_stream_seek (s, new, CAMEL_STREAM_SET, NULL) == new);
 			break;
 		case 1:
-			check(camel_seekable_stream_seek(s, new-off, CAMEL_STREAM_CUR, NULL) == new);
+			check (camel_seekable_stream_seek (s, new-off, CAMEL_STREAM_CUR, NULL) == new);
 			break;
 		case 2:
-			check(camel_seekable_stream_seek(s, new-end, CAMEL_STREAM_END, NULL) == new);
+			check (camel_seekable_stream_seek (s, new-end, CAMEL_STREAM_END, NULL) == new);
 			break;
 		}
-		check(camel_seekable_stream_tell(s) == new);
+		check (camel_seekable_stream_tell (s) == new);
 
-		check(camel_stream_read(CAMEL_STREAM(s), testbuf, i*3, NULL) == i*3);
+		check (camel_stream_read (CAMEL_STREAM (s), testbuf, i*3, NULL) == i*3);
 		for (j=0;j<i*3;j++) {
 			gint k = new + j;
 
 			if (k==0) {
-				check(testbuf[j] == '\n');
+				check (testbuf[j] == '\n');
 			} else {
-				check(testbuf[j] == teststring[(k-1) % sizeof(teststring)]);
+				check (testbuf[j] == teststring[(k-1) % sizeof (teststring)]);
 			}
 		}
 		off = new+i*3;
 	}
 
 	/* verify end-of-file behaviour */
-	check(camel_seekable_stream_seek(s, -1, CAMEL_STREAM_END, NULL) == end-1);
-	check(camel_seekable_stream_tell(s) == end-1);
+	check (camel_seekable_stream_seek (s, -1, CAMEL_STREAM_END, NULL) == end-1);
+	check (camel_seekable_stream_tell (s) == end-1);
 
-	check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240, NULL) == 1);
-	check(testbuf[0] == teststring[sizeof(teststring)-1]);
+	check (camel_stream_read (CAMEL_STREAM (s), testbuf, 10240, NULL) == 1);
+	check (testbuf[0] == teststring[sizeof (teststring)-1]);
 
-	check(camel_stream_read(CAMEL_STREAM(s), testbuf, 10240, NULL) == 0);
-	check(camel_seekable_stream_seek(s, 0, CAMEL_STREAM_CUR, NULL) == end);
-	check(camel_seekable_stream_tell(s) == end);
-	check(camel_stream_eos(CAMEL_STREAM(s)));
+	check (camel_stream_read (CAMEL_STREAM (s), testbuf, 10240, NULL) == 0);
+	check (camel_seekable_stream_seek (s, 0, CAMEL_STREAM_CUR, NULL) == end);
+	check (camel_seekable_stream_tell (s) == end);
+	check (camel_stream_eos (CAMEL_STREAM (s)));
 
-	pull();
+	pull ();
 }
 
 /*
@@ -116,7 +116,7 @@ test_stream_seekable_readpart(CamelSeekableStream *s)
   1 = write to the parent stream at the right spot
 */
 void
-test_seekable_substream_writepart(CamelStream *s, gint type)
+test_seekable_substream_writepart (CamelStream *s, gint type)
 {
 	CamelSeekableStream *ss = (CamelSeekableStream *)s;
 	CamelSeekableSubstream *sus = (CamelSeekableSubstream *)s;
@@ -126,47 +126,47 @@ test_seekable_substream_writepart(CamelStream *s, gint type)
 	push("writing substream, type %d", type);
 
 	if (type == 1) {
-		check(camel_seekable_stream_seek(sp, ss->bound_start, CAMEL_STREAM_SET, NULL) == ss->bound_start);
+		check (camel_seekable_stream_seek (sp, ss->bound_start, CAMEL_STREAM_SET, NULL) == ss->bound_start);
 		s = (CamelStream *)sp;
 	} else {
-		check(camel_seekable_stream_tell(ss) == ss->bound_start);
-		check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_SET, NULL) == ss->bound_start);
+		check (camel_seekable_stream_tell (ss) == ss->bound_start);
+		check (camel_seekable_stream_seek (ss, 0, CAMEL_STREAM_SET, NULL) == ss->bound_start);
 	}
 
-	check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start);
+	check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_start);
 
 	check(camel_stream_write(s, "", 0, NULL) == 0);
-	check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start);
+	check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_start);
 
 	/* fill up the bounds with writes */
 	if (ss->bound_end != CAMEL_STREAM_UNBOUND) {
-		for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof(teststring);i++) {
-			check(camel_stream_write(s, teststring, sizeof(teststring), NULL) == sizeof(teststring));
-			check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start + (i+1)*sizeof(teststring));
+		for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof (teststring);i++) {
+			check (camel_stream_write (s, teststring, sizeof (teststring), NULL) == sizeof (teststring));
+			check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_start + (i+1)*sizeof (teststring));
 		}
-		len = (ss->bound_end-ss->bound_start) % sizeof(teststring);
-		check(camel_stream_write(s, teststring, len, NULL) == len);
-		check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_end);
+		len = (ss->bound_end-ss->bound_start) % sizeof (teststring);
+		check (camel_stream_write (s, teststring, len, NULL) == len);
+		check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_end);
 		if (G_UNLIKELY (type == G_TYPE_INVALID)) {
-			check(camel_stream_write(s, teststring, sizeof(teststring), NULL) == 0);
-			check(camel_stream_eos(s));
-			check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_end);
+			check (camel_stream_write (s, teststring, sizeof (teststring), NULL) == 0);
+			check (camel_stream_eos (s));
+			check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_end);
 		}
 	} else {
 		/* just 10K */
 		for (i=0;i<10240;i++) {
-			check(camel_stream_write(CAMEL_STREAM(s), teststring, sizeof(teststring), NULL) == sizeof(teststring));
-			check(camel_seekable_stream_tell(CAMEL_SEEKABLE_STREAM(s)) == ss->bound_start + (i+1)*sizeof(teststring));
+			check (camel_stream_write (CAMEL_STREAM (s), teststring, sizeof (teststring), NULL) == sizeof (teststring));
+			check (camel_seekable_stream_tell (CAMEL_SEEKABLE_STREAM (s)) == ss->bound_start + (i+1)*sizeof (teststring));
 		}
 
 		/* we can't really verify any end length here */
 	}
 
-	pull();
+	pull ();
 }
 
 void
-test_seekable_substream_readpart(CamelStream *s)
+test_seekable_substream_readpart (CamelStream *s)
 {
 	CamelSeekableStream *ss = (CamelSeekableStream *)s;
 	CamelSeekableSubstream *sus = (CamelSeekableSubstream *)s;
@@ -175,64 +175,64 @@ test_seekable_substream_readpart(CamelStream *s)
 
 	push("reading substream");
 
-	check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_SET, NULL) == ss->bound_start);
-	check(camel_seekable_stream_tell(ss) == ss->bound_start);
+	check (camel_seekable_stream_seek (ss, 0, CAMEL_STREAM_SET, NULL) == ss->bound_start);
+	check (camel_seekable_stream_tell (ss) == ss->bound_start);
 
-	check(camel_seekable_stream_seek(sp, ss->bound_start, CAMEL_STREAM_SET, NULL) == ss->bound_start);
-	check(camel_seekable_stream_tell(sp) == ss->bound_start);
+	check (camel_seekable_stream_seek (sp, ss->bound_start, CAMEL_STREAM_SET, NULL) == ss->bound_start);
+	check (camel_seekable_stream_tell (sp) == ss->bound_start);
 
 	/* check writes, cross check with parent stream */
 	if (ss->bound_end != CAMEL_STREAM_UNBOUND) {
-		for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof(teststring);i++) {
-			check(camel_stream_read(s, testbuf, sizeof(teststring), NULL) == sizeof(teststring));
-			check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
-			check(camel_seekable_stream_tell(ss) == ss->bound_start + (i+1)*sizeof(teststring));
+		for (i=0;i<(ss->bound_end-ss->bound_start)/sizeof (teststring);i++) {
+			check (camel_stream_read (s, testbuf, sizeof (teststring), NULL) == sizeof (teststring));
+			check (memcmp (testbuf, teststring, sizeof (teststring)) == 0);
+			check (camel_seekable_stream_tell (ss) == ss->bound_start + (i+1)*sizeof (teststring));
 
 			/* yeah great, the substreams affect the seek ... */
-			check(camel_seekable_stream_seek(sp, ss->bound_start + (i)*sizeof(teststring), CAMEL_STREAM_SET, NULL) == ss->bound_start + i*sizeof(teststring));
-			check(camel_stream_read(CAMEL_STREAM(sp), testbuf, sizeof(teststring), NULL) == sizeof(teststring));
-			check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
-			check(camel_seekable_stream_tell(sp) == ss->bound_start + (i+1)*sizeof(teststring));
+			check (camel_seekable_stream_seek (sp, ss->bound_start + (i)*sizeof (teststring), CAMEL_STREAM_SET, NULL) == ss->bound_start + i*sizeof (teststring));
+			check (camel_stream_read (CAMEL_STREAM (sp), testbuf, sizeof (teststring), NULL) == sizeof (teststring));
+			check (memcmp (testbuf, teststring, sizeof (teststring)) == 0);
+			check (camel_seekable_stream_tell (sp) == ss->bound_start + (i+1)*sizeof (teststring));
 		}
-		len = (ss->bound_end-ss->bound_start) % sizeof(teststring);
-		check(camel_stream_read(s, testbuf, len, NULL) == len);
-		check(memcmp(testbuf, teststring, len) == 0);
-
-		check(camel_seekable_stream_seek(sp, ss->bound_end - len, CAMEL_STREAM_SET, NULL) == ss->bound_end - len);
-		check(camel_stream_read(CAMEL_STREAM(sp), testbuf, len, NULL) == len);
-		check(memcmp(testbuf, teststring, len) == 0);
-
-		check(camel_stream_eos(s));
-		check(camel_seekable_stream_tell(ss) == ss->bound_end);
-		check(camel_seekable_stream_tell(sp) == ss->bound_end);
-		check(camel_stream_read(s, testbuf, 1024, NULL) == 0);
-		check(camel_seekable_stream_tell(ss) == ss->bound_end);
-		check(camel_seekable_stream_tell(sp) == ss->bound_end);
-		check(camel_stream_eos(s));
+		len = (ss->bound_end-ss->bound_start) % sizeof (teststring);
+		check (camel_stream_read (s, testbuf, len, NULL) == len);
+		check (memcmp (testbuf, teststring, len) == 0);
+
+		check (camel_seekable_stream_seek (sp, ss->bound_end - len, CAMEL_STREAM_SET, NULL) == ss->bound_end - len);
+		check (camel_stream_read (CAMEL_STREAM (sp), testbuf, len, NULL) == len);
+		check (memcmp (testbuf, teststring, len) == 0);
+
+		check (camel_stream_eos (s));
+		check (camel_seekable_stream_tell (ss) == ss->bound_end);
+		check (camel_seekable_stream_tell (sp) == ss->bound_end);
+		check (camel_stream_read (s, testbuf, 1024, NULL) == 0);
+		check (camel_seekable_stream_tell (ss) == ss->bound_end);
+		check (camel_seekable_stream_tell (sp) == ss->bound_end);
+		check (camel_stream_eos (s));
 	} else {
 		/* just 10K */
 		for (i=0;i<10240;i++) {
-			check(camel_stream_read(s, testbuf, sizeof(teststring), NULL) == sizeof(teststring));
-			check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
-			check(camel_seekable_stream_tell(ss) == ss->bound_start + (i+1)*sizeof(teststring));
-
-			check(camel_seekable_stream_seek(sp, ss->bound_start + (i)*sizeof(teststring), CAMEL_STREAM_SET, NULL) == ss->bound_start + i*sizeof(teststring));
-			check(camel_stream_read(CAMEL_STREAM(sp), testbuf, sizeof(teststring), NULL) == sizeof(teststring));
-			check(memcmp(testbuf, teststring, sizeof(teststring)) == 0);
-			check(camel_seekable_stream_tell(sp) == ss->bound_start + (i+1)*sizeof(teststring));
+			check (camel_stream_read (s, testbuf, sizeof (teststring), NULL) == sizeof (teststring));
+			check (memcmp (testbuf, teststring, sizeof (teststring)) == 0);
+			check (camel_seekable_stream_tell (ss) == ss->bound_start + (i+1)*sizeof (teststring));
+
+			check (camel_seekable_stream_seek (sp, ss->bound_start + (i)*sizeof (teststring), CAMEL_STREAM_SET, NULL) == ss->bound_start + i*sizeof (teststring));
+			check (camel_stream_read (CAMEL_STREAM (sp), testbuf, sizeof (teststring), NULL) == sizeof (teststring));
+			check (memcmp (testbuf, teststring, sizeof (teststring)) == 0);
+			check (camel_seekable_stream_tell (sp) == ss->bound_start + (i+1)*sizeof (teststring));
 		}
 
 		/* unbound - we dont know the real length */
 #if 0
-		end = 10240*sizeof(teststring)+ss->bound_start;
+		end = 10240*sizeof (teststring)+ss->bound_start;
 
-		check(camel_seekable_stream_seek(ss, 0, CAMEL_STREAM_END) == end);
-		check(camel_seekable_stream_tell(ss) == end);
+		check (camel_seekable_stream_seek (ss, 0, CAMEL_STREAM_END) == end);
+		check (camel_seekable_stream_tell (ss) == end);
 		/* need to read 0 first to set eos */
-		check(camel_stream_read(s, testbuf, 10240) == 0);
-		check(camel_stream_eos(s));
+		check (camel_stream_read (s, testbuf, 10240) == 0);
+		check (camel_stream_eos (s));
 #endif
 	}
 
-	pull();
+	pull ();
 }
diff --git a/camel/tests/lib/streams.h b/camel/tests/lib/streams.h
index 8a82009..38d5575 100644
--- a/camel/tests/lib/streams.h
+++ b/camel/tests/lib/streams.h
@@ -1,11 +1,11 @@
 #include <camel/camel.h>
 
 /* call one, then the other on the same stream content */
-void test_stream_seekable_writepart(CamelSeekableStream *s);
-void test_stream_seekable_readpart(CamelSeekableStream *s);
+void test_stream_seekable_writepart (CamelSeekableStream *s);
+void test_stream_seekable_readpart (CamelSeekableStream *s);
 
 /* same, for substreams, multiple ways of writing */
 #define SEEKABLE_SUBSTREAM_WAYS (2)
 
-void test_seekable_substream_writepart(CamelStream *s, gint type);
-void test_seekable_substream_readpart(CamelStream *s);
+void test_seekable_substream_writepart (CamelStream *s, gint type);
+void test_seekable_substream_readpart (CamelStream *s);
diff --git a/camel/tests/message/test1.c b/camel/tests/message/test1.c
index 4b088d3..7c3b5a0 100644
--- a/camel/tests/message/test1.c
+++ b/camel/tests/message/test1.c
@@ -34,7 +34,7 @@ struct _text {
 struct _text texts[MAX_TEXTS];
 
 static void
-setup(void)
+setup (void)
 {
 	gint i, j;
 	gchar *p;
@@ -49,39 +49,39 @@ setup(void)
 	texts[3].text = "A";
 	texts[3].len = 1;
 	texts[4].text = "This is a test.\n.";
-	texts[4].len = strlen(texts[4].text);
+	texts[4].len = strlen (texts[4].text);
 	texts[5].text = "This is a test.\n\n.\n";
-	texts[5].len = strlen(texts[5].text);
-	texts[6].text = g_malloc0(1024);
+	texts[5].len = strlen (texts[5].text);
+	texts[6].text = g_malloc0 (1024);
 	texts[6].len = 1024;
-	texts[7].text = g_malloc0(102400);
+	texts[7].text = g_malloc0 (102400);
 	texts[7].len = 102400;
-	texts[8].text = g_malloc(1024);
-	memset(texts[8].text, '\n', 1024);
+	texts[8].text = g_malloc (1024);
+	memset (texts[8].text, '\n', 1024);
 	texts[8].len = 1024;
-	texts[9].text = g_malloc(102400);
-	memset(texts[9].text, '\n', 102400);
+	texts[9].text = g_malloc (102400);
+	memset (texts[9].text, '\n', 102400);
 	texts[9].len = 102400;
-	texts[10].text = g_malloc(1024);
-	memset(texts[10].text, ' ', 1024);
+	texts[10].text = g_malloc (1024);
+	memset (texts[10].text, ' ', 1024);
 	texts[10].len = 1024;
-	texts[11].text = g_malloc(102400);
-	memset(texts[11].text, ' ', 102400);
+	texts[11].text = g_malloc (102400);
+	memset (texts[11].text, ' ', 102400);
 	texts[11].len = 102400;
 
-	srand(42);
-	p = texts[12].text = g_malloc(1024);
+	srand (42);
+	p = texts[12].text = g_malloc (1024);
 	for (i=0;i<1024;i++) {
-		j = rand();
+		j = rand ();
 		if (j<RAND_MAX/120)
 			*p++ = '\n';
 		else
 			*p++ = (j % 95) + 32;
 	}
 	texts[12].len = 1024;
-	p = texts[13].text = g_malloc(102400);
+	p = texts[13].text = g_malloc (102400);
 	for (i=0;i<102400;i++) {
-		j = rand();
+		j = rand ();
 		if (j<RAND_MAX/120)
 			*p++ = '\n';
 		else
@@ -90,25 +90,25 @@ setup(void)
 	texts[13].len = 102400;
 }
 
-static void cleanup(void)
+static void cleanup (void)
 {
 	gint i;
 
 	for (i=6;i<14;i++) {
-		g_free(texts[i].text);
+		g_free (texts[i].text);
 	}
 }
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelMimeMessage *msg, *msg2;
 	gint i, j;
 	gchar *text;
 	gint len;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
-	setup();
+	setup ();
 
 	camel_test_start("Simple memory-based content creation");
 
@@ -119,38 +119,38 @@ gint main(gint argc, gchar **argv)
 		len = texts[j].len;
 		for (i=0;i<SET_CONTENT_WAYS;i++) {
 			push("create simple message %d", i);
-			msg = test_message_create_simple();
+			msg = test_message_create_simple ();
 
 			push("set simple content");
 			test_message_set_content_simple((CamelMimePart *)msg, i, "text/plain", text, len);
-			pull();
+			pull ();
 
 			push("compare original content");
-			test_message_compare_content(camel_medium_get_content ((CamelMedium *)msg), text, len);
-			pull();
+			test_message_compare_content (camel_medium_get_content ((CamelMedium *)msg), text, len);
+			pull ();
 
 			push("save message to test1.msg");
 			unlink("test1.msg");
 			test_message_write_file(msg, "test1.msg");
-			check_unref(msg, 1);
-			pull();
+			check_unref (msg, 1);
+			pull ();
 
 			push("read from test1.msg");
 			msg2 = test_message_read_file("test1.msg");
-			pull();
+			pull ();
 
 			push("compare read with original content");
-			test_message_compare_content(camel_medium_get_content ((CamelMedium *)msg2), text, len);
-			check_unref(msg2, 1);
-			pull();
+			test_message_compare_content (camel_medium_get_content ((CamelMedium *)msg2), text, len);
+			check_unref (msg2, 1);
+			pull ();
 
 			unlink("test1.msg");
-			pull();
+			pull ();
 		}
-		pull();
+		pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	camel_test_start("Different encodings");
 	for (j=0;j<MAX_TEXTS;j++) {
@@ -160,37 +160,37 @@ gint main(gint argc, gchar **argv)
 		for (i=0;i<CAMEL_TRANSFER_NUM_ENCODINGS;i++) {
 
 			push("test simple message, encoding %s", camel_transfer_encoding_to_string(i));
-			msg = test_message_create_simple();
+			msg = test_message_create_simple ();
 
 			push("set simple content");
 			test_message_set_content_simple((CamelMimePart *)msg, 0, "text/plain", text, len);
-			pull();
+			pull ();
 
-			camel_mime_part_set_encoding((CamelMimePart *)msg, i);
+			camel_mime_part_set_encoding ((CamelMimePart *)msg, i);
 
 			push("save message to test1.msg");
 			unlink("test1.msg");
 			test_message_write_file(msg, "test1.msg");
-			check_unref(msg, 1);
-			pull();
+			check_unref (msg, 1);
+			pull ();
 
 			push("read from test1.msg");
 			msg2 = test_message_read_file("test1.msg");
-			pull();
+			pull ();
 
 			push("compare read with original content");
-			test_message_compare_content(camel_medium_get_content ((CamelMedium *)msg2), text, len);
-			check_unref(msg2, 1);
-			pull();
+			test_message_compare_content (camel_medium_get_content ((CamelMedium *)msg2), text, len);
+			check_unref (msg2, 1);
+			pull ();
 
 			unlink("test1.msg");
-			pull();
+			pull ();
 		}
-		pull();
+		pull ();
 	}
-	camel_test_end();
+	camel_test_end ();
 
-	cleanup();
+	cleanup ();
 
 	return 0;
 }
diff --git a/camel/tests/message/test2.c b/camel/tests/message/test2.c
index 8b691ad..969f08c 100644
--- a/camel/tests/message/test2.c
+++ b/camel/tests/message/test2.c
@@ -11,35 +11,35 @@
 
 #include "address-data.h"
 
-static gchar *convert(const gchar *in, const gchar *from, const gchar *to)
+static gchar *convert (const gchar *in, const gchar *from, const gchar *to)
 {
-	iconv_t ic = iconv_open(to, from);
+	iconv_t ic = iconv_open (to, from);
 	gchar *out, *outp;
 	const gchar *inp;
 	gsize inlen, outlen;
 
 	if (ic == (iconv_t)-1)
-		return g_strdup(in);
+		return g_strdup (in);
 
-	inlen = strlen(in);
+	inlen = strlen (in);
 	outlen = inlen*5 + 16;
 
-	outp = out = g_malloc(outlen);
+	outp = out = g_malloc (outlen);
 	inp = in;
 
-	if (iconv(ic, &inp, &inlen, &outp, &outlen) == -1) {
-		test_free(out);
-		iconv_close(ic);
-		return g_strdup(in);
+	if (iconv (ic, &inp, &inlen, &outp, &outlen) == -1) {
+		test_free (out);
+		iconv_close (ic);
+		return g_strdup (in);
 	}
 
-	if (iconv(ic, NULL, 0, &outp, &outlen) == -1) {
-		test_free(out);
-		iconv_close(ic);
-		return g_strdup(in);
+	if (iconv (ic, NULL, 0, &outp, &outlen) == -1) {
+		test_free (out);
+		iconv_close (ic);
+		return g_strdup (in);
 	}
 
-	iconv_close(ic);
+	iconv_close (ic);
 
 	*outp = 0;
 
@@ -47,26 +47,26 @@ static gchar *convert(const gchar *in, const gchar *from, const gchar *to)
 	/* lets see if we can convert back again? */
 	{
 		gchar *nout, *noutp;
-		iconv_t ic = iconv_open(from, to);
+		iconv_t ic = iconv_open (from, to);
 
 		if (ic == (iconv_t)-1)
 			goto fail;
 
 		inp = out;
-		inlen = strlen(out);
+		inlen = strlen (out);
 		outlen = inlen*5 + 16;
-		noutp = nout = g_malloc(outlen);
-		if (iconv(ic, &inp, &inlen, &noutp, &outlen) == -1
-		    || iconv(ic, NULL, 0, &noutp, &outlen) == -1) {
+		noutp = nout = g_malloc (outlen);
+		if (iconv (ic, &inp, &inlen, &noutp, &outlen) == -1
+		    || iconv (ic, NULL, 0, &noutp, &outlen) == -1) {
 			g_warning("Cannot convert '%s' \n from %s to %s: %s\n", in, to, from, g_strerror(errno));
 		}
-		iconv_close(ic);
+		iconv_close (ic);
 	}
 
 	/* and lets see what camel thinks out optimal charset is */
 	{
 		printf("Camel thinks the best encoding of '%s' is %s, although we converted from %s\n",
-		       in, camel_charset_best(out, strlen(out)), from);
+		       in, camel_charset_best (out, strlen (out)), from);
 	}
 fail:
 #endif
@@ -77,7 +77,7 @@ fail:
 #define to_utf8(in, type) convert(in, type, "utf-8")
 #define from_utf8(in, type) convert(in, "utf-8", type)
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	gint i;
 	CamelInternetAddress *addr, *addr2;
@@ -86,52 +86,52 @@ gint main(gint argc, gchar **argv)
 	const gchar *real, *where;
 	gchar *enc, *enc2, *format, *format2;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("CamelInternetAddress, basics");
 
-	addr = camel_internet_address_new();
+	addr = camel_internet_address_new ();
 
 	push("Test blank address");
-	check(camel_address_length(CAMEL_ADDRESS(addr)) == 0);
-	check(camel_internet_address_get(addr, 0, &real, &where) == FALSE);
-	pull();
+	check (camel_address_length (CAMEL_ADDRESS (addr)) == 0);
+	check (camel_internet_address_get (addr, 0, &real, &where) == FALSE);
+	pull ();
 
 	push("Test blank clone");
-	addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
-	test_address_compare(addr, addr2);
-	check_unref(addr2, 1);
-	pull();
+	addr2 = CAMEL_INTERNET_ADDRESS (camel_address_new_clone (CAMEL_ADDRESS (addr)));
+	test_address_compare (addr, addr2);
+	check_unref (addr2, 1);
+	pull ();
 
 	push("Test add 1");
 	camel_internet_address_add(addr, "Zed", "nowhere here com au");
-	check(camel_address_length(CAMEL_ADDRESS(addr)) == 1);
-	check(camel_internet_address_get(addr, 0, &real, &where) == TRUE);
+	check (camel_address_length (CAMEL_ADDRESS (addr)) == 1);
+	check (camel_internet_address_get (addr, 0, &real, &where) == TRUE);
 	check_msg(string_equal("Zed", real), "real = '%s'", real);
 	check(strcmp(where, "nowhere here com au") == 0);
-	pull();
+	pull ();
 
 	push("Test clone 1");
-	addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
-	test_address_compare(addr, addr2);
-	check_unref(addr2, 1);
-	pull();
+	addr2 = CAMEL_INTERNET_ADDRESS (camel_address_new_clone (CAMEL_ADDRESS (addr)));
+	test_address_compare (addr, addr2);
+	check_unref (addr2, 1);
+	pull ();
 
 	push("Test add many");
 	for (i=1;i<10;i++) {
 		gchar name[16], a[32];
 		sprintf(name, "Zed %d", i);
 		sprintf(a, "nowhere here-%d com au", i);
-		camel_internet_address_add(addr, name, a);
-		check(camel_address_length(CAMEL_ADDRESS(addr)) == i+1);
-		check(camel_internet_address_get(addr, i, &real, &where) == TRUE);
+		camel_internet_address_add (addr, name, a);
+		check (camel_address_length (CAMEL_ADDRESS (addr)) == i+1);
+		check (camel_internet_address_get (addr, i, &real, &where) == TRUE);
 		check_msg(string_equal(name, real), "name = '%s' real = '%s'", name, real);
-		check(strcmp(where, a) == 0);
+		check (strcmp (where, a) == 0);
 	}
-	pull();
+	pull ();
 
 	/* put a few of these in to make it look like its doing something impressive ... :) */
-	camel_test_end();
+	camel_test_end ();
 	camel_test_start("CamelInternetAddress, search");
 
 	push("Test search");
@@ -154,168 +154,168 @@ gint main(gint argc, gchar **argv)
 	check(camel_internet_address_find_address(addr, "nowhere here-20 com au ", &where) == -1);
 	check(camel_internet_address_find_address(addr, "", &where) == -1);
 	/*check(camel_internet_address_find_address(addr, NULL, &where) == -1);*/
-	camel_test_fatal();
-	pull();
+	camel_test_fatal ();
+	pull ();
 
-	camel_test_end();
+	camel_test_end ();
 	camel_test_start("CamelInternetAddress, copy/cat/clone");
 
 	push("Test clone many");
-	addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
-	test_address_compare(addr, addr2);
-	pull();
+	addr2 = CAMEL_INTERNET_ADDRESS (camel_address_new_clone (CAMEL_ADDRESS (addr)));
+	test_address_compare (addr, addr2);
+	pull ();
 
 	push("Test remove items");
-	camel_address_remove(CAMEL_ADDRESS(addr2), 0);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 9);
-	camel_address_remove(CAMEL_ADDRESS(addr2), 0);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 8);
-	camel_address_remove(CAMEL_ADDRESS(addr2), 5);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 7);
-	camel_address_remove(CAMEL_ADDRESS(addr2), 10);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 7);
-	camel_address_remove(CAMEL_ADDRESS(addr2), -1);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 0);
-	check_unref(addr2, 1);
-	pull();
+	camel_address_remove (CAMEL_ADDRESS (addr2), 0);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 9);
+	camel_address_remove (CAMEL_ADDRESS (addr2), 0);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 8);
+	camel_address_remove (CAMEL_ADDRESS (addr2), 5);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 7);
+	camel_address_remove (CAMEL_ADDRESS (addr2), 10);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 7);
+	camel_address_remove (CAMEL_ADDRESS (addr2), -1);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 0);
+	check_unref (addr2, 1);
+	pull ();
 
 	push("Testing copy/cat");
 	push("clone + cat");
-	addr2 = CAMEL_INTERNET_ADDRESS(camel_address_new_clone(CAMEL_ADDRESS(addr)));
-	camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
-	check(camel_address_length(CAMEL_ADDRESS(addr)) == 10);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 20);
-	check_unref(addr2, 1);
-	pull();
+	addr2 = CAMEL_INTERNET_ADDRESS (camel_address_new_clone (CAMEL_ADDRESS (addr)));
+	camel_address_cat (CAMEL_ADDRESS (addr2), CAMEL_ADDRESS (addr));
+	check (camel_address_length (CAMEL_ADDRESS (addr)) == 10);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 20);
+	check_unref (addr2, 1);
+	pull ();
 
 	push("cat + cat + copy");
-	addr2 = camel_internet_address_new();
-	camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
-	test_address_compare(addr, addr2);
-	camel_address_cat(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
-	check(camel_address_length(CAMEL_ADDRESS(addr)) == 10);
-	check(camel_address_length(CAMEL_ADDRESS(addr2)) == 20);
-	camel_address_copy(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
-	test_address_compare(addr, addr2);
-	check_unref(addr2, 1);
-	pull();
+	addr2 = camel_internet_address_new ();
+	camel_address_cat (CAMEL_ADDRESS (addr2), CAMEL_ADDRESS (addr));
+	test_address_compare (addr, addr2);
+	camel_address_cat (CAMEL_ADDRESS (addr2), CAMEL_ADDRESS (addr));
+	check (camel_address_length (CAMEL_ADDRESS (addr)) == 10);
+	check (camel_address_length (CAMEL_ADDRESS (addr2)) == 20);
+	camel_address_copy (CAMEL_ADDRESS (addr2), CAMEL_ADDRESS (addr));
+	test_address_compare (addr, addr2);
+	check_unref (addr2, 1);
+	pull ();
 
 	push("copy");
-	addr2 = camel_internet_address_new();
-	camel_address_copy(CAMEL_ADDRESS(addr2), CAMEL_ADDRESS(addr));
-	test_address_compare(addr, addr2);
-	check_unref(addr2, 1);
-	pull();
+	addr2 = camel_internet_address_new ();
+	camel_address_copy (CAMEL_ADDRESS (addr2), CAMEL_ADDRESS (addr));
+	test_address_compare (addr, addr2);
+	check_unref (addr2, 1);
+	pull ();
 
-	pull();
+	pull ();
 
-	check_unref(addr, 1);
+	check_unref (addr, 1);
 
-	camel_test_end();
+	camel_test_end ();
 
 	camel_test_start("CamelInternetAddress, I18N");
 
 	for (i = 0;i < G_N_ELEMENTS (test_lines); i++) {
 		push("Testing text line %d (%s) '%s'", i, test_lines[i].type, test_lines[i].line);
 
-		addr = camel_internet_address_new();
+		addr = camel_internet_address_new ();
 
 		/* first, convert to api format (utf-8) */
 		charset = test_lines[i].type;
-		name = to_utf8(test_lines[i].line, charset);
+		name = to_utf8 (test_lines[i].line, charset);
 
 		push("Address setup");
 		camel_internet_address_add(addr, name, "nobody nowhere com");
-		check(camel_internet_address_get(addr, 0, &real, &where) == TRUE);
+		check (camel_internet_address_get (addr, 0, &real, &where) == TRUE);
 		check_msg(string_equal(name, real), "name = '%s' real = '%s'", name, real);
 		check(strcmp(where, "nobody nowhere com") == 0);
-		test_free(name);
+		test_free (name);
 
-		check(camel_internet_address_get(addr, 1, &real, &where) == FALSE);
-		check(camel_address_length(CAMEL_ADDRESS(addr)) == 1);
-		pull();
+		check (camel_internet_address_get (addr, 1, &real, &where) == FALSE);
+		check (camel_address_length (CAMEL_ADDRESS (addr)) == 1);
+		pull ();
 
 		push("Address encode/decode");
-		enc = camel_address_encode(CAMEL_ADDRESS(addr));
+		enc = camel_address_encode (CAMEL_ADDRESS (addr));
 
-		addr2 = camel_internet_address_new();
-		check(camel_address_decode(CAMEL_ADDRESS(addr2), enc) == 1);
-		check(camel_address_length(CAMEL_ADDRESS(addr2)) == 1);
+		addr2 = camel_internet_address_new ();
+		check (camel_address_decode (CAMEL_ADDRESS (addr2), enc) == 1);
+		check (camel_address_length (CAMEL_ADDRESS (addr2)) == 1);
 
-		enc2 = camel_address_encode(CAMEL_ADDRESS(addr2));
+		enc2 = camel_address_encode (CAMEL_ADDRESS (addr2));
 		check_msg(string_equal(enc, enc2), "enc = '%s' enc2 = '%s'", enc, enc2);
-		test_free(enc2);
+		test_free (enc2);
 
 		push("Compare addresses");
-		test_address_compare(addr, addr2);
-		pull();
-		check_unref(addr2, 1);
-		test_free(enc);
-		pull();
+		test_address_compare (addr, addr2);
+		pull ();
+		check_unref (addr2, 1);
+		test_free (enc);
+		pull ();
 
 		/* FIXME: format/unformat arne't guaranteed to be reversible, at least at the moment */
 		camel_test_nonfatal("format/unformat not (yet) reversible for all cases");
 
 		push("Address format/unformat");
-		format = camel_address_format(CAMEL_ADDRESS(addr));
+		format = camel_address_format (CAMEL_ADDRESS (addr));
 
-		addr2 = camel_internet_address_new();
-		check(camel_address_unformat(CAMEL_ADDRESS(addr2), format) == 1);
-		check(camel_address_length(CAMEL_ADDRESS(addr2)) == 1);
+		addr2 = camel_internet_address_new ();
+		check (camel_address_unformat (CAMEL_ADDRESS (addr2), format) == 1);
+		check (camel_address_length (CAMEL_ADDRESS (addr2)) == 1);
 
-		format2 = camel_address_format(CAMEL_ADDRESS(addr2));
+		format2 = camel_address_format (CAMEL_ADDRESS (addr2));
 		check_msg(string_equal(format, format2), "format = '%s\n\tformat2 = '%s'", format, format2);
-		test_free(format2);
+		test_free (format2);
 
 		/* currently format/unformat doesn't handle ,'s and other special chars at all */
-		if (camel_address_length(CAMEL_ADDRESS(addr2)) == 1) {
+		if (camel_address_length (CAMEL_ADDRESS (addr2)) == 1) {
 			push("Compare addresses");
-			test_address_compare(addr, addr2);
-			pull();
+			test_address_compare (addr, addr2);
+			pull ();
 		}
 
-		test_free(format);
-		pull();
+		test_free (format);
+		pull ();
 
-		camel_test_fatal();
+		camel_test_fatal ();
 
-		check_unref(addr2, 1);
+		check_unref (addr2, 1);
 
-		check_unref(addr, 1);
-		pull();
+		check_unref (addr, 1);
+		pull ();
 
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	camel_test_start("CamelInternetAddress, I18N decode");
 
 	for (i = 0; i < G_N_ELEMENTS (test_address); i++) {
 		push("Testing address line %d '%s'", i, test_address[i].addr);
 
-		addr = camel_internet_address_new();
+		addr = camel_internet_address_new ();
 		push("checking decoded");
-		check(camel_address_decode(CAMEL_ADDRESS(addr), test_address[i].addr) == test_address[i].count);
-		format = camel_address_format(CAMEL_ADDRESS(addr));
-		check(strcmp(format, test_address[i].utf8) == 0);
-		test_free(format);
-		pull();
+		check (camel_address_decode (CAMEL_ADDRESS (addr), test_address[i].addr) == test_address[i].count);
+		format = camel_address_format (CAMEL_ADDRESS (addr));
+		check (strcmp (format, test_address[i].utf8) == 0);
+		test_free (format);
+		pull ();
 
 		push("Comparing re-encoded output");
-		addr2 = CAMEL_INTERNET_ADDRESS(camel_internet_address_new());
-		enc = camel_address_encode(CAMEL_ADDRESS(addr));
+		addr2 = CAMEL_INTERNET_ADDRESS (camel_internet_address_new ());
+		enc = camel_address_encode (CAMEL_ADDRESS (addr));
 		check_msg(camel_address_decode(CAMEL_ADDRESS(addr2), enc) == test_address[i].count, "enc = '%s'", enc);
-		test_free(enc);
-		test_address_compare(addr, addr2);
-		check_unref(addr2, 1);
-		pull();
+		test_free (enc);
+		test_address_compare (addr, addr2);
+		check_unref (addr2, 1);
+		pull ();
 
-		check_unref(addr, 1);
+		check_unref (addr, 1);
 
-		pull();
+		pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	/* FIXME: Add test of decoding of broken addresses */
 
diff --git a/camel/tests/message/test3.c b/camel/tests/message/test3.c
index b10a8a3..8e1e0ff 100644
--- a/camel/tests/message/test3.c
+++ b/camel/tests/message/test3.c
@@ -10,116 +10,116 @@
 #include <unistd.h>
 #include <string.h>
 
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	CamelMimeMessage *msg, *msg2, *msg3;
 	CamelMultipart *mp, *mp2;
 	CamelMimePart *part, *part2, *part3;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("multipart message");
 
 	push("building message");
-	msg = test_message_create_simple();
-	mp = camel_multipart_new();
+	msg = test_message_create_simple ();
+	mp = camel_multipart_new ();
 
 	/* Hrm, this should be able to set its own boundary, no? */
 	camel_multipart_set_boundary(mp, "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D");
 	check(strcmp(camel_multipart_get_boundary(mp), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
 
 	camel_medium_set_content ((CamelMedium *)msg, (CamelDataWrapper *)mp);
-	check(camel_multipart_get_number(mp) == 0);
-	check(camel_multipart_get_part(mp, 0) == NULL);
-	check(camel_multipart_get_part(mp, 1) == NULL);
+	check (camel_multipart_get_number (mp) == 0);
+	check (camel_multipart_get_part (mp, 0) == NULL);
+	check (camel_multipart_get_part (mp, 1) == NULL);
 
 	push("adding/removing parts");
-	part = camel_mime_part_new();
+	part = camel_mime_part_new ();
 	test_message_set_content_simple(part, 0, "text/plain", "content part 1", strlen("content part 1"));
-	camel_multipart_add_part(mp, part);
-	check(G_OBJECT(part)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 1);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	camel_multipart_remove_part(mp, part);
-	check(G_OBJECT(part)->ref_count == 1);
-	check(camel_multipart_get_number(mp) == 0);
-	check(camel_multipart_get_part(mp, 0) == NULL);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	camel_multipart_add_part_at(mp, part, 0);
-	check(G_OBJECT(part)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 1);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	check(camel_multipart_remove_part_at(mp, 1) == NULL);
-	check(G_OBJECT(part)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 1);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	check(camel_multipart_remove_part_at(mp, 0) == part);
-	check(G_OBJECT(part)->ref_count == 1);
-	check(camel_multipart_get_number(mp) == 0);
-	check(camel_multipart_get_part(mp, 0) == NULL);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	camel_multipart_add_part(mp, part);
-	check(G_OBJECT(part)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 1);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == NULL);
-
-	part2 = camel_mime_part_new();
+	camel_multipart_add_part (mp, part);
+	check (G_OBJECT (part)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 1);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	camel_multipart_remove_part (mp, part);
+	check (G_OBJECT (part)->ref_count == 1);
+	check (camel_multipart_get_number (mp) == 0);
+	check (camel_multipart_get_part (mp, 0) == NULL);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	camel_multipart_add_part_at (mp, part, 0);
+	check (G_OBJECT (part)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 1);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	check (camel_multipart_remove_part_at (mp, 1) == NULL);
+	check (G_OBJECT (part)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 1);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	check (camel_multipart_remove_part_at (mp, 0) == part);
+	check (G_OBJECT (part)->ref_count == 1);
+	check (camel_multipart_get_number (mp) == 0);
+	check (camel_multipart_get_part (mp, 0) == NULL);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	camel_multipart_add_part (mp, part);
+	check (G_OBJECT (part)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 1);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == NULL);
+
+	part2 = camel_mime_part_new ();
 	test_message_set_content_simple(part2, 0, "text/plain", "content part 2", strlen("content part 2"));
-	camel_multipart_add_part(mp, part2);
-	check(G_OBJECT(part2)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 2);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == part2);
+	camel_multipart_add_part (mp, part2);
+	check (G_OBJECT (part2)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 2);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == part2);
 
-	part3 = camel_mime_part_new();
+	part3 = camel_mime_part_new ();
 	test_message_set_content_simple(part3, 0, "text/plain", "content part 3", strlen("content part 3"));
-	camel_multipart_add_part_at(mp, part3, 1);
-	check(G_OBJECT(part3)->ref_count == 2);
-	check(camel_multipart_get_number(mp) == 3);
-	check(camel_multipart_get_part(mp, 0) == part);
-	check(camel_multipart_get_part(mp, 1) == part3);
-	check(camel_multipart_get_part(mp, 2) == part2);
-	pull();
+	camel_multipart_add_part_at (mp, part3, 1);
+	check (G_OBJECT (part3)->ref_count == 2);
+	check (camel_multipart_get_number (mp) == 3);
+	check (camel_multipart_get_part (mp, 0) == part);
+	check (camel_multipart_get_part (mp, 1) == part3);
+	check (camel_multipart_get_part (mp, 2) == part2);
+	pull ();
 
 	push("save message to test3.msg");
 	unlink("test3.msg");
 	test_message_write_file(msg, "test3.msg");
-	pull();
+	pull ();
 
 	push("read from test3.msg");
 	msg2 = test_message_read_file("test3.msg");
-	pull();
+	pull ();
 
 	push("compre content of multipart");
 	mp2 = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)msg2);
-	check(mp2 != NULL);
-	check(CAMEL_IS_MULTIPART(mp2));
-	check(camel_multipart_get_number(mp2) == 3);
+	check (mp2 != NULL);
+	check (CAMEL_IS_MULTIPART (mp2));
+	check (camel_multipart_get_number (mp2) == 3);
 
 	check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
-	check(mp2->preface == NULL || strlen(mp2->preface) == 0);
+	check (mp2->preface == NULL || strlen (mp2->preface) == 0);
 
 	/* FIXME */
 	camel_test_nonfatal("postface may gain a single \\n?");
 	check_msg(mp2->postface == NULL || strlen(mp2->postface) == 0, "postface: '%s'", mp2->postface);
-	camel_test_fatal();
+	camel_test_fatal ();
 
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
 				     "content part 1", strlen("content part 1"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
 				     "content part 3", strlen("content part 3"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
 				     "content part 2", strlen("content part 2"));
-	pull();
+	pull ();
 
 	push("writing again, & re-reading");
 	unlink("test3-2.msg");
@@ -128,26 +128,26 @@ gint main(gint argc, gchar **argv)
 
 	push("comparing again");
 	mp2 = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)msg3);
-	check(mp2 != NULL);
-	check(CAMEL_IS_MULTIPART(mp2));
-	check(camel_multipart_get_number(mp2) == 3);
+	check (mp2 != NULL);
+	check (CAMEL_IS_MULTIPART (mp2));
+	check (camel_multipart_get_number (mp2) == 3);
 
 	check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
-	check(mp2->preface == NULL || strlen(mp2->preface) == 0);
+	check (mp2->preface == NULL || strlen (mp2->preface) == 0);
 
 	check_msg(mp2->postface == NULL || strlen(mp2->postface) == 0, "postface: '%s'", mp2->postface);
 
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
 				     "content part 1", strlen("content part 1"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
 				     "content part 3", strlen("content part 3"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
 				     "content part 2", strlen("content part 2"));
-	pull();
-	pull();
+	pull ();
+	pull ();
 
-	check_unref(msg2, 1);
-	check_unref(msg3, 1);
+	check_unref (msg2, 1);
+	check_unref (msg3, 1);
 
 	push("testing pre/post text");
 	camel_multipart_set_preface(mp, "pre-text\nLines.");
@@ -162,30 +162,30 @@ gint main(gint argc, gchar **argv)
 	msg2 = test_message_read_file("test3-3.msg");
 
 	mp2 = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)msg2);
-	check(mp2 != NULL);
-	check(CAMEL_IS_MULTIPART(mp2));
-	check(camel_multipart_get_number(mp2) == 3);
+	check (mp2 != NULL);
+	check (CAMEL_IS_MULTIPART (mp2));
+	check (camel_multipart_get_number (mp2) == 3);
 
 	check(strcmp(camel_multipart_get_boundary(mp2), "_=,.XYZ_Kangaroo_Meat_is_!_ABADF00D") == 0);
 	check(mp2->preface && strcmp(mp2->preface, "pre-text\nLines.") == 0);
 	check(mp2->postface && strcmp(mp2->postface, "post-text, no lines.\nOne line.\n") == 0);
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 0))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 0))),
 					   "content part 1", strlen("content part 1"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 1))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 1))),
 				     "content part 3", strlen("content part 3"));
-	test_message_compare_content(camel_medium_get_content (CAMEL_MEDIUM(camel_multipart_get_part(mp2, 2))),
+	test_message_compare_content (camel_medium_get_content (CAMEL_MEDIUM (camel_multipart_get_part (mp2, 2))),
 				     "content part 2", strlen("content part 2"));
-	pull();
-	check_unref(msg2, 1);
-	pull();
+	pull ();
+	check_unref (msg2, 1);
+	pull ();
 
-	check_unref(msg, 1);
-	check_unref(mp, 1);
-	check_unref(part, 1);
-	check_unref(part2, 1);
-	check_unref(part3, 1);
+	check_unref (msg, 1);
+	check_unref (mp, 1);
+	check_unref (part, 1);
+	check_unref (part2, 1);
+	check_unref (part3, 1);
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/mime-filter/test-charset.c b/camel/tests/mime-filter/test-charset.c
index 84d7045..7aaf5b4 100644
--- a/camel/tests/mime-filter/test-charset.c
+++ b/camel/tests/mime-filter/test-charset.c
@@ -28,7 +28,7 @@ main (gint argc, gchar **argv)
 	gint i, test = 0;
 	DIR *dir;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	dir = opendir (SOURCEDIR);
 	if (!dir)
diff --git a/camel/tests/mime-filter/test-crlf.c b/camel/tests/mime-filter/test-crlf.c
index 1f2be6b..4f46530 100644
--- a/camel/tests/mime-filter/test-crlf.c
+++ b/camel/tests/mime-filter/test-crlf.c
@@ -33,7 +33,7 @@ main (gint argc, gchar **argv)
 	gint comp_i;
 	gchar comp_correct[CHUNK_SIZE], comp_filter[CHUNK_SIZE];
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	for (i = 0; i < NUM_CASES; i++) {
 		gint j;
diff --git a/camel/tests/mime-filter/test-tohtml.c b/camel/tests/mime-filter/test-tohtml.c
index 4fd9d7c..bed97af 100644
--- a/camel/tests/mime-filter/test-tohtml.c
+++ b/camel/tests/mime-filter/test-tohtml.c
@@ -19,7 +19,7 @@
 #define CHUNK_SIZE 4096
 
 static void
-test_filter(CamelMimeFilter *f, const gchar *inname, const gchar *outname)
+test_filter (CamelMimeFilter *f, const gchar *inname, const gchar *outname)
 {
 	CamelStream *in, *out;
 	CamelStream *indisk, *outdisk, *filter;
@@ -31,16 +31,16 @@ test_filter(CamelMimeFilter *f, const gchar *inname, const gchar *outname)
 
 	camel_test_push("setup");
 
-	indisk = camel_stream_fs_new_with_name(inname, O_RDONLY, 0, NULL);
-	check(indisk);
-	outdisk = camel_stream_fs_new_with_name(outname, O_RDONLY, 0, NULL);
-	check(outdisk);
+	indisk = camel_stream_fs_new_with_name (inname, O_RDONLY, 0, NULL);
+	check (indisk);
+	outdisk = camel_stream_fs_new_with_name (outname, O_RDONLY, 0, NULL);
+	check (outdisk);
 
 	byte_array_out = g_byte_array_new ();
 	out = camel_stream_mem_new_with_byte_array (byte_array_out);
-	check(camel_stream_write_to_stream(outdisk, out, NULL) > 0);
+	check (camel_stream_write_to_stream (outdisk, out, NULL) > 0);
 
-	camel_test_pull();
+	camel_test_pull ();
 
 	camel_test_push("reading through filter stream");
 
@@ -48,55 +48,55 @@ test_filter(CamelMimeFilter *f, const gchar *inname, const gchar *outname)
 	in = camel_stream_mem_new_with_byte_array (byte_array_in);
 
 	filter = camel_stream_filter_new (indisk);
-	check_count(indisk, 2);
-	id = camel_stream_filter_add((CamelStreamFilter *)filter, f);
-	check_count(f, 2);
+	check_count (indisk, 2);
+	id = camel_stream_filter_add ((CamelStreamFilter *)filter, f);
+	check_count (f, 2);
 
-	check(camel_stream_write_to_stream(filter, in, NULL) > 0);
-	check_msg(byte_array_in->len == byte_array_out->len
-		  && memcmp(byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
+	check (camel_stream_write_to_stream (filter, in, NULL) > 0);
+	check_msg (byte_array_in->len == byte_array_out->len
+		  && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
 		  "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
 		  byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
 
-	camel_test_pull();
+	camel_test_pull ();
 
-	camel_stream_filter_remove((CamelStreamFilter *)filter, id);
-	check_count(f, 1);
-	camel_mime_filter_reset(f);
+	camel_stream_filter_remove ((CamelStreamFilter *)filter, id);
+	check_count (f, 1);
+	camel_mime_filter_reset (f);
 
-	check_unref(filter, 1);
-	check_count(indisk, 1);
-	check_count(f, 1);
-	check_unref(in, 1);
+	check_unref (filter, 1);
+	check_count (indisk, 1);
+	check_count (f, 1);
+	check_unref (in, 1);
 
-	check(camel_stream_reset(indisk, NULL) == 0);
+	check (camel_stream_reset (indisk, NULL) == 0);
 
 	camel_test_push("writing through filter stream");
 
 	byte_array_in = g_byte_array_new ();
 	in = camel_stream_mem_new_with_byte_array (byte_array_in);
 	filter = camel_stream_filter_new (in);
-	check_count(in, 2);
-	id = camel_stream_filter_add((CamelStreamFilter *)filter, f);
-	check_count(f, 2);
-
-	check(camel_stream_write_to_stream(indisk, filter, NULL) > 0);
-	check(camel_stream_flush(filter, NULL) == 0);
-	check_msg(byte_array_in->len == byte_array_out->len
-		  && memcmp(byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
+	check_count (in, 2);
+	id = camel_stream_filter_add ((CamelStreamFilter *)filter, f);
+	check_count (f, 2);
+
+	check (camel_stream_write_to_stream (indisk, filter, NULL) > 0);
+	check (camel_stream_flush (filter, NULL) == 0);
+	check_msg (byte_array_in->len == byte_array_out->len
+		  && memcmp (byte_array_in->data, byte_array_out->data, byte_array_in->len) == 0,
 		  "Buffer content mismatch, %d != %d, in = '%.*s' != out = '%.*s'", byte_array_in->len, byte_array_out->len,
 		  byte_array_in->len, byte_array_in->data, byte_array_out->len, byte_array_out->data);
 
-	camel_stream_filter_remove((CamelStreamFilter *)filter, id);
-	check_unref(filter, 1);
-	check_unref(in, 1);
-	check_unref(indisk, 1);
-	check_unref(outdisk, 1);
-	check_unref(out, 1);
+	camel_stream_filter_remove ((CamelStreamFilter *)filter, id);
+	check_unref (filter, 1);
+	check_unref (in, 1);
+	check_unref (indisk, 1);
+	check_unref (outdisk, 1);
+	check_unref (out, 1);
 
-	camel_test_pull();
+	camel_test_pull ();
 
-	camel_test_pull();
+	camel_test_pull ();
 }
 
 gint
@@ -104,7 +104,7 @@ main (gint argc, gchar **argv)
 {
 	gint i;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("HTML Stream filtering");
 
@@ -116,17 +116,17 @@ main (gint argc, gchar **argv)
 		sprintf(inname, "data/html.%d.in", i);
 		sprintf(outname, "data/html.%d.out", i);
 
-		if (g_stat(inname, &st) == -1)
+		if (g_stat (inname, &st) == -1)
 			break;
 
-		f = camel_mime_filter_tohtml_new(CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
+		f = camel_mime_filter_tohtml_new (CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
 
-		test_filter(f, inname, outname);
+		test_filter (f, inname, outname);
 
-		check_unref(f, 1);
+		check_unref (f, 1);
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/mime-filter/test1.c b/camel/tests/mime-filter/test1.c
index 80e0ac8..a69107e 100644
--- a/camel/tests/mime-filter/test1.c
+++ b/camel/tests/mime-filter/test1.c
@@ -55,7 +55,7 @@ main (gint argc, gchar **argv)
 	CamelMimeFilter *sh;
 	gint i;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("canonicalisation filter tests");
 
@@ -75,31 +75,31 @@ main (gint argc, gchar **argv)
 			byte_array = g_byte_array_new ();
 			out = camel_stream_mem_new_with_byte_array (byte_array);
 			filter = camel_stream_filter_new (out);
-			sh = camel_mime_filter_canon_new(tests[i].flags);
-			check(camel_stream_filter_add(filter, sh) != -1);
-			check_unref(sh, 2);
+			sh = camel_mime_filter_canon_new (tests[i].flags);
+			check (camel_stream_filter_add (filter, sh) != -1);
+			check_unref (sh, 2);
 
 			p = tests[i].in;
 			while (*p) {
-				gint w = MIN(strlen(p), step);
+				gint w = MIN (strlen (p), step);
 
-				check(camel_stream_write((CamelStream *)filter, p, w, NULL) == w);
+				check (camel_stream_write ((CamelStream *)filter, p, w, NULL) == w);
 				p += w;
 			}
-			camel_stream_flush((CamelStream *)filter, NULL);
+			camel_stream_flush ((CamelStream *)filter, NULL);
 
 			check_msg(byte_array->len == strlen(tests[i].out), "Buffer length mismatch: expected %d got %d\n or '%s' got '%.*s'", strlen(tests[i].out), byte_array->len, tests[i].out, byte_array->len, byte_array->data);
 			check_msg(0 == memcmp(byte_array->data, tests[i].out, byte_array->len), "Buffer mismatch: expected '%s' got '%.*s'", tests[i].out, byte_array->len, byte_array->data);
-			check_unref(filter, 1);
-			check_unref(out, 1);
+			check_unref (filter, 1);
+			check_unref (out, 1);
 
-			camel_test_pull();
+			camel_test_pull ();
 		}
 
-		camel_test_pull();
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/misc/split.c b/camel/tests/misc/split.c
index 7947e72..d259223 100644
--- a/camel/tests/misc/split.c
+++ b/camel/tests/misc/split.c
@@ -55,53 +55,53 @@ main (gint argc, gchar **argv)
 	gint i, j;
 	struct _camel_search_words *words, *tmp;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("Search splitting");
 
 	for (i = 0; i < G_N_ELEMENTS (split_tests); i++) {
 		camel_test_push("split %d '%s'", i, split_tests[i].word);
 
-		words = camel_search_words_split(split_tests[i].word);
-		check(words != NULL);
+		words = camel_search_words_split (split_tests[i].word);
+		check (words != NULL);
 		check_msg(words->len == split_tests[i].count, "words->len = %d, count = %d", words->len, split_tests[i].count);
 
 		for (j=0;j<words->len;j++) {
-			check_msg(strcmp(split_tests[i].splits[j].word, words->words[j]->word) == 0,
+			check_msg (strcmp (split_tests[i].splits[j].word, words->words[j]->word) == 0,
 				  "'%s' != '%s'", split_tests[i].splits[j].word, words->words[j]->word);
-			check(split_tests[i].splits[j].type == words->words[j]->type);
+			check (split_tests[i].splits[j].type == words->words[j]->type);
 		}
 
-		camel_search_words_free(words);
-		camel_test_pull();
+		camel_search_words_free (words);
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	camel_test_start("Search splitting - simple");
 
 	for (i = 0; i < G_N_ELEMENTS (simple_tests); i++) {
 		camel_test_push("simple split %d '%s'", i, simple_tests[i].word);
 
-		tmp = camel_search_words_split(simple_tests[i].word);
-		check(tmp != NULL);
+		tmp = camel_search_words_split (simple_tests[i].word);
+		check (tmp != NULL);
 
-		words = camel_search_words_simple(tmp);
-		check(words != NULL);
+		words = camel_search_words_simple (tmp);
+		check (words != NULL);
 		check_msg(words->len == simple_tests[i].count, "words->len = %d, count = %d", words->len, simple_tests[i].count);
 
 		for (j=0;j<words->len;j++) {
-			check_msg(strcmp(simple_tests[i].splits[j].word, words->words[j]->word) == 0,
+			check_msg (strcmp (simple_tests[i].splits[j].word, words->words[j]->word) == 0,
 				  "'%s' != '%s'", simple_tests[i].splits[j].word, words->words[j]->word);
-			check(simple_tests[i].splits[j].type == words->words[j]->type);
+			check (simple_tests[i].splits[j].type == words->words[j]->type);
 		}
 
-		camel_search_words_free(words);
-		camel_search_words_free(tmp);
-		camel_test_pull();
+		camel_search_words_free (words);
+		camel_search_words_free (tmp);
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/misc/test1.c b/camel/tests/misc/test1.c
index e607b6a..dfe54ca 100644
--- a/camel/tests/misc/test1.c
+++ b/camel/tests/misc/test1.c
@@ -29,7 +29,7 @@ main (gint argc, gchar **argv)
 {
 	gint i, j;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("references decoding");
 
@@ -37,19 +37,19 @@ main (gint argc, gchar **argv)
 		struct _camel_header_references *head, *node;
 
 		camel_test_push("references decoding[%d] '%s'", i, test1[i].header);
-		head = camel_header_references_decode(test1[i].header);
+		head = camel_header_references_decode (test1[i].header);
 		node = head;
 		for (j=0;test1[i].values[j];j++) {
 			check_msg(node != NULL, "didn't find all references");
-			check(strcmp(test1[i].values[j], node->id) == 0);
+			check (strcmp (test1[i].values[j], node->id) == 0);
 			node = node->next;
 		}
 		check_msg(node == NULL, "found more references than should have");
-		camel_header_references_list_clear(&head);
-		camel_test_pull();
+		camel_header_references_list_clear (&head);
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/misc/test2.c b/camel/tests/misc/test2.c
index f56c1c0..a142894 100644
--- a/camel/tests/misc/test2.c
+++ b/camel/tests/misc/test2.c
@@ -66,7 +66,7 @@ main (gint argc, gchar **argv)
 {
 	gint i, j;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("Param list decoding");
 
@@ -74,21 +74,21 @@ main (gint argc, gchar **argv)
 		struct _camel_header_param *head, *node;
 
 		camel_test_push("param decoding[%d] '%s'", i, test1[i].list);
-		head = camel_header_param_list_decode(test1[i].list);
-		check(head != NULL);
+		head = camel_header_param_list_decode (test1[i].list);
+		check (head != NULL);
 		node = head;
 		for (j=0;j<test1[i].count;j++) {
 			check_msg(node != NULL, "didn't find all params");
-			check(strcmp(node->name, test1[i].params[j*2]) == 0);
-			check(strcmp(node->value, test1[i].params[j*2+1]) == 0);
+			check (strcmp (node->name, test1[i].params[j*2]) == 0);
+			check (strcmp (node->value, test1[i].params[j*2+1]) == 0);
 			node = node->next;
 		}
 		check_msg(node == NULL, "found more params than should have");
-		camel_header_param_list_free(head);
-		camel_test_pull();
+		camel_header_param_list_free (head);
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	camel_test_start("Param list encoding");
 
@@ -99,20 +99,20 @@ main (gint argc, gchar **argv)
 		camel_test_push("param encoding[%d]", i);
 
 		for (j=0;j<test2[i].count;j++)
-			camel_header_set_param(&head, test2[i].params[j*2], test2[i].params[j*2+1]);
+			camel_header_set_param (&head, test2[i].params[j*2], test2[i].params[j*2+1]);
 		scan = head;
 		for (j=0;scan;j++)
 			scan = scan->next;
-		check(j == test2[i].count);
+		check (j == test2[i].count);
 
-		text = camel_header_param_list_format(head);
-		check(strcmp(text, test2[i].list) == 0);
-		camel_header_param_list_free(head);
+		text = camel_header_param_list_format (head);
+		check (strcmp (text, test2[i].list) == 0);
+		camel_header_param_list_free (head);
 
-		camel_test_pull();
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/misc/utf7.c b/camel/tests/misc/utf7.c
index c80e1f1..cfe56ed 100644
--- a/camel/tests/misc/utf7.c
+++ b/camel/tests/misc/utf7.c
@@ -48,7 +48,7 @@ main (gint argc, gchar **argv)
 	gchar utf8enc[256];
 	GString *out;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	out = g_string_new("");
 
@@ -60,43 +60,43 @@ main (gint argc, gchar **argv)
 		p = tests[i].utf8;
 		j = 0;
 		do {
-			u = camel_utf8_getc((const guchar **)&p);
-			check(u == tests[i].unicode[j]);
+			u = camel_utf8_getc ((const guchar **)&p);
+			check (u == tests[i].unicode[j]);
 			j++;
 		} while (u);
-		camel_test_pull();
+		camel_test_pull ();
 
 		camel_test_push("%2d: %s utf7->utf8", i, tests[i].utf7);
-		utf8 = camel_utf7_utf8(tests[i].utf7);
+		utf8 = camel_utf7_utf8 (tests[i].utf7);
 		check_msg(strcmp(utf8, tests[i].utf8) == 0, "utf8 = '%s'", utf8);
-		camel_test_pull();
+		camel_test_pull ();
 
 		camel_test_push("%2d: %s utf7->utf8->utf7", i, tests[i].utf7);
-		utf7 = camel_utf8_utf7(utf8);
+		utf7 = camel_utf8_utf7 (utf8);
 		check_msg(strcmp(utf7, tests[i].utf7) == 0, "utf7 = '%s'", utf7);
-		camel_test_pull();
+		camel_test_pull ();
 
-		g_free(utf7);
-		g_free(utf8);
+		g_free (utf7);
+		g_free (utf8);
 
 		camel_test_push("%2d: %s utf8 encode", i, tests[i].utf7);
 
-		g_string_truncate(out, 0);
+		g_string_truncate (out, 0);
 		p = utf8enc;
 		j = 0;
 		do {
 			u = tests[i].unicode[j++];
-			camel_utf8_putc((guchar **)&p, u);
-			g_string_append_u(out, u);
+			camel_utf8_putc ((guchar **)&p, u);
+			g_string_append_u (out, u);
 		} while (u);
 
-		check(strcmp(utf8enc, out->str) == 0);
-		check(strcmp(utf8enc, tests[i].utf8) == 0);
+		check (strcmp (utf8enc, out->str) == 0);
+		check (strcmp (utf8enc, tests[i].utf8) == 0);
 
-		camel_test_pull();
+		camel_test_pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/smime/pgp.c b/camel/tests/smime/pgp.c
index 6b7d8c2..7d371ba 100644
--- a/camel/tests/smime/pgp.c
+++ b/camel/tests/smime/pgp.c
@@ -134,20 +134,20 @@ gint main (gint argc, gchar **argv)
 	camel_stream_write (stream1, "Hello, I am a test stream.\n", 27, NULL);
 	camel_stream_reset (stream1, NULL);
 
-	conpart = camel_mime_part_new();
-	dw = camel_data_wrapper_new();
-	camel_data_wrapper_construct_from_stream(dw, stream1, NULL);
+	conpart = camel_mime_part_new ();
+	dw = camel_data_wrapper_new ();
+	camel_data_wrapper_construct_from_stream (dw, stream1, NULL);
 	camel_medium_set_content ((CamelMedium *)conpart, dw);
 	g_object_unref (stream1);
 	g_object_unref (dw);
 
-	sigpart = camel_mime_part_new();
+	sigpart = camel_mime_part_new ();
 
 	camel_test_push ("PGP signing");
 	camel_cipher_sign (ctx, "no user no domain", CAMEL_CIPHER_HASH_SHA1, conpart, sigpart, &error);
 	if (error != NULL) {
 		printf("PGP signing failed assuming non-functional environment\n%s", error->message);
-		camel_test_pull();
+		camel_test_pull ();
 		return 77;
 	}
 	camel_test_pull ();
@@ -168,15 +168,15 @@ gint main (gint argc, gchar **argv)
 	camel_stream_write (stream1, "Hello, I am a test of encryption/decryption.", 44, NULL);
 	camel_stream_reset (stream1, NULL);
 
-	conpart = camel_mime_part_new();
-	dw = camel_data_wrapper_new();
-	camel_stream_reset(stream1, NULL);
-	camel_data_wrapper_construct_from_stream(dw, stream1, NULL);
+	conpart = camel_mime_part_new ();
+	dw = camel_data_wrapper_new ();
+	camel_stream_reset (stream1, NULL);
+	camel_data_wrapper_construct_from_stream (dw, stream1, NULL);
 	camel_medium_set_content ((CamelMedium *)conpart, dw);
 	g_object_unref (stream1);
 	g_object_unref (dw);
 
-	encpart = camel_mime_part_new();
+	encpart = camel_mime_part_new ();
 
 	g_clear_error (&error);
 
@@ -191,7 +191,7 @@ gint main (gint argc, gchar **argv)
 	g_clear_error (&error);
 
 	camel_test_push ("PGP decrypt");
-	outpart = camel_mime_part_new();
+	outpart = camel_mime_part_new ();
 	valid = camel_cipher_decrypt (ctx, encpart, outpart, &error);
 	check_msg (error == NULL, "%s", error->message);
 	check_msg (valid->encrypt.status == CAMEL_CIPHER_VALIDITY_ENCRYPT_ENCRYPTED, "%s", valid->encrypt.description);
@@ -201,8 +201,8 @@ gint main (gint argc, gchar **argv)
 	buffer2 = g_byte_array_new ();
 	stream2 = camel_stream_mem_new_with_byte_array (buffer2);
 
-	camel_data_wrapper_write_to_stream((CamelDataWrapper *)conpart, stream1, NULL);
-	camel_data_wrapper_write_to_stream((CamelDataWrapper *)outpart, stream2, NULL);
+	camel_data_wrapper_write_to_stream ((CamelDataWrapper *)conpart, stream1, NULL);
+	camel_data_wrapper_write_to_stream ((CamelDataWrapper *)outpart, stream2, NULL);
 
 	before = g_strndup ((gchar *) buffer1->data, buffer1->len);
 	after = g_strndup ((gchar *) buffer2->data, buffer2->len);
diff --git a/camel/tests/stream/test1.c b/camel/tests/stream/test1.c
index bd40049..37fba0b 100644
--- a/camel/tests/stream/test1.c
+++ b/camel/tests/stream/test1.c
@@ -9,7 +9,7 @@
 #include <unistd.h>
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	CamelSeekableStream *ss = NULL;
 	gint i;
@@ -18,7 +18,7 @@ main(gint argc, gchar **argv)
 	gint size;
 	gchar buffer[1024];
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("CamelStream fs, open, seek, read, write, eos");
 	for (i=0;i<2;i++) {
@@ -32,12 +32,12 @@ main(gint argc, gchar **argv)
 			break;
 		case 1:
 			fd = open("stream.txt", O_RDWR, 0);
-			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
+			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd (fd);
 			break;
 		}
-		check(ss == NULL && errno == ENOENT);
+		check (ss == NULL && errno == ENOENT);
 		check(g_stat("stream.txt", &st) == -1 && errno == ENOENT);
-		pull();
+		pull ();
 
 		push("Creating stream using method %d", i);
 		switch (i) {
@@ -47,25 +47,25 @@ main(gint argc, gchar **argv)
 			break;
 		case 1:
 			fd = open("stream.txt", O_CREAT|O_RDWR|O_TRUNC, 0600);
-			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
+			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd (fd);
 			break;
 		}
-		check(ss != NULL);
+		check (ss != NULL);
 		check(g_stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == 0);
-		pull();
+		pull ();
 
-		test_stream_seekable_writepart(ss);
-		test_stream_seekable_readpart(ss);
+		test_stream_seekable_writepart (ss);
+		test_stream_seekable_readpart (ss);
 
 		push("getting filesize");
 		check(g_stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode));
 		size = st.st_size;
-		pull();
+		pull ();
 
 		push("checking close closes");
-		check_unref(ss, 1);
-		check(close(fd) == -1);
-		pull();
+		check_unref (ss, 1);
+		check (close (fd) == -1);
+		pull ();
 
 		push("re-opening stream");
 		switch (i) {
@@ -75,17 +75,17 @@ main(gint argc, gchar **argv)
 			break;
 		case 1:
 			fd = open("stream.txt", O_RDWR, 0);
-			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
+			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd (fd);
 			break;
 		}
-		check(ss != NULL);
+		check (ss != NULL);
 		check(g_stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == size);
 
-		test_stream_seekable_readpart(ss);
+		test_stream_seekable_readpart (ss);
 
-		check_unref(ss, 1);
-		check(close(fd) == -1);
-		pull();
+		check_unref (ss, 1);
+		check (close (fd) == -1);
+		pull ();
 
 		push("re-opening stream with truncate");
 		switch (i) {
@@ -95,24 +95,24 @@ main(gint argc, gchar **argv)
 			break;
 		case 1:
 			fd = open("stream.txt", O_RDWR|O_TRUNC, 0);
-			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd(fd);
+			ss = (CamelSeekableStream *)camel_stream_fs_new_with_fd (fd);
 			break;
 		}
-		check(ss != NULL);
+		check (ss != NULL);
 		check(g_stat("stream.txt", &st) == 0 && (st.st_mode&0777) == 0600 && S_ISREG(st.st_mode) && st.st_size == 0);
 
 		/* read has to return 0 before eos is set */
-		check(camel_stream_read(CAMEL_STREAM(ss), buffer, 1, NULL) == 0);
-		check(camel_stream_eos(CAMEL_STREAM(ss)));
+		check (camel_stream_read (CAMEL_STREAM (ss), buffer, 1, NULL) == 0);
+		check (camel_stream_eos (CAMEL_STREAM (ss)));
 
-		check_unref(ss, 1);
-		check(close(fd) == -1);
-		pull();
+		check_unref (ss, 1);
+		check (close (fd) == -1);
+		pull ();
 
 		(void)unlink("stream.txt");
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/stream/test2.c b/camel/tests/stream/test2.c
index 5cc16ac..a0cfaf8 100644
--- a/camel/tests/stream/test2.c
+++ b/camel/tests/stream/test2.c
@@ -9,13 +9,13 @@
 #include <unistd.h>
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	CamelSeekableStream *ss = NULL;
 	GByteArray *ba;
 	gint i;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("CamelStream mem, create, seek, read, write, eos");
 	for (i=0;i<3;i++) {
@@ -23,26 +23,26 @@ main(gint argc, gchar **argv)
 		push("Creating stream using method %d", i);
 		switch (i) {
 		case 0:
-			ss = (CamelSeekableStream *)camel_stream_mem_new();
+			ss = (CamelSeekableStream *)camel_stream_mem_new ();
 			break;
 		case 1:
-			ba = g_byte_array_new();
-			ss = (CamelSeekableStream *)camel_stream_mem_new_with_byte_array(ba);
+			ba = g_byte_array_new ();
+			ss = (CamelSeekableStream *)camel_stream_mem_new_with_byte_array (ba);
 			break;
 		case 2:
 			ss = (CamelSeekableStream *)camel_stream_mem_new_with_buffer("", 0);
 			break;
 		}
-		check(ss != NULL);
+		check (ss != NULL);
 
-		test_stream_seekable_writepart(ss);
-		test_stream_seekable_readpart(ss);
+		test_stream_seekable_writepart (ss);
+		test_stream_seekable_readpart (ss);
 
-		check_unref(ss, 1);
-		pull();
+		check_unref (ss, 1);
+		pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/camel/tests/stream/test3.c b/camel/tests/stream/test3.c
index ca13d12..f3fdfc9 100644
--- a/camel/tests/stream/test3.c
+++ b/camel/tests/stream/test3.c
@@ -30,40 +30,40 @@ struct {
 };
 
 gint
-main(gint argc, gchar **argv)
+main (gint argc, gchar **argv)
 {
 	CamelSeekableStream *ss = NULL;
 	gint i, j;
 	CamelSeekableSubstream *sus, *sus2;
 
-	camel_test_init(argc, argv);
+	camel_test_init (argc, argv);
 
 	camel_test_start("CamelSeekableSubstream, mem backing");
 	for (j=0;j<SEEKABLE_SUBSTREAM_WAYS;j++) {
 		push("testing writing method %d", j);
-		ss = (CamelSeekableStream *)camel_stream_mem_new();
-		check(ss != NULL);
+		ss = (CamelSeekableStream *)camel_stream_mem_new ();
+		check (ss != NULL);
 		for (i = 0; i < G_N_ELEMENTS (ranges); i++) {
 			push("stream subrange %d-%d", ranges[i].lower, ranges[i].upper);
-			sus = (CamelSeekableSubstream *)camel_seekable_substream_new(ss, ranges[i].lower, ranges[i].upper);
-			check(sus != NULL);
+			sus = (CamelSeekableSubstream *)camel_seekable_substream_new (ss, ranges[i].lower, ranges[i].upper);
+			check (sus != NULL);
 
-			test_seekable_substream_writepart((CamelStream *)sus, j);
-			test_seekable_substream_readpart((CamelStream *)sus);
+			test_seekable_substream_writepart ((CamelStream *)sus, j);
+			test_seekable_substream_readpart ((CamelStream *)sus);
 
-			sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new(ss, ranges[i].lower, ranges[i].upper);
-			check(sus2 != NULL);
-			test_seekable_substream_readpart((CamelStream *)sus2);
+			sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new (ss, ranges[i].lower, ranges[i].upper);
+			check (sus2 != NULL);
+			test_seekable_substream_readpart ((CamelStream *)sus2);
 
-			check_unref(sus, 1);
-			check_unref(sus2, 1);
-			pull();
+			check_unref (sus, 1);
+			check_unref (sus2, 1);
+			pull ();
 		}
-		check_unref(ss, 1);
-		pull();
+		check_unref (ss, 1);
+		pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	(void)unlink("stream.txt");
 
@@ -71,29 +71,29 @@ main(gint argc, gchar **argv)
 	for (j=0;j<SEEKABLE_SUBSTREAM_WAYS;j++) {
 		push("testing writing method %d", j);
 		ss = (CamelSeekableStream *)camel_stream_fs_new_with_name("stream.txt", O_RDWR|O_CREAT|O_TRUNC, 0600, NULL);
-		check(ss != NULL);
+		check (ss != NULL);
 		for (i = 0; i < G_N_ELEMENTS (ranges); i++) {
 			push("stream subrange %d-%d", ranges[i].lower, ranges[i].upper);
-			sus = (CamelSeekableSubstream *)camel_seekable_substream_new(ss, ranges[i].lower, ranges[i].upper);
-			check(sus != NULL);
+			sus = (CamelSeekableSubstream *)camel_seekable_substream_new (ss, ranges[i].lower, ranges[i].upper);
+			check (sus != NULL);
 
-			test_seekable_substream_writepart((CamelStream *)sus, j);
-			test_seekable_substream_readpart((CamelStream *)sus);
+			test_seekable_substream_writepart ((CamelStream *)sus, j);
+			test_seekable_substream_readpart ((CamelStream *)sus);
 
-			sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new(ss, ranges[i].lower, ranges[i].upper);
-			check(sus2 != NULL);
-			test_seekable_substream_readpart((CamelStream *)sus2);
+			sus2 = (CamelSeekableSubstream *)camel_seekable_substream_new (ss, ranges[i].lower, ranges[i].upper);
+			check (sus2 != NULL);
+			test_seekable_substream_readpart ((CamelStream *)sus2);
 
-			check_unref(sus, 1);
-			check_unref(sus2, 1);
-			pull();
+			check_unref (sus, 1);
+			check_unref (sus2, 1);
+			pull ();
 		}
-		check_unref(ss, 1);
+		check_unref (ss, 1);
 		(void)unlink("stream.txt");
-		pull();
+		pull ();
 	}
 
-	camel_test_end();
+	camel_test_end ();
 
 	return 0;
 }
diff --git a/docs/reference/calendar/libecal/tmpl/e-cal-check-timezones.sgml b/docs/reference/calendar/libecal/tmpl/e-cal-check-timezones.sgml
index e1d9ab3..cc4a09e 100644
--- a/docs/reference/calendar/libecal/tmpl/e-cal-check-timezones.sgml
+++ b/docs/reference/calendar/libecal/tmpl/e-cal-check-timezones.sgml
@@ -61,6 +61,7 @@ e-cal-check-timezones
 @const gchar *tzid, gconstpointer custom, GError **error:
 @const gchar *tzid, gconstpointer custom, GError **error:
 @const gchar *tzid, gconstpointer custom, GError **error:
+ const gchar *tzid, gconstpointer custom, GError **error:
 @const gchar *tzid, gconstpointer custom, GError **error: 
 @custom: 
 @error: 
diff --git a/docs/reference/camel/tmpl/camel-cipher-context.sgml b/docs/reference/camel/tmpl/camel-cipher-context.sgml
index 0546cfe..1e79cc0 100644
--- a/docs/reference/camel/tmpl/camel-cipher-context.sgml
+++ b/docs/reference/camel/tmpl/camel-cipher-context.sgml
@@ -472,6 +472,8 @@ CamelCipherContext
 @gpointer cert_data: 
 @gpointer cert_data:
 @gpointer cert_data: 
+ gpointer cert_data:
+ gpointer cert_data: 
 @gpointer cert_data: 
 
 
diff --git a/libebackend/e-db3-utils.c b/libebackend/e-db3-utils.c
index 9a086fd..d9a620d 100644
--- a/libebackend/e-db3-utils.c
+++ b/libebackend/e-db3-utils.c
@@ -134,8 +134,8 @@ e_db3_utils_maybe_recover (const gchar *filename)
 	copy_filename = get_copy_filename (filename);
 	check_filename = get_check_filename (filename);
 
-	if (g_file_test(check_filename, G_FILE_TEST_EXISTS)) {
-		ret_val = resume_upgrade(filename, copy_filename, check_filename);
+	if (g_file_test (check_filename, G_FILE_TEST_EXISTS)) {
+		ret_val = resume_upgrade (filename, copy_filename, check_filename);
 	} else if (g_file_test (copy_filename, G_FILE_TEST_EXISTS)) {
 		g_unlink (copy_filename);
 	}
diff --git a/libebackend/e-dbhash.c b/libebackend/e-dbhash.c
index f720f84..9371dce 100644
--- a/libebackend/e-dbhash.c
+++ b/libebackend/e-dbhash.c
@@ -50,7 +50,7 @@ e_dbhash_new (const gchar *filename)
 }
 
 static void
-string_to_dbt(const gchar *str, DBT *dbt)
+string_to_dbt (const gchar *str, DBT *dbt)
 {
 	memset (dbt, 0, sizeof (DBT));
 	dbt->data = (gpointer)str;
@@ -58,7 +58,7 @@ string_to_dbt(const gchar *str, DBT *dbt)
 }
 
 static void
-md5_to_dbt(const guint8 str[16], DBT *dbt)
+md5_to_dbt (const guint8 str[16], DBT *dbt)
 {
 	memset (dbt, 0, sizeof (DBT));
 	dbt->data = (gpointer)str;
@@ -142,14 +142,14 @@ e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data)
 		return;
 	}
 
-	memset(&dkey, 0, sizeof(DBT));
-	memset(&ddata, 0, sizeof(DBT));
-	db_error = dbc->c_get(dbc, &dkey, &ddata, DB_FIRST);
+	memset (&dkey, 0, sizeof (DBT));
+	memset (&ddata, 0, sizeof (DBT));
+	db_error = dbc->c_get (dbc, &dkey, &ddata, DB_FIRST);
 
 	while (db_error == 0) {
 		(*func) ((const gchar *)dkey.data, user_data);
 
-		db_error = dbc->c_get(dbc, &dkey, &ddata, DB_NEXT);
+		db_error = dbc->c_get (dbc, &dkey, &ddata, DB_NEXT);
 	}
 	dbc->c_close (dbc);
 }
diff --git a/libedataserver/e-account-list.c b/libedataserver/e-account-list.c
index bdec502..70debb8 100644
--- a/libedataserver/e-account-list.c
+++ b/libedataserver/e-account-list.c
@@ -345,12 +345,12 @@ e_account_list_account_has_proxies (EAccountList *accounts, EAccount *account)
  * event.
  **/
 void
-e_account_list_add(EAccountList *accounts, EAccount *account)
+e_account_list_add (EAccountList *accounts, EAccount *account)
 {
 	/* FIXME: should we check for duplicate accounts? */
 
 	e_list_append ((EList *)accounts, account);
-	g_signal_emit(accounts, signals[ACCOUNT_ADDED], 0, account);
+	g_signal_emit (accounts, signals[ACCOUNT_ADDED], 0, account);
 }
 
 /**
@@ -361,10 +361,10 @@ e_account_list_add(EAccountList *accounts, EAccount *account)
  * Signal that the details of an account have changed.
  **/
 void
-e_account_list_change(EAccountList *accounts, EAccount *account)
+e_account_list_change (EAccountList *accounts, EAccount *account)
 {
 	/* maybe the account should do this itself ... */
-	g_signal_emit(accounts, signals[ACCOUNT_CHANGED], 0, account);
+	g_signal_emit (accounts, signals[ACCOUNT_CHANGED], 0, account);
 }
 
 /**
@@ -377,15 +377,15 @@ e_account_list_change(EAccountList *accounts, EAccount *account)
  * then reset the default to the first account.
  **/
 void
-e_account_list_remove(EAccountList *accounts, EAccount *account)
+e_account_list_remove (EAccountList *accounts, EAccount *account)
 {
-	if (account == e_account_list_get_default(accounts))
+	if (account == e_account_list_get_default (accounts))
 		gconf_client_unset (accounts->priv->gconf, "/apps/evolution/mail/default_account", NULL);
 
 	/* not sure if need to ref but no harm */
 	g_object_ref (account);
 	e_list_remove ((EList *) accounts, account);
-	g_signal_emit(accounts, signals[ACCOUNT_REMOVED], 0, account);
+	g_signal_emit (accounts, signals[ACCOUNT_REMOVED], 0, account);
 	g_object_unref (account);
 }
 
@@ -399,7 +399,7 @@ e_account_list_remove(EAccountList *accounts, EAccount *account)
  * Returns: The account or NULL if no accounts are defined.
  **/
 const EAccount *
-e_account_list_get_default(EAccountList *accounts)
+e_account_list_get_default (EAccountList *accounts)
 {
 	gchar *uid;
 	EIterator *it;
@@ -412,21 +412,21 @@ e_account_list_get_default(EAccountList *accounts)
 		for (;e_iterator_is_valid (it);e_iterator_next (it)) {
 			account = (const EAccount *)e_iterator_get (it);
 
-			if (!strcmp(uid, account->uid))
+			if (!strcmp (uid, account->uid))
 				break;
 			account = NULL;
 		}
-		e_iterator_reset(it);
+		e_iterator_reset (it);
 	}
 
 	/* no uid or uid not found, @it will be at the first account */
-	if (account == NULL && e_iterator_is_valid(it)) {
+	if (account == NULL && e_iterator_is_valid (it)) {
 		account = (const EAccount *) e_iterator_get (it);
 		gconf_client_set_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", account->uid, NULL);
 	}
 
-	g_object_unref(it);
-	g_free(uid);
+	g_object_unref (it);
+	g_free (uid);
 
 	return account;
 }
@@ -439,7 +439,7 @@ e_account_list_get_default(EAccountList *accounts)
  * Set the account @account to be the default account.
  **/
 void
-e_account_list_set_default(EAccountList *accounts, EAccount *account)
+e_account_list_set_default (EAccountList *accounts, EAccount *account)
 {
 	gconf_client_set_string (accounts->priv->gconf, "/apps/evolution/mail/default_account", account->uid, NULL);
 }
@@ -460,7 +460,7 @@ e_account_list_set_default(EAccountList *accounts, EAccount *account)
  * Returns: The account or NULL if it doesn't exist.
  **/
 const EAccount *
-e_account_list_find(EAccountList *accounts, e_account_find_t type, const gchar *key)
+e_account_list_find (EAccountList *accounts, e_account_find_t type, const gchar *key)
 {
 	gchar *val;
 	EIterator *it;
@@ -482,22 +482,22 @@ e_account_list_find(EAccountList *accounts, e_account_find_t type, const gchar *
 		val = NULL;
 		switch (type) {
 		case E_ACCOUNT_FIND_NAME:
-			found = strcmp(account->name, key) == 0;
+			found = strcmp (account->name, key) == 0;
 			break;
 		case E_ACCOUNT_FIND_UID:
-			found = strcmp(account->uid, key) == 0;
+			found = strcmp (account->uid, key) == 0;
 			break;
 		case E_ACCOUNT_FIND_ID_NAME:
 			if (account->id)
-				found = strcmp(account->id->name, key) == 0;
+				found = strcmp (account->id->name, key) == 0;
 			break;
 		case E_ACCOUNT_FIND_ID_ADDRESS:
 			if (account->id)
-				found = g_ascii_strcasecmp(account->id->address, key) == 0;
+				found = g_ascii_strcasecmp (account->id->address, key) == 0;
 			break;
 		case E_ACCOUNT_FIND_PARENT_UID:
 			if (account->parent_uid)
-				found = strcmp(account->parent_uid, key) == 0;
+				found = strcmp (account->parent_uid, key) == 0;
 			break;
 		}
 
@@ -506,7 +506,7 @@ e_account_list_find(EAccountList *accounts, e_account_find_t type, const gchar *
 
 		account = NULL;
 	}
-	g_object_unref(it);
+	g_object_unref (it);
 
 	return account;
 }
diff --git a/libedataserver/e-account-list.h b/libedataserver/e-account-list.h
index e8393bd..f1d7149 100644
--- a/libedataserver/e-account-list.h
+++ b/libedataserver/e-account-list.h
@@ -70,8 +70,8 @@ void            e_account_list_add       (EAccountList *, EAccount *);
 void            e_account_list_change    (EAccountList *, EAccount *);
 void            e_account_list_remove    (EAccountList *, EAccount *);
 
-const EAccount *e_account_list_get_default(EAccountList *);
-void            e_account_list_set_default(EAccountList *, EAccount *);
+const EAccount *e_account_list_get_default (EAccountList *);
+void            e_account_list_set_default (EAccountList *, EAccount *);
 const EAccount *e_account_list_find       (EAccountList *, e_account_find_t type, const gchar *key);
 
 void e_account_list_prune_proxies (EAccountList *);
diff --git a/libedataserver/e-account.c b/libedataserver/e-account.c
index 8154096..49cda3b 100644
--- a/libedataserver/e-account.c
+++ b/libedataserver/e-account.c
@@ -256,16 +256,16 @@ xml_set_prop (xmlNodePtr node, const gchar *name, gchar **val)
 	if (buf == NULL) {
 		res = (*val != NULL);
 		if (res) {
-			g_free(*val);
+			g_free (*val);
 			*val = NULL;
 		}
 	} else {
-		res = *val == NULL || strcmp(*val, (gchar *)buf) != 0;
+		res = *val == NULL || strcmp (*val, (gchar *)buf) != 0;
 		if (res) {
-			g_free(*val);
+			g_free (*val);
 			*val = g_strdup((gchar *)buf);
 		}
-		xmlFree(buf);
+		xmlFree (buf);
 	}
 
 	return res;
@@ -327,20 +327,20 @@ xml_set_content (xmlNodePtr node, gchar **val)
 	xmlChar *buf;
 	gint res;
 
-	buf = xmlNodeGetContent(node);
+	buf = xmlNodeGetContent (node);
 	if (buf == NULL) {
 		res = (*val != NULL);
 		if (res) {
-			g_free(*val);
+			g_free (*val);
 			*val = NULL;
 		}
 	} else {
-		res = *val == NULL || strcmp(*val, (gchar *)buf) != 0;
+		res = *val == NULL || strcmp (*val, (gchar *)buf) != 0;
 		if (res) {
-			g_free(*val);
+			g_free (*val);
 			*val = g_strdup((gchar *)buf);
 		}
-		xmlFree(buf);
+		xmlFree (buf);
 	}
 
 	return res;
@@ -598,7 +598,7 @@ e_account_set_from_xml (EAccount *account, const gchar *xml)
 	fix_mbox_folder_uri (&account->drafts_folder_uri);
 	fix_mbox_folder_uri (&account->sent_folder_uri);
 
-	g_signal_emit(account, signals[CHANGED], 0, -1);
+	g_signal_emit (account, signals[CHANGED], 0, -1);
 
 	return changed;
 }
@@ -675,7 +675,7 @@ e_account_import (EAccount *dest, EAccount *src)
 	g_free (dest->smime_encrypt_key);
 	dest->smime_encrypt_key = g_strdup (src->smime_encrypt_key);
 
-	g_signal_emit(dest, signals[CHANGED], 0, -1);
+	g_signal_emit (dest, signals[CHANGED], 0, -1);
 }
 
 /**
@@ -859,49 +859,49 @@ static struct _account_info {
 	guint offset;
 	guint struct_offset;
 } account_info[E_ACCOUNT_ITEM_LAST] = {
-	{ /* E_ACCOUNT_NAME */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, name) },
+	{ /* E_ACCOUNT_NAME */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, name) },
 
-	{ /* E_ACCOUNT_ID_NAME, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, id), G_STRUCT_OFFSET(EAccountIdentity, name) },
-	{ /* E_ACCOUNT_ID_ADDRESS, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, id), G_STRUCT_OFFSET(EAccountIdentity, address) },
-	{ /* E_ACCOUNT_ID_REPLY_TO, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, id), G_STRUCT_OFFSET(EAccountIdentity, reply_to) },
-	{ /* E_ACCOUNT_ID_ORGANIZATION */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, id), G_STRUCT_OFFSET(EAccountIdentity, organization) },
-	{ /* E_ACCOUNT_ID_SIGNATURE */ 1<<EAP_LOCK_SIGNATURE, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, id), G_STRUCT_OFFSET(EAccountIdentity, sig_uid) },
+	{ /* E_ACCOUNT_ID_NAME, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, id), G_STRUCT_OFFSET (EAccountIdentity, name) },
+	{ /* E_ACCOUNT_ID_ADDRESS, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, id), G_STRUCT_OFFSET (EAccountIdentity, address) },
+	{ /* E_ACCOUNT_ID_REPLY_TO, */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, id), G_STRUCT_OFFSET (EAccountIdentity, reply_to) },
+	{ /* E_ACCOUNT_ID_ORGANIZATION */ 0, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, id), G_STRUCT_OFFSET (EAccountIdentity, organization) },
+	{ /* E_ACCOUNT_ID_SIGNATURE */ 1<<EAP_LOCK_SIGNATURE, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, id), G_STRUCT_OFFSET (EAccountIdentity, sig_uid) },
 
-	{ /* E_ACCOUNT_SOURCE_URL */ 1<<EAP_LOCK_SOURCE, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, source), G_STRUCT_OFFSET(EAccountService, url) },
-	{ /* E_ACCOUNT_SOURCE_KEEP_ON_SERVER */ 0, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, source), G_STRUCT_OFFSET(EAccountService, keep_on_server) },
-	{ /* E_ACCOUNT_SOURCE_AUTO_CHECK */ 1<<EAP_LOCK_AUTOCHECK, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, source), G_STRUCT_OFFSET(EAccountService, auto_check) },
-	{ /* E_ACCOUNT_SOURCE_AUTO_CHECK_TIME */ 1<<EAP_LOCK_AUTOCHECK, TYPE_INT|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, source), G_STRUCT_OFFSET(EAccountService, auto_check_time) },
-	{ /* E_ACCOUNT_SOURCE_SAVE_PASSWD */ 1<<EAP_LOCK_SAVE_PASSWD, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, source), G_STRUCT_OFFSET(EAccountService, save_passwd) },
+	{ /* E_ACCOUNT_SOURCE_URL */ 1<<EAP_LOCK_SOURCE, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, source), G_STRUCT_OFFSET (EAccountService, url) },
+	{ /* E_ACCOUNT_SOURCE_KEEP_ON_SERVER */ 0, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, source), G_STRUCT_OFFSET (EAccountService, keep_on_server) },
+	{ /* E_ACCOUNT_SOURCE_AUTO_CHECK */ 1<<EAP_LOCK_AUTOCHECK, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, source), G_STRUCT_OFFSET (EAccountService, auto_check) },
+	{ /* E_ACCOUNT_SOURCE_AUTO_CHECK_TIME */ 1<<EAP_LOCK_AUTOCHECK, TYPE_INT|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, source), G_STRUCT_OFFSET (EAccountService, auto_check_time) },
+	{ /* E_ACCOUNT_SOURCE_SAVE_PASSWD */ 1<<EAP_LOCK_SAVE_PASSWD, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, source), G_STRUCT_OFFSET (EAccountService, save_passwd) },
 
-	{ /* E_ACCOUNT_TRANSPORT_URL */ 1<<EAP_LOCK_TRANSPORT, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, transport), G_STRUCT_OFFSET(EAccountService, url) },
-	{ /* E_ACCOUNT_TRANSPORT_SAVE_PASSWD */ 1<<EAP_LOCK_SAVE_PASSWD, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET(EAccount, transport), G_STRUCT_OFFSET(EAccountService, save_passwd) },
+	{ /* E_ACCOUNT_TRANSPORT_URL */ 1<<EAP_LOCK_TRANSPORT, TYPE_STRING|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, transport), G_STRUCT_OFFSET (EAccountService, url) },
+	{ /* E_ACCOUNT_TRANSPORT_SAVE_PASSWD */ 1<<EAP_LOCK_SAVE_PASSWD, TYPE_BOOL|TYPE_STRUCT, G_STRUCT_OFFSET (EAccount, transport), G_STRUCT_OFFSET (EAccountService, save_passwd) },
 
-	{ /* E_ACCOUNT_DRAFTS_FOLDER_URI */ 1<<EAP_LOCK_DEFAULT_FOLDERS, TYPE_STRING, G_STRUCT_OFFSET(EAccount, drafts_folder_uri) },
-	{ /* E_ACCOUNT_SENT_FOLDER_URI */ 1<<EAP_LOCK_DEFAULT_FOLDERS, TYPE_STRING, G_STRUCT_OFFSET(EAccount, sent_folder_uri) },
+	{ /* E_ACCOUNT_DRAFTS_FOLDER_URI */ 1<<EAP_LOCK_DEFAULT_FOLDERS, TYPE_STRING, G_STRUCT_OFFSET (EAccount, drafts_folder_uri) },
+	{ /* E_ACCOUNT_SENT_FOLDER_URI */ 1<<EAP_LOCK_DEFAULT_FOLDERS, TYPE_STRING, G_STRUCT_OFFSET (EAccount, sent_folder_uri) },
 
-	{ /* E_ACCOUNT_CC_ALWAYS */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, always_cc) },
-	{ /* E_ACCOUNT_CC_ADDRS */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, cc_addrs) },
+	{ /* E_ACCOUNT_CC_ALWAYS */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, always_cc) },
+	{ /* E_ACCOUNT_CC_ADDRS */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, cc_addrs) },
 
-	{ /* E_ACCOUNT_BCC_ALWAYS */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, always_bcc) },
-	{ /* E_ACCOUNT_BCC_ADDRS */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, bcc_addrs) },
+	{ /* E_ACCOUNT_BCC_ALWAYS */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, always_bcc) },
+	{ /* E_ACCOUNT_BCC_ADDRS */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, bcc_addrs) },
 
-	{ /* E_ACCOUNT_RECEIPT_POLICY */ 0, TYPE_INT, G_STRUCT_OFFSET(EAccount, receipt_policy) },
+	{ /* E_ACCOUNT_RECEIPT_POLICY */ 0, TYPE_INT, G_STRUCT_OFFSET (EAccount, receipt_policy) },
 
-	{ /* E_ACCOUNT_PGP_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, pgp_key) },
-	{ /* E_ACCOUNT_PGP_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, pgp_hash_algorithm) },
-	{ /* E_ACCOUNT_PGP_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_encrypt_to_self) },
-	{ /* E_ACCOUNT_PGP_ALWAYS_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_always_sign) },
-	{ /* E_ACCOUNT_PGP_NO_IMIP_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_no_imip_sign) },
-	{ /* E_ACCOUNT_PGP_ALWAYS_TRUST */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, pgp_always_trust) },
+	{ /* E_ACCOUNT_PGP_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, pgp_key) },
+	{ /* E_ACCOUNT_PGP_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, pgp_hash_algorithm) },
+	{ /* E_ACCOUNT_PGP_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, pgp_encrypt_to_self) },
+	{ /* E_ACCOUNT_PGP_ALWAYS_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, pgp_always_sign) },
+	{ /* E_ACCOUNT_PGP_NO_IMIP_SIGN */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, pgp_no_imip_sign) },
+	{ /* E_ACCOUNT_PGP_ALWAYS_TRUST */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, pgp_always_trust) },
 
-	{ /* E_ACCOUNT_SMIME_SIGN_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_sign_key) },
-	{ /* E_ACCOUNT_SMIME_ENCRYPT_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_encrypt_key) },
-	{ /* E_ACCOUNT_SMIME_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, smime_hash_algorithm) },
-	{ /* E_ACCOUNT_SMIME_SIGN_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_sign_default) },
-	{ /* E_ACCOUNT_SMIME_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_to_self) },
-	{ /* E_ACCOUNT_SMIME_ENCRYPT_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET(EAccount, smime_encrypt_default) },
+	{ /* E_ACCOUNT_SMIME_SIGN_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, smime_sign_key) },
+	{ /* E_ACCOUNT_SMIME_ENCRYPT_KEY */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, smime_encrypt_key) },
+	{ /* E_ACCOUNT_SMIME_HASH_ALGORITHM */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, smime_hash_algorithm) },
+	{ /* E_ACCOUNT_SMIME_SIGN_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, smime_sign_default) },
+	{ /* E_ACCOUNT_SMIME_ENCRYPT_TO_SELF */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, smime_encrypt_to_self) },
+	{ /* E_ACCOUNT_SMIME_ENCRYPT_DEFAULT */ 0, TYPE_BOOL, G_STRUCT_OFFSET (EAccount, smime_encrypt_default) },
 
-	{ /* E_ACCOUNT_PROXY_PARENT_UID, */ 0, TYPE_STRING, G_STRUCT_OFFSET(EAccount, parent_uid) },
+	{ /* E_ACCOUNT_PROXY_PARENT_UID, */ 0, TYPE_STRING, G_STRUCT_OFFSET (EAccount, parent_uid) },
 };
 
 static GHashTable *ea_option_table;
@@ -935,12 +935,12 @@ ea_setting_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointe
 	if (!(value = gconf_entry_get_value (entry)))
 		return;
 
-	tkey = strrchr(entry->key, '/');
+	tkey = strrchr (entry->key, '/');
 	g_return_if_fail (tkey != NULL);
 
-	info = g_hash_table_lookup(ea_system_table, tkey+1);
+	info = g_hash_table_lookup (ea_system_table, tkey+1);
 	if (info) {
-		if (gconf_value_get_bool(value))
+		if (gconf_value_get_bool (value))
 			ea_perms |= info->perm;
 		else
 			ea_perms &= ~info->perm;
@@ -950,7 +950,7 @@ ea_setting_notify (GConfClient *gconf, guint cnxn_id, GConfEntry *entry, gpointe
 static void
 ea_setting_setup (void)
 {
-	GConfClient *gconf = gconf_client_get_default();
+	GConfClient *gconf = gconf_client_get_default ();
 	GConfEntry *entry;
 	GError *err = NULL;
 	gint i;
@@ -959,30 +959,30 @@ ea_setting_setup (void)
 	if (ea_option_table != NULL)
 		return;
 
-	ea_option_table = g_hash_table_new(g_str_hash, g_str_equal);
+	ea_option_table = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i = 0; i < G_N_ELEMENTS (ea_option_list); i++)
-		g_hash_table_insert(ea_option_table, (gpointer) ea_option_list[i].key, &ea_option_list[i]);
+		g_hash_table_insert (ea_option_table, (gpointer) ea_option_list[i].key, &ea_option_list[i]);
 
-	gconf_client_add_dir(gconf, LOCK_BASE, GCONF_CLIENT_PRELOAD_NONE, NULL);
+	gconf_client_add_dir (gconf, LOCK_BASE, GCONF_CLIENT_PRELOAD_NONE, NULL);
 
-	ea_system_table = g_hash_table_new(g_str_hash, g_str_equal);
+	ea_system_table = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i = 0; i < G_N_ELEMENTS (system_perms); i++) {
-		g_hash_table_insert(ea_system_table, (gchar *)system_perms[i].key, &system_perms[i]);
+		g_hash_table_insert (ea_system_table, (gchar *)system_perms[i].key, &system_perms[i]);
 		sprintf(key, LOCK_BASE "/%s", system_perms[i].key);
-		entry = gconf_client_get_entry(gconf, key, NULL, TRUE, &err);
+		entry = gconf_client_get_entry (gconf, key, NULL, TRUE, &err);
 		if (entry) {
-			ea_setting_notify(gconf, 0, entry, NULL);
-			gconf_entry_free(entry);
+			ea_setting_notify (gconf, 0, entry, NULL);
+			gconf_entry_free (entry);
 		}
 	}
 
 	if (err) {
 		g_warning("Could not load account lock settings: %s", err->message);
-		g_error_free(err);
+		g_error_free (err);
 	}
 
-	gconf_client_notify_add(gconf, LOCK_BASE, (GConfClientNotifyFunc)ea_setting_notify, NULL, NULL, NULL);
-	g_object_unref(gconf);
+	gconf_client_notify_add (gconf, LOCK_BASE, (GConfClientNotifyFunc)ea_setting_notify, NULL, NULL, NULL);
+	g_object_unref (gconf);
 }
 
 /* look up the item in the structure or the substructure using our table of reflection data */
@@ -995,21 +995,21 @@ const gchar *
 e_account_get_string (EAccount *ea, e_account_item_t type)
 {
 	g_return_val_if_fail (ea != NULL, NULL);
-	return *((const gchar **)addr(ea, type));
+	return *((const gchar **)addr (ea, type));
 }
 
 gint
 e_account_get_int (EAccount *ea, e_account_item_t type)
 {
 	g_return_val_if_fail (ea != NULL, 0);
-	return *((gint *)addr(ea, type));
+	return *((gint *)addr (ea, type));
 }
 
 gboolean
 e_account_get_bool (EAccount *ea, e_account_item_t type)
 {
 	g_return_val_if_fail (ea != NULL, FALSE);
-	return *((gboolean *)addr(ea, type));
+	return *((gboolean *)addr (ea, type));
 }
 
 #if d(!)0
@@ -1019,9 +1019,9 @@ dump_account (EAccount *ea)
 	gchar *xml;
 
 	printf("Account changed\n");
-	xml = e_account_to_xml(ea);
+	xml = e_account_to_xml (ea);
 	printf(" ->\n%s\n", xml);
-	g_free(xml);
+	g_free (xml);
 }
 #endif
 
@@ -1033,17 +1033,17 @@ e_account_set_string (EAccount *ea, e_account_item_t type, const gchar *val)
 
 	g_return_if_fail (ea != NULL);
 
-	if (!e_account_writable(ea, type)) {
+	if (!e_account_writable (ea, type)) {
 		g_warning("Trying to set non-writable option account value");
 	} else {
-		p = (gchar **)addr(ea, type);
+		p = (gchar **)addr (ea, type);
 		d(printf("Setting string %d: old '%s' new '%s'\n", type, *p, val));
 		if (*p != val
-		    && (*p == NULL || val == NULL || strcmp(*p, val) != 0)) {
-			g_free(*p);
+		    && (*p == NULL || val == NULL || strcmp (*p, val) != 0)) {
+			g_free (*p);
 			*p = g_strdup(val);
-			d(dump_account(ea));
-			g_signal_emit(ea, signals[CHANGED], 0, type);
+			d (dump_account (ea));
+			g_signal_emit (ea, signals[CHANGED], 0, type);
 		}
 	}
 }
@@ -1053,15 +1053,15 @@ e_account_set_int (EAccount *ea, e_account_item_t type, gint val)
 {
 	g_return_if_fail (ea != NULL);
 
-	if (!e_account_writable(ea, type)) {
+	if (!e_account_writable (ea, type)) {
 		g_warning("Trying to set non-writable option account value");
 	} else {
-		gint *p = (gint *)addr(ea, type);
+		gint *p = (gint *)addr (ea, type);
 
 		if (*p != val) {
 			*p = val;
-			d(dump_account(ea));
-			g_signal_emit(ea, signals[CHANGED], 0, type);
+			d (dump_account (ea));
+			g_signal_emit (ea, signals[CHANGED], 0, type);
 		}
 	}
 }
@@ -1071,15 +1071,15 @@ e_account_set_bool (EAccount *ea, e_account_item_t type, gboolean val)
 {
 	g_return_if_fail (ea != NULL);
 
-	if (!e_account_writable(ea, type)) {
+	if (!e_account_writable (ea, type)) {
 		g_warning("Trying to set non-writable option account value");
 	} else {
-		gboolean *p = (gboolean *)addr(ea, type);
+		gboolean *p = (gboolean *)addr (ea, type);
 
 		if (*p != val) {
 			*p = val;
-			d(dump_account(ea));
-			g_signal_emit(ea, signals[CHANGED], 0, type);
+			d (dump_account (ea));
+			g_signal_emit (ea, signals[CHANGED], 0, type);
 		}
 	}
 }
@@ -1090,15 +1090,15 @@ e_account_writable_option (EAccount *ea, const gchar *protocol, const gchar *opt
 	gchar *key;
 	struct _option_info *info;
 
-	ea_setting_setup();
+	ea_setting_setup ();
 
-	key = alloca(strlen(protocol)+strlen(option)+2);
+	key = alloca (strlen (protocol)+strlen (option)+2);
 	sprintf(key, "%s_%s", protocol, option);
 
-	info = g_hash_table_lookup(ea_option_table, key);
+	info = g_hash_table_lookup (ea_option_table, key);
 	if (info == NULL) {
 		sprintf(key, "*_%s", option);
-		info = g_hash_table_lookup(ea_option_table, key);
+		info = g_hash_table_lookup (ea_option_table, key);
 	}
 
 	d(printf("checking writable option '%s' perms=%08x\n", option, info?info->perms:0));
@@ -1110,7 +1110,7 @@ e_account_writable_option (EAccount *ea, const gchar *protocol, const gchar *opt
 gboolean
 e_account_writable (EAccount *ea, e_account_item_t type)
 {
-	ea_setting_setup();
+	ea_setting_setup ();
 
 	return (account_info[type].perms & ea_perms) == 0;
 }
diff --git a/libedataserver/e-iterator.c b/libedataserver/e-iterator.c
index 2adbd3f..e7ccb50 100644
--- a/libedataserver/e-iterator.c
+++ b/libedataserver/e-iterator.c
@@ -24,7 +24,7 @@ e_iterator_class_init (EIteratorClass *klass)
 {
 	GObjectClass *object_class;
 
-	object_class = G_OBJECT_CLASS(klass);
+	object_class = G_OBJECT_CLASS (klass);
 
 	e_iterator_signals[INVALIDATE] =
 		g_signal_new ("invalidate",
@@ -61,8 +61,8 @@ e_iterator_init (EIterator *card)
 gconstpointer
 e_iterator_get      (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->get)
-		return E_ITERATOR_GET_CLASS(iterator)->get(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->get)
+		return E_ITERATOR_GET_CLASS (iterator)->get (iterator);
 	else
 		return NULL;
 }
@@ -70,22 +70,22 @@ e_iterator_get      (EIterator *iterator)
 void
 e_iterator_reset    (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->reset)
-		E_ITERATOR_GET_CLASS(iterator)->reset(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->reset)
+		E_ITERATOR_GET_CLASS (iterator)->reset (iterator);
 }
 
 void
 e_iterator_last     (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->last)
-		E_ITERATOR_GET_CLASS(iterator)->last(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->last)
+		E_ITERATOR_GET_CLASS (iterator)->last (iterator);
 }
 
 gboolean
 e_iterator_next     (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->next)
-		return E_ITERATOR_GET_CLASS(iterator)->next(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->next)
+		return E_ITERATOR_GET_CLASS (iterator)->next (iterator);
 	else
 		return FALSE;
 }
@@ -93,8 +93,8 @@ e_iterator_next     (EIterator *iterator)
 gboolean
 e_iterator_prev     (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->prev)
-		return E_ITERATOR_GET_CLASS(iterator)->prev(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->prev)
+		return E_ITERATOR_GET_CLASS (iterator)->prev (iterator);
 	else
 		return FALSE;
 }
@@ -102,24 +102,24 @@ e_iterator_prev     (EIterator *iterator)
 void
 e_iterator_delete   (EIterator *iterator)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->remove)
-		E_ITERATOR_GET_CLASS(iterator)->remove(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->remove)
+		E_ITERATOR_GET_CLASS (iterator)->remove (iterator);
 }
 
 void           e_iterator_insert     (EIterator  *iterator,
 				      gconstpointer object,
 				      gboolean    before)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->insert)
-		E_ITERATOR_GET_CLASS(iterator)->insert(iterator, object, before);
+	if (E_ITERATOR_GET_CLASS (iterator)->insert)
+		E_ITERATOR_GET_CLASS (iterator)->insert (iterator, object, before);
 }
 
 void
 e_iterator_set      (EIterator *iterator,
 			  const void    *object)
 {
-	if (E_ITERATOR_GET_CLASS(iterator)->set)
-		E_ITERATOR_GET_CLASS(iterator)->set(iterator, object);
+	if (E_ITERATOR_GET_CLASS (iterator)->set)
+		E_ITERATOR_GET_CLASS (iterator)->set (iterator, object);
 }
 
 gboolean
@@ -128,8 +128,8 @@ e_iterator_is_valid (EIterator *iterator)
 	if (!iterator)
 		return FALSE;
 
-	if (E_ITERATOR_GET_CLASS(iterator)->is_valid)
-		return E_ITERATOR_GET_CLASS(iterator)->is_valid(iterator);
+	if (E_ITERATOR_GET_CLASS (iterator)->is_valid)
+		return E_ITERATOR_GET_CLASS (iterator)->is_valid (iterator);
 	else
 		return FALSE;
 }
diff --git a/libedataserver/e-list-iterator.c b/libedataserver/e-list-iterator.c
index 1bcceea..1261ded 100644
--- a/libedataserver/e-list-iterator.c
+++ b/libedataserver/e-list-iterator.c
@@ -26,7 +26,7 @@ static void        e_list_iterator_last       (EIterator *iterator);
 static gconstpointer e_list_iterator_get        (EIterator *iterator);
 static void        e_list_iterator_dispose    (GObject *object);
 
-G_DEFINE_TYPE(EListIterator, e_list_iterator, E_TYPE_ITERATOR)
+G_DEFINE_TYPE (EListIterator, e_list_iterator, E_TYPE_ITERATOR)
 
 static void
 e_list_iterator_class_init (EListIteratorClass *klass)
@@ -34,8 +34,8 @@ e_list_iterator_class_init (EListIteratorClass *klass)
 	GObjectClass *object_class;
 	EIteratorClass *iterator_class;
 
-	object_class = G_OBJECT_CLASS(klass);
-	iterator_class = E_ITERATOR_CLASS(klass);
+	object_class = G_OBJECT_CLASS (klass);
+	iterator_class = E_ITERATOR_CLASS (klass);
 
 	object_class->dispose = e_list_iterator_dispose;
 
@@ -71,10 +71,10 @@ e_list_iterator_new (EList *list)
 	if (!iterator)
 		return NULL;
 	iterator->list = list;
-	g_object_ref(list);
+	g_object_ref (list);
 	iterator->iterator = list->list;
 
-	return E_ITERATOR(iterator);
+	return E_ITERATOR (iterator);
 }
 
 /*
@@ -83,9 +83,9 @@ e_list_iterator_new (EList *list)
 static void
 e_list_iterator_dispose (GObject *object)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(object);
-	e_list_remove_iterator(iterator->list, E_ITERATOR(iterator));
-	g_object_unref(iterator->list);
+	EListIterator *iterator = E_LIST_ITERATOR (object);
+	e_list_remove_iterator (iterator->list, E_ITERATOR (iterator));
+	g_object_unref (iterator->list);
 
 	if (G_OBJECT_CLASS (e_list_iterator_parent_class)->dispose)
 		(* G_OBJECT_CLASS (e_list_iterator_parent_class)->dispose) (object);
@@ -94,7 +94,7 @@ e_list_iterator_dispose (GObject *object)
 static gconstpointer
 e_list_iterator_get      (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	if (iterator->iterator)
 		return iterator->iterator->data;
 	else
@@ -104,23 +104,23 @@ e_list_iterator_get      (EIterator *_iterator)
 static void
 e_list_iterator_reset    (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	iterator->iterator = iterator->list->list;
 }
 
 static void
 e_list_iterator_last     (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
-	iterator->iterator = g_list_last(iterator->list->list);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
+	iterator->iterator = g_list_last (iterator->list->list);
 }
 
 static gboolean
 e_list_iterator_next     (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	if (iterator->iterator)
-		iterator->iterator = g_list_next(iterator->iterator);
+		iterator->iterator = g_list_next (iterator->iterator);
 	else
 		iterator->iterator = iterator->list->list;
 	return (iterator->iterator != NULL);
@@ -129,11 +129,11 @@ e_list_iterator_next     (EIterator *_iterator)
 static gboolean
 e_list_iterator_prev     (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	if (iterator->iterator)
-		iterator->iterator = g_list_previous(iterator->iterator);
+		iterator->iterator = g_list_previous (iterator->iterator);
 	else
-		iterator->iterator = g_list_last(iterator->list->list);
+		iterator->iterator = g_list_last (iterator->list->list);
 	return (iterator->iterator != NULL);
 }
 
@@ -142,40 +142,40 @@ e_list_iterator_insert   (EIterator  *_iterator,
 			  gconstpointer object,
 			  gboolean    before)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	gpointer data;
 	if (iterator->list->copy)
-		data = iterator->list->copy(object, iterator->list->closure);
+		data = iterator->list->copy (object, iterator->list->closure);
 	else
 		data = (gpointer) object;
 	if (iterator->iterator) {
 		if (before) {
-			iterator->list->list = g_list_first(g_list_prepend(iterator->iterator, data));
+			iterator->list->list = g_list_first (g_list_prepend (iterator->iterator, data));
 			iterator->iterator = iterator->iterator->prev;
 		} else {
 			if (iterator->iterator->next)
-				iterator->iterator->next = g_list_prepend(iterator->iterator->next, data);
+				iterator->iterator->next = g_list_prepend (iterator->iterator->next, data);
 			else
-				iterator->iterator = g_list_append(iterator->iterator, data);
+				iterator->iterator = g_list_append (iterator->iterator, data);
 			iterator->iterator = iterator->iterator->next;
 		}
-		e_list_invalidate_iterators(iterator->list, E_ITERATOR(iterator));
+		e_list_invalidate_iterators (iterator->list, E_ITERATOR (iterator));
 	} else {
 		if (before) {
-			iterator->list->list = g_list_append(iterator->list->list, data);
-			iterator->iterator = g_list_last(iterator->list->list);
+			iterator->list->list = g_list_append (iterator->list->list, data);
+			iterator->iterator = g_list_last (iterator->list->list);
 		} else {
-			iterator->list->list = g_list_prepend(iterator->list->list, data);
+			iterator->list->list = g_list_prepend (iterator->list->list, data);
 			iterator->iterator = iterator->list->list;
 		}
-		e_list_invalidate_iterators(iterator->list, E_ITERATOR(iterator));
+		e_list_invalidate_iterators (iterator->list, E_ITERATOR (iterator));
 	}
 }
 
 static void
 e_list_iterator_remove   (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	if (iterator->iterator) {
 		e_list_remove_link (iterator->list, iterator->iterator);
 	}
@@ -185,12 +185,12 @@ static void
 e_list_iterator_set      (EIterator  *_iterator,
 			  gconstpointer object)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	if (iterator->iterator) {
 		if (iterator->list->free)
-			iterator->list->free(iterator->iterator->data, iterator->list->closure);
+			iterator->list->free (iterator->iterator->data, iterator->list->closure);
 		if (iterator->list->copy)
-			iterator->iterator->data = iterator->list->copy(object, iterator->list->closure);
+			iterator->iterator->data = iterator->list->copy (object, iterator->list->closure);
 		else
 			iterator->iterator->data = (gpointer) object;
 	}
@@ -199,13 +199,13 @@ e_list_iterator_set      (EIterator  *_iterator,
 static gboolean
 e_list_iterator_is_valid (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	return iterator->iterator != NULL;
 }
 
 static void
 e_list_iterator_invalidate (EIterator *_iterator)
 {
-	EListIterator *iterator = E_LIST_ITERATOR(_iterator);
+	EListIterator *iterator = E_LIST_ITERATOR (_iterator);
 	iterator->iterator = NULL;
 }
diff --git a/libedataserver/e-list.c b/libedataserver/e-list.c
index 1a79916..b3504b7 100644
--- a/libedataserver/e-list.c
+++ b/libedataserver/e-list.c
@@ -20,7 +20,7 @@ e_list_class_init (EListClass *klass)
 {
 	GObjectClass *object_class;
 
-	object_class = G_OBJECT_CLASS(klass);
+	object_class = G_OBJECT_CLASS (klass);
 
 	object_class->dispose = e_list_dispose;
 }
@@ -59,7 +59,7 @@ e_list_duplicate (EList *old)
 	list->copy    = old->copy;
 	list->free    = old->free;
 	list->closure = old->closure;
-	list->list    = g_list_copy(old->list);
+	list->list    = g_list_copy (old->list);
 	if (list->copy) {
 		GList *listlist;
 		for (listlist = list->list; listlist; listlist = listlist->next) {
@@ -74,26 +74,26 @@ e_list_get_iterator (EList *list)
 {
 	EIterator *iterator = NULL;
 	g_return_val_if_fail (list != NULL, NULL);
-	iterator = e_list_iterator_new(list);
+	iterator = e_list_iterator_new (list);
 	if (iterator)
-		list->iterators = g_list_append(list->iterators, iterator);
+		list->iterators = g_list_append (list->iterators, iterator);
 	return iterator;
 }
 
 gint
 e_list_length (EList *list)
 {
-	return g_list_length(list->list);
+	return g_list_length (list->list);
 }
 
 void
 e_list_append (EList *list, gconstpointer data)
 {
-	e_list_invalidate_iterators(list, NULL);
+	e_list_invalidate_iterators (list, NULL);
 	if (list->copy)
-		list->list = g_list_append(list->list, list->copy(data, list->closure));
+		list->list = g_list_append (list->list, list->copy (data, list->closure));
 	else
-		list->list = g_list_append(list->list, (gpointer) data);
+		list->list = g_list_append (list->list, (gpointer) data);
 }
 
 void
@@ -102,7 +102,7 @@ e_list_remove (EList *list, gconstpointer data)
 	GList *link;
 	link = g_list_find (list->list, data);
 	if (link)
-		e_list_remove_link(list, link);
+		e_list_remove_link (list, link);
 }
 
 void
@@ -111,7 +111,7 @@ e_list_invalidate_iterators (EList *list, EIterator *skip)
 	GList *iterators = list->iterators;
 	for (; iterators; iterators = iterators->next) {
 		if (iterators->data != skip) {
-			e_iterator_invalidate(E_ITERATOR(iterators->data));
+			e_iterator_invalidate (E_ITERATOR (iterators->data));
 		}
 	}
 }
@@ -125,19 +125,19 @@ e_list_remove_link (EList *list, GList *link)
 	GList *iterators = list->iterators;
 	for (; iterators; iterators = iterators->next) {
 		if (((EListIterator *)iterators->data)->iterator == link) {
-			e_iterator_prev(iterators->data);
+			e_iterator_prev (iterators->data);
 		}
 	}
 	if (list->free)
-		list->free(link->data, list->closure);
-	list->list = g_list_remove_link(list->list, link);
-	g_list_free_1(link);
+		list->free (link->data, list->closure);
+	list->list = g_list_remove_link (list->list, link);
+	g_list_free_1 (link);
 }
 
 void
 e_list_remove_iterator (EList *list, EIterator *iterator)
 {
-	list->iterators = g_list_remove(list->iterators, iterator);
+	list->iterators = g_list_remove (list->iterators, iterator);
 }
 
 /*
@@ -146,10 +146,10 @@ e_list_remove_iterator (EList *list, EIterator *iterator)
 static void
 e_list_dispose (GObject *object)
 {
-	EList *list = E_LIST(object);
+	EList *list = E_LIST (object);
 	if (list->free)
-		g_list_foreach(list->list, (GFunc) list->free, list->closure);
-	g_list_free(list->list);
+		g_list_foreach (list->list, (GFunc) list->free, list->closure);
+	g_list_free (list->list);
 
 	(* G_OBJECT_CLASS (e_list_parent_class)->dispose) (object);
 }
diff --git a/libedataserver/e-memory.c b/libedataserver/e-memory.c
index fe02c13..0eda140 100644
--- a/libedataserver/e-memory.c
+++ b/libedataserver/e-memory.c
@@ -32,18 +32,18 @@
 
 struct timeval timeit_start;
 
-static time_start(const gchar *desc)
+static time_start (const gchar *desc)
 {
-	gettimeofday(&timeit_start, NULL);
+	gettimeofday (&timeit_start, NULL);
 	printf("starting: %s\n", desc);
 }
 
-static time_end(const gchar *desc)
+static time_end (const gchar *desc)
 {
 	gulong diff;
 	struct timeval end;
 
-	gettimeofday(&end, NULL);
+	gettimeofday (&end, NULL);
 	diff = end.tv_sec * 1000 + end.tv_usec/1000;
 	diff -= timeit_start.tv_sec * 1000 + timeit_start.tv_usec/1000;
 	printf("%s took %ld.%03ld seconds\n",
@@ -79,13 +79,13 @@ typedef struct _EMemChunk {
  *
  * Returns: The new header.
  **/
-MemChunk *e_memchunk_new(gint atomcount, gint atomsize)
+MemChunk *e_memchunk_new (gint atomcount, gint atomsize)
 {
-	MemChunk *m = g_malloc(sizeof(*m));
+	MemChunk *m = g_malloc (sizeof (*m));
 
 	m->blocksize = atomcount;
-	m->atomsize = MAX(atomsize, sizeof(MemChunkFreeNode));
-	m->blocks = g_ptr_array_new();
+	m->atomsize = MAX (atomsize, sizeof (MemChunkFreeNode));
+	m->blocks = g_ptr_array_new ();
 	m->free = NULL;
 
 	return m;
@@ -97,7 +97,7 @@ MemChunk *e_memchunk_new(gint atomcount, gint atomsize)
  *
  * Allocate a new atom size block of memory from a memchunk.
  **/
-gpointer e_memchunk_alloc(MemChunk *m)
+gpointer e_memchunk_alloc (MemChunk *m)
 {
 	gchar *b;
 	MemChunkFreeNode *f;
@@ -114,8 +114,8 @@ gpointer e_memchunk_alloc(MemChunk *m)
 		}
 		return mem;
 	} else {
-		b = g_malloc(m->blocksize * m->atomsize);
-		g_ptr_array_add(m->blocks, b);
+		b = g_malloc (m->blocksize * m->atomsize);
+		g_ptr_array_add (m->blocks, b);
 		f = (MemChunkFreeNode *)&b[m->atomsize];
 		f->atoms = m->blocksize-1;
 		f->next = NULL;
@@ -124,12 +124,12 @@ gpointer e_memchunk_alloc(MemChunk *m)
 	}
 }
 
-gpointer e_memchunk_alloc0(EMemChunk *m)
+gpointer e_memchunk_alloc0 (EMemChunk *m)
 {
 	gpointer mem;
 
-	mem = e_memchunk_alloc(m);
-	memset(mem, 0, m->atomsize);
+	mem = e_memchunk_alloc (m);
+	memset (mem, 0, m->atomsize);
 
 	return mem;
 }
@@ -143,7 +143,7 @@ gpointer e_memchunk_alloc0(EMemChunk *m)
  * memchunk.
  **/
 void
-e_memchunk_free(MemChunk *m, gpointer mem)
+e_memchunk_free (MemChunk *m, gpointer mem)
 {
 	MemChunkFreeNode *f;
 
@@ -169,7 +169,7 @@ e_memchunk_free(MemChunk *m, gpointer mem)
  * is to be used repeatedly.
  **/
 void
-e_memchunk_empty(MemChunk *m)
+e_memchunk_empty (MemChunk *m)
 {
 	gint i;
 	MemChunkFreeNode *f, *h = NULL;
@@ -190,7 +190,7 @@ struct _cleaninfo {
 	gint size;		/* just so tree_search has it, sigh */
 };
 
-static gint tree_compare(struct _cleaninfo *a, struct _cleaninfo *b)
+static gint tree_compare (struct _cleaninfo *a, struct _cleaninfo *b)
 {
 	if (a->base < b->base)
 		return -1;
@@ -199,7 +199,7 @@ static gint tree_compare(struct _cleaninfo *a, struct _cleaninfo *b)
 	return 0;
 }
 
-static gint tree_search(struct _cleaninfo *a, gchar *mem)
+static gint tree_search (struct _cleaninfo *a, gchar *mem)
 {
 	if (a->base <= mem) {
 		if (mem < &a->base[a->size])
@@ -221,7 +221,7 @@ static gint tree_search(struct _cleaninfo *a, gchar *mem)
  * greater than atomcount).
  **/
 void
-e_memchunk_clean(MemChunk *m)
+e_memchunk_clean (MemChunk *m)
 {
 	GTree *tree;
 	gint i;
@@ -233,20 +233,20 @@ e_memchunk_clean(MemChunk *m)
 		return;
 
 	/* first, setup the tree/list so we can map free block addresses to block addresses */
-	tree = g_tree_new((GCompareFunc)tree_compare);
+	tree = g_tree_new ((GCompareFunc)tree_compare);
 	for (i=0;i<m->blocks->len;i++) {
-		ci = alloca(sizeof(*ci));
+		ci = alloca (sizeof (*ci));
 		ci->count = 0;
 		ci->base = m->blocks->pdata[i];
 		ci->size = m->blocksize * m->atomsize;
-		g_tree_insert(tree, ci, ci);
+		g_tree_insert (tree, ci, ci);
 		ci->next = hi;
 		hi = ci;
 	}
 
 	/* now, scan all free nodes, and count them in their tree node */
 	while (f) {
-		ci = g_tree_search(tree, (GCompareFunc) tree_search, f);
+		ci = g_tree_search (tree, (GCompareFunc) tree_search, f);
 		if (ci) {
 			ci->count += f->atoms;
 		} else {
@@ -276,13 +276,13 @@ e_memchunk_clean(MemChunk *m)
 				f = f->next;
 			}
 
-			g_ptr_array_remove_fast(m->blocks, ci->base);
-			g_free(ci->base);
+			g_ptr_array_remove_fast (m->blocks, ci->base);
+			g_free (ci->base);
 		}
 		ci = ci->next;
 	}
 
-	g_tree_destroy(tree);
+	g_tree_destroy (tree);
 }
 
 /**
@@ -292,7 +292,7 @@ e_memchunk_clean(MemChunk *m)
  * Free the memchunk header, and all associated memory.
  **/
 void
-e_memchunk_destroy(MemChunk *m)
+e_memchunk_destroy (MemChunk *m)
 {
 	gint i;
 
@@ -300,9 +300,9 @@ e_memchunk_destroy(MemChunk *m)
 		return;
 
 	for (i=0;i<m->blocks->len;i++)
-		g_free(m->blocks->pdata[i]);
-	g_ptr_array_free(m->blocks, TRUE);
-	g_free(m);
+		g_free (m->blocks->pdata[i]);
+	g_ptr_array_free (m->blocks, TRUE);
+	g_free (m);
 }
 
 #if 0
@@ -312,7 +312,7 @@ e_memchunk_destroy(MemChunk *m)
 
 #define s(x)
 
-main()
+main ()
 {
 	gint i;
 	MemChunk *mc;
@@ -320,7 +320,7 @@ main()
 	GMemChunk *gmc;
 	struct _EStrv *s;
 
-	s = strv_new(8);
+	s = strv_new (8);
 	s = strv_set(s, 1, "Testing 1");
 	s = strv_set(s, 2, "Testing 2");
 	s = strv_set(s, 3, "Testing 3");
@@ -332,10 +332,10 @@ main()
 		printf("s[%d] = %s\n", i, strv_get(s, i));
 	}
 
-	s(sleep(5));
+	s (sleep (5));
 
 	printf("packing ...\n");
-	s = strv_pack(s);
+	s = strv_pack (s);
 
 	for (i=0;i<8;i++) {
 		printf("s[%d] = %s\n", i, strv_get(s, i));
@@ -350,58 +350,58 @@ main()
 	}
 
 	printf("packing ...\n");
-	s = strv_pack(s);
+	s = strv_pack (s);
 
 	for (i=0;i<8;i++) {
 		printf("s[%d] = %s\n", i, strv_get(s, i));
 	}
 
-	strv_free(s);
+	strv_free (s);
 
 #if 0
 	time_start("Using memchunks");
-	mc = memchunk_new(CHUNK_COUNT, CHUNK_SIZE);
+	mc = memchunk_new (CHUNK_COUNT, CHUNK_SIZE);
 	for (i=0;i<1000000;i++) {
-		mem = memchunk_alloc(mc);
+		mem = memchunk_alloc (mc);
 		if ((i & 1) == 0)
-			memchunk_free(mc, mem);
+			memchunk_free (mc, mem);
 	}
-	s(sleep(10));
-	memchunk_destroy(mc);
+	s (sleep (10));
+	memchunk_destroy (mc);
 	time_end("allocating 1000000 memchunks, freeing 500k");
 
 	time_start("Using gmemchunks");
 	gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_SIZE*CHUNK_COUNT, G_ALLOC_AND_FREE);
 	for (i=0;i<1000000;i++) {
-		mem = g_mem_chunk_alloc(gmc);
+		mem = g_mem_chunk_alloc (gmc);
 		if ((i & 1) == 0)
-			g_mem_chunk_free(gmc, mem);
+			g_mem_chunk_free (gmc, mem);
 	}
-	s(sleep(10));
-	g_mem_chunk_destroy(gmc);
+	s (sleep (10));
+	g_mem_chunk_destroy (gmc);
 	time_end("allocating 1000000 gmemchunks, freeing 500k");
 
 	time_start("Using memchunks");
-	mc = memchunk_new(CHUNK_COUNT, CHUNK_SIZE);
+	mc = memchunk_new (CHUNK_COUNT, CHUNK_SIZE);
 	for (i=0;i<1000000;i++) {
-		mem = memchunk_alloc(mc);
+		mem = memchunk_alloc (mc);
 	}
-	s(sleep(10));
-	memchunk_destroy(mc);
+	s (sleep (10));
+	memchunk_destroy (mc);
 	time_end("allocating 1000000 memchunks");
 
 	time_start("Using gmemchunks");
 	gmc = g_mem_chunk_new("memchunk", CHUNK_SIZE, CHUNK_COUNT*CHUNK_SIZE, G_ALLOC_ONLY);
 	for (i=0;i<1000000;i++) {
-		mem = g_mem_chunk_alloc(gmc);
+		mem = g_mem_chunk_alloc (gmc);
 	}
-	s(sleep(10));
-	g_mem_chunk_destroy(gmc);
+	s (sleep (10));
+	g_mem_chunk_destroy (gmc);
 	time_end("allocating 1000000 gmemchunks");
 
 	time_start("Using malloc");
 	for (i=0;i<1000000;i++) {
-		malloc(CHUNK_SIZE);
+		malloc (CHUNK_SIZE);
 	}
 	time_end("allocating 1000000 malloc");
 #endif
diff --git a/libedataserver/e-memory.h b/libedataserver/e-memory.h
index 739bc08..e7810af 100644
--- a/libedataserver/e-memory.h
+++ b/libedataserver/e-memory.h
@@ -30,13 +30,13 @@ G_BEGIN_DECLS
 /* this is like gmemchunk, only faster and less overhead (only 4 bytes for every atomcount allocations) */
 typedef struct _EMemChunk EMemChunk;
 
-EMemChunk *e_memchunk_new(gint atomcount, gint atomsize);
-gpointer e_memchunk_alloc(EMemChunk *m);
-gpointer e_memchunk_alloc0(EMemChunk *m);
-void e_memchunk_free(EMemChunk *m, gpointer mem);
-void e_memchunk_empty(EMemChunk *m);
-void e_memchunk_clean(EMemChunk *m);
-void e_memchunk_destroy(EMemChunk *m);
+EMemChunk *e_memchunk_new (gint atomcount, gint atomsize);
+gpointer e_memchunk_alloc (EMemChunk *m);
+gpointer e_memchunk_alloc0 (EMemChunk *m);
+void e_memchunk_free (EMemChunk *m, gpointer mem);
+void e_memchunk_empty (EMemChunk *m);
+void e_memchunk_clean (EMemChunk *m);
+void e_memchunk_destroy (EMemChunk *m);
 
 G_END_DECLS
 
diff --git a/libedataserver/e-proxy.c b/libedataserver/e-proxy.c
index 15b4575..643aba8 100644
--- a/libedataserver/e-proxy.c
+++ b/libedataserver/e-proxy.c
@@ -301,7 +301,7 @@ ep_need_proxy_http (EProxy* proxy, const gchar * host)
 		so_addr = soup_address_get_sockaddr (addr, &addr_len);
 
 		/* This will never happen, since we have already called
-		   soup_address_resolve_sync().
+		   soup_address_resolve_sync ().
 		*/
 		if (!so_addr)
 			return TRUE;
@@ -406,7 +406,7 @@ ep_manipulate_ipv4 (ProxyHostAddr *host_addr,
 }
 
 static void
-ipv6_network_addr(const struct in6_addr *addr, const struct in6_addr *mask,
+ipv6_network_addr (const struct in6_addr *addr, const struct in6_addr *mask,
                   struct in6_addr *res)
 {
 	gint i;
@@ -438,7 +438,7 @@ ep_manipulate_ipv6 (ProxyHostAddr *host_addr,
         }
         if (netmask) {
 		gchar *endptr;
-		gint width = strtol(netmask, &endptr, 10);
+		gint width = strtol (netmask, &endptr, 10);
 
 		if (*endptr != '\0' || width < 0 || width > 128) {
 			has_error = TRUE;
@@ -450,7 +450,7 @@ ep_manipulate_ipv6 (ProxyHostAddr *host_addr,
 			mask->s6_addr[i] = 0xff;
 		}
 		mask->s6_addr[i] = (0xff << (8 - width % 8)) & 0xff;
-		ipv6_network_addr(addr, mask, addr);
+		ipv6_network_addr (addr, mask, addr);
         } else {
 		for (i = 0; i < 16; ++i) {
 			mask->s6_addr[i] = 0xff;
@@ -498,7 +498,7 @@ ep_parse_ignore_host (gpointer data, gpointer user_data)
 		so_addr = soup_address_get_sockaddr (addr, &addr_len);
 
 		/* This will never happen, since we have already called
-		   soup_address_resolve_sync().
+		   soup_address_resolve_sync ().
 		*/
 		if (!so_addr)
 			goto error;
diff --git a/libedataserver/e-sexp.c b/libedataserver/e-sexp.c
index 1d6a680..72a555a 100644
--- a/libedataserver/e-sexp.c
+++ b/libedataserver/e-sexp.c
@@ -102,11 +102,11 @@
 G_DEFINE_TYPE (ESExp, e_sexp, G_TYPE_OBJECT)
 #endif
 
-static struct _ESExpTerm * parse_list(ESExp *f, gint gotbrace);
-static struct _ESExpTerm * parse_value(ESExp *f);
+static struct _ESExpTerm * parse_list (ESExp *f, gint gotbrace);
+static struct _ESExpTerm * parse_value (ESExp *f);
 
 #ifdef TESTER
-static void parse_dump_term(struct _ESExpTerm *t, gint depth);
+static void parse_dump_term (struct _ESExpTerm *t, gint depth);
 #endif
 
 #ifdef E_SEXP_IS_G_OBJECT
@@ -158,30 +158,30 @@ static const GScannerConfig scanner_config =
 
 /* jumps back to the caller of f->failenv, only to be called from inside a callback */
 void
-e_sexp_fatal_error(struct _ESExp *f, const gchar *why, ...)
+e_sexp_fatal_error (struct _ESExp *f, const gchar *why, ...)
 {
 	va_list args;
 
 	if (f->error)
-		g_free(f->error);
+		g_free (f->error);
 
-	va_start(args, why);
-	f->error = g_strdup_vprintf(why, args);
-	va_end(args);
+	va_start (args, why);
+	f->error = g_strdup_vprintf (why, args);
+	va_end (args);
 
-	longjmp(f->failenv, 1);
+	longjmp (f->failenv, 1);
 }
 
 const gchar *
-e_sexp_error(struct _ESExp *f)
+e_sexp_error (struct _ESExp *f)
 {
 	return f->error;
 }
 
 struct _ESExpResult *
-e_sexp_result_new(struct _ESExp *f, gint type)
+e_sexp_result_new (struct _ESExp *f, gint type)
 {
-	struct _ESExpResult *r = e_memchunk_alloc0(f->result_chunks);
+	struct _ESExpResult *r = e_memchunk_alloc0 (f->result_chunks);
 	r->type = type;
 	r->occuring_start = 0;
 	r->occuring_end = _TIME_MAX;
@@ -190,38 +190,38 @@ e_sexp_result_new(struct _ESExp *f, gint type)
 }
 
 void
-e_sexp_result_free(struct _ESExp *f, struct _ESExpResult *t)
+e_sexp_result_free (struct _ESExp *f, struct _ESExpResult *t)
 {
 	if (t == NULL)
 		return;
 
 	switch (t->type) {
 	case ESEXP_RES_ARRAY_PTR:
-		g_ptr_array_free(t->value.ptrarray, TRUE);
+		g_ptr_array_free (t->value.ptrarray, TRUE);
 		break;
 	case ESEXP_RES_BOOL:
 	case ESEXP_RES_INT:
 	case ESEXP_RES_TIME:
 		break;
 	case ESEXP_RES_STRING:
-		g_free(t->value.string);
+		g_free (t->value.string);
 		break;
 	case ESEXP_RES_UNDEFINED:
 		break;
 	default:
-		g_assert_not_reached();
+		g_assert_not_reached ();
 	}
-	e_memchunk_free(f->result_chunks, t);
+	e_memchunk_free (f->result_chunks, t);
 }
 
 /* used in normal functions if they have to abort, and free their arguments */
 void
-e_sexp_resultv_free(struct _ESExp *f, gint argc, struct _ESExpResult **argv)
+e_sexp_resultv_free (struct _ESExp *f, gint argc, struct _ESExpResult **argv)
 {
 	gint i;
 
 	for (i=0;i<argc;i++) {
-		e_sexp_result_free(f, argv[i]);
+		e_sexp_result_free (f, argv[i]);
 	}
 }
 
@@ -235,25 +235,25 @@ struct IterData {
 
 /* ok, store any values that are in all sets */
 static void
-htand(gchar *key, gint value, struct IterData *iter_data)
+htand (gchar *key, gint value, struct IterData *iter_data)
 {
 	if (value == iter_data->count) {
-		g_ptr_array_add(iter_data->uids, key);
+		g_ptr_array_add (iter_data->uids, key);
 	}
 }
 
 /* or, store all unique values */
 static void
-htor(gchar *key, gint value, struct IterData *iter_data)
+htor (gchar *key, gint value, struct IterData *iter_data)
 {
-	g_ptr_array_add(iter_data->uids, key);
+	g_ptr_array_add (iter_data->uids, key);
 }
 
 static ESExpResult *
-term_eval_and(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_and (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1;
-	GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
+	GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
 	struct IterData lambdafoo;
 	gint type=-1;
 	gint bool = TRUE;
@@ -262,19 +262,19 @@ term_eval_and(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
 
 	r(printf("( and\n"));
 
-	r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	oper = "AND";
 	f->operators = g_slist_prepend (f->operators, (gpointer) oper);
 
 	for (i=0;bool && i<argc;i++) {
-		r1 = e_sexp_term_eval(f, argv[i]);
+		r1 = e_sexp_term_eval (f, argv[i]);
 		if (type == -1)
 			type = r1->type;
 		if (type != r1->type) {
-			e_sexp_result_free(f, r);
-			e_sexp_result_free(f, r1);
-			g_hash_table_destroy(ht);
+			e_sexp_result_free (f, r);
+			e_sexp_result_free (f, r1);
+			g_hash_table_destroy (ht);
 			e_sexp_fatal_error(f, "Invalid types in AND");
 		} else if (r1->type == ESEXP_RES_ARRAY_PTR) {
 			gchar **a1;
@@ -285,20 +285,20 @@ term_eval_and(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
 			for (j=0;j<l1;j++) {
 				gpointer ptr;
 				gint n;
-				ptr = g_hash_table_lookup(ht, a1[j]);
-				n = GPOINTER_TO_INT(ptr);
-				g_hash_table_insert(ht, a1[j], GINT_TO_POINTER(n+1));
+				ptr = g_hash_table_lookup (ht, a1[j]);
+				n = GPOINTER_TO_INT (ptr);
+				g_hash_table_insert (ht, a1[j], GINT_TO_POINTER (n+1));
 			}
 		} else if (r1->type == ESEXP_RES_BOOL) {
 			bool = bool && r1->value.boolean;
 		}
-		e_sexp_result_free(f, r1);
+		e_sexp_result_free (f, r1);
 	}
 
 	if (type == ESEXP_RES_ARRAY_PTR) {
 		lambdafoo.count = argc;
-		lambdafoo.uids = g_ptr_array_new();
-		g_hash_table_foreach(ht, (GHFunc)htand, &lambdafoo);
+		lambdafoo.uids = g_ptr_array_new ();
+		g_hash_table_foreach (ht, (GHFunc)htand, &lambdafoo);
 		r->type = ESEXP_RES_ARRAY_PTR;
 		r->value.ptrarray = lambdafoo.uids;
 	} else if (type == ESEXP_RES_BOOL) {
@@ -306,17 +306,17 @@ term_eval_and(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
 		r->value.boolean = bool;
 	}
 
-	g_hash_table_destroy(ht);
+	g_hash_table_destroy (ht);
 	f->operators = g_slist_remove (f->operators, oper);
 
 	return r;
 }
 
 static ESExpResult *
-term_eval_or(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_or (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1;
-	GHashTable *ht = g_hash_table_new(g_str_hash, g_str_equal);
+	GHashTable *ht = g_hash_table_new (g_str_hash, g_str_equal);
 	struct IterData lambdafoo;
 	gint type = -1;
 	gint bool = FALSE;
@@ -328,16 +328,16 @@ term_eval_or(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer dat
 	oper = "OR";
 	f->operators = g_slist_prepend (f->operators, (gpointer) oper);
 
-	r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	for (i=0;!bool && i<argc;i++) {
-		r1 = e_sexp_term_eval(f, argv[i]);
+		r1 = e_sexp_term_eval (f, argv[i]);
 		if (type == -1)
 			type = r1->type;
 		if (r1->type != type) {
-			e_sexp_result_free(f, r);
-			e_sexp_result_free(f, r1);
-			g_hash_table_destroy(ht);
+			e_sexp_result_free (f, r);
+			e_sexp_result_free (f, r1);
+			g_hash_table_destroy (ht);
 			e_sexp_fatal_error(f, "Invalid types in OR");
 		} else if (r1->type == ESEXP_RES_ARRAY_PTR) {
 			gchar **a1;
@@ -346,32 +346,32 @@ term_eval_or(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer dat
 			a1 = (gchar **)r1->value.ptrarray->pdata;
 			l1 = r1->value.ptrarray->len;
 			for (j=0;j<l1;j++) {
-				g_hash_table_insert(ht, a1[j], (gpointer)1);
+				g_hash_table_insert (ht, a1[j], (gpointer)1);
 			}
 		} else if (r1->type == ESEXP_RES_BOOL) {
 			bool |= r1->value.boolean;
 		}
-		e_sexp_result_free(f, r1);
+		e_sexp_result_free (f, r1);
 	}
 
 	if (type == ESEXP_RES_ARRAY_PTR) {
 		lambdafoo.count = argc;
-		lambdafoo.uids = g_ptr_array_new();
-		g_hash_table_foreach(ht, (GHFunc)htor, &lambdafoo);
+		lambdafoo.uids = g_ptr_array_new ();
+		g_hash_table_foreach (ht, (GHFunc)htor, &lambdafoo);
 		r->type = ESEXP_RES_ARRAY_PTR;
 		r->value.ptrarray = lambdafoo.uids;
 	} else if (type == ESEXP_RES_BOOL) {
 		r->type = ESEXP_RES_BOOL;
 		r->value.boolean = bool;
 	}
-	g_hash_table_destroy(ht);
+	g_hash_table_destroy (ht);
 
 	f->operators = g_slist_remove (f->operators, oper);
 	return r;
 }
 
 static ESExpResult *
-term_eval_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_not (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	gint res = TRUE;
 	ESExpResult *r;
@@ -381,26 +381,26 @@ term_eval_not(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 		    && argv[0]->value.boolean)
 			res = FALSE;
 	}
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 	r->value.boolean = res;
 	return r;
 }
 
 /* this should support all arguments ...? */
 static ESExpResult *
-term_eval_lt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_lt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	if (argc == 2) {
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 		if (r1->type != r2->type) {
-			e_sexp_result_free(f, r1);
-			e_sexp_result_free(f, r2);
-			e_sexp_result_free(f, r);
+			e_sexp_result_free (f, r1);
+			e_sexp_result_free (f, r2);
+			e_sexp_result_free (f, r);
 			e_sexp_fatal_error(f, "Incompatible types in compare <");
 		} else if (r1->type == ESEXP_RES_INT) {
 			r->type = ESEXP_RES_BOOL;
@@ -410,29 +410,29 @@ term_eval_lt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer dat
 			r->value.boolean = r1->value.time < r2->value.time;
 		} else if (r1->type == ESEXP_RES_STRING) {
 			r->type = ESEXP_RES_BOOL;
-			r->value.boolean = strcmp(r1->value.string, r2->value.string) < 0;
+			r->value.boolean = strcmp (r1->value.string, r2->value.string) < 0;
 		}
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 	}
 	return r;
 }
 
 /* this should support all arguments ...? */
 static ESExpResult *
-term_eval_gt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_gt (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	if (argc == 2) {
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 		if (r1->type != r2->type) {
-			e_sexp_result_free(f, r1);
-			e_sexp_result_free(f, r2);
-			e_sexp_result_free(f, r);
+			e_sexp_result_free (f, r1);
+			e_sexp_result_free (f, r2);
+			e_sexp_result_free (f, r);
 			e_sexp_fatal_error(f, "Incompatible types in compare >");
 		} else if (r1->type == ESEXP_RES_INT) {
 			r->type = ESEXP_RES_BOOL;
@@ -442,25 +442,25 @@ term_eval_gt(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer dat
 			r->value.boolean = r1->value.time > r2->value.time;
 		} else if (r1->type == ESEXP_RES_STRING) {
 			r->type = ESEXP_RES_BOOL;
-			r->value.boolean = strcmp(r1->value.string, r2->value.string) > 0;
+			r->value.boolean = strcmp (r1->value.string, r2->value.string) > 0;
 		}
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 	}
 	return r;
 }
 
 /* this should support all arguments ...? */
 static ESExpResult *
-term_eval_eq(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_eq (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r, *r1, *r2;
 
-	r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+	r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 
 	if (argc == 2) {
-		r1 = e_sexp_term_eval(f, argv[0]);
-		r2 = e_sexp_term_eval(f, argv[1]);
+		r1 = e_sexp_term_eval (f, argv[0]);
+		r2 = e_sexp_term_eval (f, argv[1]);
 		if (r1->type != r2->type) {
 			r->value.boolean = FALSE;
 		} else if (r1->type == ESEXP_RES_INT) {
@@ -470,16 +470,16 @@ term_eval_eq(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer dat
 		} else if (r1->type == ESEXP_RES_TIME) {
 			r->value.boolean = r1->value.time == r2->value.time;
 		} else if (r1->type == ESEXP_RES_STRING) {
-			r->value.boolean = strcmp(r1->value.string, r2->value.string) == 0;
+			r->value.boolean = strcmp (r1->value.string, r2->value.string) == 0;
 		}
-		e_sexp_result_free(f, r1);
-		e_sexp_result_free(f, r2);
+		e_sexp_result_free (f, r1);
+		e_sexp_result_free (f, r2);
 	}
 	return r;
 }
 
 static ESExpResult *
-term_eval_plus(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_plus (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	struct _ESExpResult *r=NULL;
 	gint type;
@@ -494,24 +494,24 @@ term_eval_plus(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 				total += argv[i]->value.number;
 			}
 			if (i<argc) {
-				e_sexp_resultv_free(f, argc, argv);
+				e_sexp_resultv_free (f, argc, argv);
 				e_sexp_fatal_error(f, "Invalid types in (+ ints)");
 			}
-			r = e_sexp_result_new(f, ESEXP_RES_INT);
+			r = e_sexp_result_new (f, ESEXP_RES_INT);
 			r->value.number = total;
 			break; }
 		case ESEXP_RES_STRING: {
-			GString *s = g_string_new(argv[0]->value.string);
+			GString *s = g_string_new (argv[0]->value.string);
 			for (i=1;i<argc && argv[i]->type == ESEXP_RES_STRING;i++) {
-				g_string_append(s, argv[i]->value.string);
+				g_string_append (s, argv[i]->value.string);
 			}
 			if (i<argc) {
-				e_sexp_resultv_free(f, argc, argv);
+				e_sexp_resultv_free (f, argc, argv);
 				e_sexp_fatal_error(f, "Invalid types in (+ strings)");
 			}
-			r = e_sexp_result_new(f, ESEXP_RES_STRING);
+			r = e_sexp_result_new (f, ESEXP_RES_STRING);
 			r->value.string = s->str;
-			g_string_free(s, FALSE);
+			g_string_free (s, FALSE);
 			break; }
 		case ESEXP_RES_TIME: {
 			time_t total;
@@ -533,14 +533,14 @@ term_eval_plus(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	}
 
 	if (!r) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
+		r = e_sexp_result_new (f, ESEXP_RES_INT);
 		r->value.number = 0;
 	}
 	return r;
 }
 
 static ESExpResult *
-term_eval_sub(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_sub (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	struct _ESExpResult *r=NULL;
 	gint type;
@@ -555,10 +555,10 @@ term_eval_sub(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 				total -= argv[i]->value.number;
 			}
 			if (i<argc) {
-				e_sexp_resultv_free(f, argc, argv);
+				e_sexp_resultv_free (f, argc, argv);
 				e_sexp_fatal_error(f, "Invalid types in -");
 			}
-			r = e_sexp_result_new(f, ESEXP_RES_INT);
+			r = e_sexp_result_new (f, ESEXP_RES_INT);
 			r->value.number = total;
 			break; }
 		case ESEXP_RES_TIME: {
@@ -581,7 +581,7 @@ term_eval_sub(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 	}
 
 	if (!r) {
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
+		r = e_sexp_result_new (f, ESEXP_RES_INT);
 		r->value.number = 0;
 	}
 	return r;
@@ -589,14 +589,14 @@ term_eval_sub(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer
 
 /* cast to gint */
 static ESExpResult *
-term_eval_castint(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_castint (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	struct _ESExpResult *r;
 
 	if (argc != 1)
 		e_sexp_fatal_error(f, "Incorrect argument count to (gint )");
 
-	r = e_sexp_result_new(f, ESEXP_RES_INT);
+	r = e_sexp_result_new (f, ESEXP_RES_INT);
 	switch (argv[0]->type) {
 	case ESEXP_RES_INT:
 		r->value.number = argv[0]->value.number;
@@ -605,10 +605,10 @@ term_eval_castint(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
 		r->value.number = argv[0]->value.boolean != 0;
 		break;
 	case ESEXP_RES_STRING:
-		r->value.number = strtoul(argv[0]->value.string, NULL, 10);
+		r->value.number = strtoul (argv[0]->value.string, NULL, 10);
 		break;
 	default:
-		e_sexp_result_free(f, r);
+		e_sexp_result_free (f, r);
 		e_sexp_fatal_error(f, "Invalid type in (cast-int )");
 	}
 
@@ -617,14 +617,14 @@ term_eval_castint(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpoin
 
 /* cast to string */
 static ESExpResult *
-term_eval_caststring(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
+term_eval_caststring (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data)
 {
 	struct _ESExpResult *r;
 
 	if (argc != 1)
 		e_sexp_fatal_error(f, "Incorrect argument count to (cast-string )");
 
-	r = e_sexp_result_new(f, ESEXP_RES_STRING);
+	r = e_sexp_result_new (f, ESEXP_RES_STRING);
 	switch (argv[0]->type) {
 	case ESEXP_RES_INT:
 		r->value.string = g_strdup_printf("%d", argv[0]->value.number);
@@ -633,10 +633,10 @@ term_eval_caststring(struct _ESExp *f, gint argc, struct _ESExpResult **argv, gp
 		r->value.string = g_strdup_printf("%d", argv[0]->value.boolean != 0);
 		break;
 	case ESEXP_RES_STRING:
-		r->value.string = g_strdup(argv[0]->value.string);
+		r->value.string = g_strdup (argv[0]->value.string);
 		break;
 	default:
-		e_sexp_result_free(f, r);
+		e_sexp_result_free (f, r);
 		e_sexp_fatal_error(f, "Invalid type in (gint )");
 	}
 
@@ -651,64 +651,64 @@ term_eval_if (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer da
 	gint doit;
 
 	if (argc >=2 && argc<=3) {
-		r = e_sexp_term_eval(f, argv[0]);
+		r = e_sexp_term_eval (f, argv[0]);
 		doit = (r->type == ESEXP_RES_BOOL && r->value.boolean);
-		e_sexp_result_free(f, r);
+		e_sexp_result_free (f, r);
 		if (doit) {
-			return e_sexp_term_eval(f, argv[1]);
+			return e_sexp_term_eval (f, argv[1]);
 		} else if (argc>2) {
-			return e_sexp_term_eval(f, argv[2]);
+			return e_sexp_term_eval (f, argv[2]);
 		}
 	}
-	return e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+	return e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 }
 
 /* implements 'begin' statement */
 static ESExpResult *
-term_eval_begin(struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
+term_eval_begin (struct _ESExp *f, gint argc, struct _ESExpTerm **argv, gpointer data)
 {
 	struct _ESExpResult *r=NULL;
 	gint i;
 
 	for (i=0;i<argc;i++) {
 		if (r)
-			e_sexp_result_free(f, r);
-		r = e_sexp_term_eval(f, argv[i]);
+			e_sexp_result_free (f, r);
+		r = e_sexp_term_eval (f, argv[i]);
 	}
 	if (r)
 		return r;
 	else
-		return e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+		return e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 }
 
 /* this must only be called from inside term evaluation callbacks! */
 struct _ESExpResult *
-e_sexp_term_eval(struct _ESExp *f, struct _ESExpTerm *t)
+e_sexp_term_eval (struct _ESExp *f, struct _ESExpTerm *t)
 {
 	struct _ESExpResult *r = NULL;
 	gint i;
 	struct _ESExpResult **argv;
 
-	g_return_val_if_fail(t != NULL, NULL);
+	g_return_val_if_fail (t != NULL, NULL);
 
 	r(printf("eval term :\n"));
-	r(parse_dump_term(t, 0));
+	r (parse_dump_term (t, 0));
 
 	switch (t->type) {
 	case ESEXP_TERM_STRING:
 		r(printf(" (string \"%s\")\n", t->value.string));
-		r = e_sexp_result_new(f, ESEXP_RES_STRING);
+		r = e_sexp_result_new (f, ESEXP_RES_STRING);
 		/* erk, this shoul;dn't need to strdup this ... */
-		r->value.string = g_strdup(t->value.string);
+		r->value.string = g_strdup (t->value.string);
 		break;
 	case ESEXP_TERM_INT:
 		r(printf(" (gint %d)\n", t->value.number));
-		r = e_sexp_result_new(f, ESEXP_RES_INT);
+		r = e_sexp_result_new (f, ESEXP_RES_INT);
 		r->value.number = t->value.number;
 		break;
 	case ESEXP_TERM_BOOL:
 		r(printf(" (gint %d)\n", t->value.number));
-		r = e_sexp_result_new(f, ESEXP_RES_BOOL);
+		r = e_sexp_result_new (f, ESEXP_RES_BOOL);
 		r->value.boolean = t->value.boolean;
 		break;
 	case ESEXP_TERM_TIME:
@@ -718,33 +718,33 @@ e_sexp_term_eval(struct _ESExp *f, struct _ESExpTerm *t)
 		break;
 	case ESEXP_TERM_IFUNC:
 		if (t->value.func.sym && t->value.func.sym->f.ifunc)
-			r = t->value.func.sym->f.ifunc(f, t->value.func.termcount, t->value.func.terms, t->value.func.sym->data);
+			r = t->value.func.sym->f.ifunc (f, t->value.func.termcount, t->value.func.terms, t->value.func.sym->data);
 		break;
 	case ESEXP_TERM_FUNC:
 		/* first evaluate all arguments to result types */
-		argv = alloca(sizeof(argv[0]) * t->value.func.termcount);
+		argv = alloca (sizeof (argv[0]) * t->value.func.termcount);
 		for (i=0;i<t->value.func.termcount;i++) {
-			argv[i] = e_sexp_term_eval(f, t->value.func.terms[i]);
+			argv[i] = e_sexp_term_eval (f, t->value.func.terms[i]);
 		}
 		/* call the function */
 		if (t->value.func.sym->f.func)
-			r = t->value.func.sym->f.func(f, t->value.func.termcount, argv, t->value.func.sym->data);
+			r = t->value.func.sym->f.func (f, t->value.func.termcount, argv, t->value.func.sym->data);
 
-		e_sexp_resultv_free(f, t->value.func.termcount, argv);
+		e_sexp_resultv_free (f, t->value.func.termcount, argv);
 		break;
 	default:
 		e_sexp_fatal_error(f, "Unknown type in parse tree: %d", t->type);
 	}
 
 	if (r==NULL)
-		r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+		r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	return r;
 }
 
 #ifdef TESTER
 static void
-eval_dump_result(ESExpResult *r, gint depth)
+eval_dump_result (ESExpResult *r, gint depth)
 {
 	gint i;
 
@@ -782,7 +782,7 @@ eval_dump_result(ESExpResult *r, gint depth)
 
 #ifdef TESTER
 static void
-parse_dump_term(struct _ESExpTerm *t, gint depth)
+parse_dump_term (struct _ESExpTerm *t, gint depth)
 {
 	gint i;
 
@@ -812,7 +812,7 @@ parse_dump_term(struct _ESExpTerm *t, gint depth)
 		printf(" (function %s\n", t->value.func.sym->name);
 		/*printf(" [%d] ", t->value.func.termcount);*/
 		for (i=0;i<t->value.func.termcount;i++) {
-			parse_dump_term(t->value.func.terms[i], depth+1);
+			parse_dump_term (t->value.func.terms[i], depth+1);
 		}
 		for (i=0;i<depth;i++)
 			printf("   ");
@@ -853,7 +853,7 @@ binary_generator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
 }
 
 static gboolean
-unary_generator(gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+unary_generator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
 {
 	/* unary generator with end time */
 	g_return_val_if_fail (r != NULL, FALSE);
@@ -878,41 +878,41 @@ static const struct {
 	{"completed-before?", unary_generator},
 };
 
-const gint generators_count = sizeof(generators) / sizeof(generators[0]);
+const gint generators_count = sizeof (generators) / sizeof (generators[0]);
 
 static gboolean
-or_operator(gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+or_operator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
 {
 	/*
 	   A          B           A or B
 	   ----       ----        ------
-	   norm(0)    norm(0)     norm(0)
-	   gen(1)     norm(0)     norm(0)
-	   norm(0)    gen(1)      norm(0)
-	   gen(1)     gen(1)      gen*(1)
+	   norm (0)    norm (0)     norm (0)
+	   gen (1)     norm (0)     norm (0)
+	   norm (0)    gen (1)      norm (0)
+	   gen (1)     gen (1)      gen*(1)
 	   */
 
 	g_return_val_if_fail (r != NULL, FALSE);
 	g_return_val_if_fail (argc == 2, FALSE);
 
 	if ((r->time_generator = argv[0]->time_generator & argv[1]->time_generator)) {
-		r->occuring_start = MIN(argv[0]->occuring_start, argv[1]->occuring_start);
-		r->occuring_end = MAX(argv[0]->occuring_end, argv[1]->occuring_end);
+		r->occuring_start = MIN (argv[0]->occuring_start, argv[1]->occuring_start);
+		r->occuring_end = MAX (argv[0]->occuring_end, argv[1]->occuring_end);
 	}
 
 	return TRUE;
 }
 
 static gboolean
-and_operator(gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
+and_operator (gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
 {
 	/*
 	   A           B          A and B
 	   ----        ----       ------- -
-	   norm(0)     norm(0)    norm(0)
-	   gen(1)      norm(0)    gen(1)
-	   norm(0)     gen(1)     gen(1)
-	   gen(1)      gen(1)     gen(1)
+	   norm (0)     norm (0)    norm (0)
+	   gen (1)      norm (0)    gen (1)
+	   norm (0)     gen (1)     gen (1)
+	   gen (1)      gen (1)     gen (1)
 	   */
 
 	g_return_val_if_fail (r != NULL, FALSE);
@@ -920,8 +920,8 @@ and_operator(gint argc, struct _ESExpResult **argv, struct _ESExpResult *r)
 
 	if ((r->time_generator = argv[0]->time_generator | argv[1]->time_generator)) {
 		/* constraint interval */
-		r->occuring_start = MAX(argv[0]->occuring_start, argv[1]->occuring_start);
-		r->occuring_end = MIN(argv[0]->occuring_end, argv[1]->occuring_end);
+		r->occuring_start = MAX (argv[0]->occuring_start, argv[1]->occuring_start);
+		r->occuring_end = MIN (argv[0]->occuring_end, argv[1]->occuring_end);
 	}
 
 	return TRUE;
@@ -935,45 +935,45 @@ static const struct {
 	{"and", and_operator}
 };
 
-const gint operators_count = sizeof(operators) / sizeof(operators[0]);
+const gint operators_count = sizeof (operators) / sizeof (operators[0]);
 
 static ESOperatorFunc*
-get_operator_function(const gchar *fname)
+get_operator_function (const gchar *fname)
 {
 	gint i;
 
 	g_return_val_if_fail (fname != NULL, NULL);
 
-	for (i = 0; i < sizeof(operators) / sizeof(operators[0]); i++)
-		if (strcmp(operators[i].name, fname) == 0)
+	for (i = 0; i < sizeof (operators) / sizeof (operators[0]); i++)
+		if (strcmp (operators[i].name, fname) == 0)
 			return operators[i].func;
 
 	return NULL;
 }
 
 static inline gboolean
-is_time_function(const gchar *fname)
+is_time_function (const gchar *fname)
 {
 	gint i;
 
 	g_return_val_if_fail (fname != NULL, FALSE);
 
-	for (i = 0; i < sizeof(time_functions) / sizeof(time_functions[0]); i++)
-		if (strcmp(time_functions[i], fname) == 0)
+	for (i = 0; i < sizeof (time_functions) / sizeof (time_functions[0]); i++)
+		if (strcmp (time_functions[i], fname) == 0)
 			return TRUE;
 
 	return FALSE;
 }
 
 static ESGeneratorFunc*
-get_generator_function(const gchar *fname)
+get_generator_function (const gchar *fname)
 {
 	gint i;
 
 	g_return_val_if_fail (fname != NULL, NULL);
 
-	for (i = 0; i < sizeof(generators) / sizeof(generators[0]); i++)
-		if (strcmp(generators[i].name, fname) == 0)
+	for (i = 0; i < sizeof (generators) / sizeof (generators[0]); i++)
+		if (strcmp (generators[i].name, fname) == 0)
 			return generators[i].func;
 
 	return NULL;
@@ -981,27 +981,27 @@ get_generator_function(const gchar *fname)
 
 /* this must only be called from inside term evaluation callbacks! */
 static struct _ESExpResult *
-e_sexp_term_evaluate_occur_times(struct _ESExp *f, struct _ESExpTerm *t, time_t *start, time_t *end)
+e_sexp_term_evaluate_occur_times (struct _ESExp *f, struct _ESExpTerm *t, time_t *start, time_t *end)
 {
 	struct _ESExpResult *r = NULL;
 	gint i, argc;
 	struct _ESExpResult **argv;
 	gboolean ok = TRUE;
 
-	g_return_val_if_fail(t != NULL, NULL);
-	g_return_val_if_fail(start != NULL, NULL);
-	g_return_val_if_fail(end != NULL, NULL);
+	g_return_val_if_fail (t != NULL, NULL);
+	g_return_val_if_fail (start != NULL, NULL);
+	g_return_val_if_fail (end != NULL, NULL);
 
 	/*
 	printf("eval term :\n");
-	parse_dump_term(t, 0);
+	parse_dump_term (t, 0);
 	*/
 
 	switch (t->type) {
 	case ESEXP_TERM_STRING:
 		r(printf(" (string \"%s\")\n", t->value.string));
-		r = e_sexp_result_new(f, ESEXP_RES_STRING);
-		r->value.string = g_strdup(t->value.string);
+		r = e_sexp_result_new (f, ESEXP_RES_STRING);
+		r->value.string = g_strdup (t->value.string);
 		break;
 	case ESEXP_TERM_IFUNC:
 	case ESEXP_TERM_FUNC:
@@ -1011,33 +1011,33 @@ e_sexp_term_evaluate_occur_times(struct _ESExp *f, struct _ESExpTerm *t, time_t
 
 		r(printf(" (function \"%s\"\n", t->value.func.sym->name));
 
-		r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+		r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 		argc = t->value.func.termcount;
-		argv = alloca(sizeof(argv[0]) * argc);
+		argv = alloca (sizeof (argv[0]) * argc);
 
 		for (i=0;i<t->value.func.termcount;i++) {
 			argv[i] = e_sexp_term_evaluate_occur_times (f, t->value.func.terms[i],
 								    start, end);
 		}
 
-		if (is_time_function(t->value.func.sym->name)) {
+		if (is_time_function (t->value.func.sym->name)) {
 			/* evaluate time */
 			if (t->value.func.sym->f.func)
-				r = t->value.func.sym->f.func(f, t->value.func.termcount,
+				r = t->value.func.sym->f.func (f, t->value.func.termcount,
 					      argv, t->value.func.sym->data);
-		} else if ((generator = get_generator_function(t->value.func.sym->name)) != NULL) {
+		} else if ((generator = get_generator_function (t->value.func.sym->name)) != NULL) {
 			/* evaluate generator function */
 			r->time_generator = TRUE;
-			ok = generator(argc, argv, r);
-		} else if ((operator = get_operator_function(t->value.func.sym->name)) != NULL)
+			ok = generator (argc, argv, r);
+		} else if ((operator = get_operator_function (t->value.func.sym->name)) != NULL)
 			/* evaluate operator function */
-			ok = operator(argc, argv, r);
+			ok = operator (argc, argv, r);
 		else {
 			/* normal function: we need to scan all objects */
 			r->time_generator = FALSE;
 		}
 
-		e_sexp_resultv_free(f, t->value.func.termcount, argv);
+		e_sexp_resultv_free (f, t->value.func.termcount, argv);
 		break;
 	}
 	case ESEXP_TERM_INT:
@@ -1053,7 +1053,7 @@ e_sexp_term_evaluate_occur_times(struct _ESExp *f, struct _ESExpTerm *t, time_t
 		e_sexp_fatal_error(f, "Error in parse tree");
 
 	if (r==NULL)
-		r = e_sexp_result_new(f, ESEXP_RES_UNDEFINED);
+		r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 
 	return r;
 }
@@ -1063,15 +1063,15 @@ e_sexp_term_evaluate_occur_times(struct _ESExp *f, struct _ESExpTerm *t, time_t
 */
 
 static struct _ESExpTerm *
-parse_term_new(struct _ESExp *f, gint type)
+parse_term_new (struct _ESExp *f, gint type)
 {
-	struct _ESExpTerm *s = e_memchunk_alloc0(f->term_chunks);
+	struct _ESExpTerm *s = e_memchunk_alloc0 (f->term_chunks);
 	s->type = type;
 	return s;
 }
 
 static void
-parse_term_free(struct _ESExp *f, struct _ESExpTerm *t)
+parse_term_free (struct _ESExp *f, struct _ESExpTerm *t)
 {
 	gint i;
 
@@ -1087,25 +1087,25 @@ parse_term_free(struct _ESExp *f, struct _ESExpTerm *t)
 		break;
 
 	case ESEXP_TERM_STRING:
-		g_free(t->value.string);
+		g_free (t->value.string);
 		break;
 
 	case ESEXP_TERM_FUNC:
 	case ESEXP_TERM_IFUNC:
 		for (i=0;i<t->value.func.termcount;i++) {
-			parse_term_free(f, t->value.func.terms[i]);
+			parse_term_free (f, t->value.func.terms[i]);
 		}
-		g_free(t->value.func.terms);
+		g_free (t->value.func.terms);
 		break;
 
 	default:
 		printf("parse_term_free: unknown type: %d\n", t->type);
 	}
-	e_memchunk_free(f->term_chunks, t);
+	e_memchunk_free (f->term_chunks, t);
 }
 
 static struct _ESExpTerm **
-parse_values(ESExp *f, gint *len)
+parse_values (ESExp *f, gint *len)
 {
 	gint token;
 	struct _ESExpTerm **terms;
@@ -1115,22 +1115,22 @@ parse_values(ESExp *f, gint *len)
 
 	p(printf("parsing values\n"));
 
-	while ( (token = g_scanner_peek_next_token(gs)) != G_TOKEN_EOF
+	while ( (token = g_scanner_peek_next_token (gs)) != G_TOKEN_EOF
 		&& token != ')') {
-		list = g_slist_prepend(list, parse_value(f));
+		list = g_slist_prepend (list, parse_value (f));
 		size++;
 	}
 
 	/* go over the list, and put them backwards into the term array */
-	terms = g_malloc(size * sizeof(*terms));
+	terms = g_malloc (size * sizeof (*terms));
 	l = list;
 	for (i=size-1;i>=0;i--) {
-		g_assert(l);
-		g_assert(l->data);
+		g_assert (l);
+		g_assert (l->data);
 		terms[i] = l->data;
-		l = g_slist_next(l);
+		l = g_slist_next (l);
 	}
-	g_slist_free(list);
+	g_slist_free (list);
 
 	p(printf("found %d subterms\n", size));
 	*len = size;
@@ -1151,7 +1151,7 @@ e_sexp_parse_value (ESExp *f)
 }
 
 static struct _ESExpTerm *
-parse_value(ESExp *f)
+parse_value (ESExp *f)
 {
 	gint token, negative = FALSE;
 	struct _ESExpTerm *t = NULL;
@@ -1160,17 +1160,17 @@ parse_value(ESExp *f)
 
 	p(printf("parsing value\n"));
 
-	token = g_scanner_get_next_token(gs);
+	token = g_scanner_get_next_token (gs);
 	switch (token) {
 	case G_TOKEN_EOF:
 		break;
 	case G_TOKEN_LEFT_PAREN:
 		p(printf("got brace, its a list!\n"));
-		return parse_list(f, TRUE);
+		return parse_list (f, TRUE);
 	case G_TOKEN_STRING:
 		p(printf("got string '%s'\n", g_scanner_cur_value(gs).v_string));
-		t = parse_term_new(f, ESEXP_TERM_STRING);
-		t->value.string = g_strdup(g_scanner_cur_value(gs).v_string);
+		t = parse_term_new (f, ESEXP_TERM_STRING);
+		t->value.string = g_strdup (g_scanner_cur_value (gs).v_string);
 		break;
 	case '-':
 		p(printf ("got negative int?\n"));
@@ -1183,8 +1183,8 @@ parse_value(ESExp *f)
 		negative = TRUE;
 		/* fall through... */
 	case G_TOKEN_INT:
-		t = parse_term_new(f, ESEXP_TERM_INT);
-		t->value.number = g_scanner_cur_value(gs).v_int;
+		t = parse_term_new (f, ESEXP_TERM_INT);
+		t->value.number = g_scanner_cur_value (gs).v_int;
 		if (negative)
 			t->value.number = -t->value.number;
 		p(printf("got gint %d\n", t->value.number));
@@ -1193,7 +1193,7 @@ parse_value(ESExp *f)
 		gchar *str;
 
 		p(printf("got bool?\n"));
-		token = g_scanner_get_next_token(gs);
+		token = g_scanner_get_next_token (gs);
 		if (token != G_TOKEN_IDENTIFIER) {
 			e_sexp_fatal_error (f, "Invalid format for a boolean value");
 			return NULL;
@@ -1207,23 +1207,23 @@ parse_value(ESExp *f)
 			return NULL;
 		}
 
-		t = parse_term_new(f, ESEXP_TERM_BOOL);
+		t = parse_term_new (f, ESEXP_TERM_BOOL);
 		t->value.boolean = (str[0] == 't');
 		break; }
 	case G_TOKEN_SYMBOL:
-		s = g_scanner_cur_value(gs).v_symbol;
+		s = g_scanner_cur_value (gs).v_symbol;
 		p(printf("got symbol '%s'\n", s->name));
 		switch (s->type) {
 		case ESEXP_TERM_FUNC:
 		case ESEXP_TERM_IFUNC:
 				/* this is basically invalid, since we can't use function
 				   pointers, but let the runtime catch it ... */
-			t = parse_term_new(f, s->type);
+			t = parse_term_new (f, s->type);
 			t->value.func.sym = s;
-			t->value.func.terms = parse_values(f, &t->value.func.termcount);
+			t->value.func.terms = parse_values (f, &t->value.func.termcount);
 			break;
 		case ESEXP_TERM_VAR:
-			t = parse_term_new(f, s->type);
+			t = parse_term_new (f, s->type);
 			t->value.var = s;
 			break;
 		default:
@@ -1243,7 +1243,7 @@ parse_value(ESExp *f)
 
 /* FIXME: this needs some robustification */
 static struct _ESExpTerm *
-parse_list(ESExp *f, gint gotbrace)
+parse_list (ESExp *f, gint gotbrace)
 {
 	gint token;
 	struct _ESExpTerm *t = NULL;
@@ -1253,16 +1253,16 @@ parse_list(ESExp *f, gint gotbrace)
 	if (gotbrace)
 		token = '(';
 	else
-		token = g_scanner_get_next_token(gs);
+		token = g_scanner_get_next_token (gs);
 	if (token =='(') {
-		token = g_scanner_get_next_token(gs);
+		token = g_scanner_get_next_token (gs);
 		switch (token) {
 		case G_TOKEN_SYMBOL: {
 			struct _ESExpSymbol *s;
 
-			s = g_scanner_cur_value(gs).v_symbol;
+			s = g_scanner_cur_value (gs).v_symbol;
 			p(printf("got funciton: %s\n", s->name));
-			t = parse_term_new(f, s->type);
+			t = parse_term_new (f, s->type);
 			p(printf("created new list %p\n", t));
 			/* if we have a variable, find out its base type */
 			while (s->type == ESEXP_TERM_VAR) {
@@ -1271,9 +1271,9 @@ parse_list(ESExp *f, gint gotbrace)
 			if (s->type == ESEXP_TERM_FUNC
 			    || s->type == ESEXP_TERM_IFUNC) {
 				t->value.func.sym = s;
-				t->value.func.terms = parse_values(f, &t->value.func.termcount);
+				t->value.func.terms = parse_values (f, &t->value.func.termcount);
 			} else {
-				parse_term_free(f, t);
+				parse_term_free (f, t);
 				e_sexp_fatal_error(f, "Trying to call variable as function: %s", s->name);
 			}
 			break; }
@@ -1281,11 +1281,11 @@ parse_list(ESExp *f, gint gotbrace)
 			e_sexp_fatal_error(f, "Unknown identifier: %s", g_scanner_cur_value(gs).v_identifier);
 			break;
 		case G_TOKEN_LEFT_PAREN:
-			return parse_list(f, TRUE);
+			return parse_list (f, TRUE);
 		default:
 			e_sexp_fatal_error(f, "Unexpected token encountered: %d", token);
 		}
-		token = g_scanner_get_next_token(gs);
+		token = g_scanner_get_next_token (gs);
 		if (token != ')') {
 			e_sexp_fatal_error(f, "Missing ')'");
 		}
@@ -1297,7 +1297,7 @@ parse_list(ESExp *f, gint gotbrace)
 	return t;
 }
 
-static void e_sexp_finalise(gpointer);
+static void e_sexp_finalise (gpointer);
 
 #ifdef E_SEXP_IS_G_OBJECT
 static void
@@ -1333,29 +1333,29 @@ static const struct {
 };
 
 static void
-free_symbol(gpointer key, gpointer value, gpointer data)
+free_symbol (gpointer key, gpointer value, gpointer data)
 {
 	struct _ESExpSymbol *s = value;
 
-	g_free(s->name);
-	g_free(s);
+	g_free (s->name);
+	g_free (s);
 }
 
 static void
-e_sexp_finalise(gpointer o)
+e_sexp_finalise (gpointer o)
 {
 	ESExp *s = (ESExp *)o;
 
 	if (s->tree) {
-		parse_term_free(s, s->tree);
+		parse_term_free (s, s->tree);
 		s->tree = NULL;
 	}
 
-	e_memchunk_destroy(s->term_chunks);
-	e_memchunk_destroy(s->result_chunks);
+	e_memchunk_destroy (s->term_chunks);
+	e_memchunk_destroy (s->result_chunks);
 
-	g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, NULL);
-	g_scanner_destroy(s->scanner);
+	g_scanner_scope_foreach_symbol (s->scanner, 0, free_symbol, NULL);
+	g_scanner_destroy (s->scanner);
 
 #ifdef E_SEXP_IS_G_OBJECT
 	G_OBJECT_CLASS (parent_class)->finalize (o);
@@ -1367,16 +1367,16 @@ e_sexp_init (ESExp *s)
 {
 	gint i;
 
-	s->scanner = g_scanner_new(&scanner_config);
-	s->term_chunks = e_memchunk_new(16, sizeof(struct _ESExpTerm));
-	s->result_chunks = e_memchunk_new(16, sizeof(struct _ESExpResult));
+	s->scanner = g_scanner_new (&scanner_config);
+	s->term_chunks = e_memchunk_new (16, sizeof (struct _ESExpTerm));
+	s->result_chunks = e_memchunk_new (16, sizeof (struct _ESExpResult));
 
 	/* load in builtin symbols? */
 	for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
 		if (symbols[i].type == 1) {
-			e_sexp_add_ifunction(s, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, (gpointer)&symbols[i]);
+			e_sexp_add_ifunction (s, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, (gpointer)&symbols[i]);
 		} else {
-			e_sexp_add_function(s, 0, symbols[i].name, symbols[i].func, (gpointer)&symbols[i]);
+			e_sexp_add_function (s, 0, symbols[i].name, symbols[i].func, (gpointer)&symbols[i]);
 		}
 	}
 
@@ -1410,14 +1410,14 @@ e_sexp_unref (ESExp *f)
 {
 	f->refcount--;
 	if (f->refcount == 0) {
-		e_sexp_finalise(f);
-		g_free(f);
+		e_sexp_finalise (f);
+		g_free (f);
 	}
 }
 #endif
 
 void
-e_sexp_add_function(ESExp *f, gint scope, const gchar *name, ESExpFunc *func, gpointer data)
+e_sexp_add_function (ESExp *f, gint scope, const gchar *name, ESExpFunc *func, gpointer data)
 {
 	struct _ESExpSymbol *s;
 
@@ -1426,16 +1426,16 @@ e_sexp_add_function(ESExp *f, gint scope, const gchar *name, ESExpFunc *func, gp
 
 	e_sexp_remove_symbol (f, scope, name);
 
-	s = g_malloc0(sizeof(*s));
-	s->name = g_strdup(name);
+	s = g_malloc0 (sizeof (*s));
+	s->name = g_strdup (name);
 	s->f.func = func;
 	s->type = ESEXP_TERM_FUNC;
 	s->data = data;
-	g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
+	g_scanner_scope_add_symbol (f->scanner, scope, s->name, s);
 }
 
 void
-e_sexp_add_ifunction(ESExp *f, gint scope, const gchar *name, ESExpIFunc *ifunc, gpointer data)
+e_sexp_add_ifunction (ESExp *f, gint scope, const gchar *name, ESExpIFunc *ifunc, gpointer data)
 {
 	struct _ESExpSymbol *s;
 
@@ -1444,31 +1444,31 @@ e_sexp_add_ifunction(ESExp *f, gint scope, const gchar *name, ESExpIFunc *ifunc,
 
 	e_sexp_remove_symbol (f, scope, name);
 
-	s = g_malloc0(sizeof(*s));
-	s->name = g_strdup(name);
+	s = g_malloc0 (sizeof (*s));
+	s->name = g_strdup (name);
 	s->f.ifunc = ifunc;
 	s->type = ESEXP_TERM_IFUNC;
 	s->data = data;
-	g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
+	g_scanner_scope_add_symbol (f->scanner, scope, s->name, s);
 }
 
 void
-e_sexp_add_variable(ESExp *f, gint scope, gchar *name, ESExpTerm *value)
+e_sexp_add_variable (ESExp *f, gint scope, gchar *name, ESExpTerm *value)
 {
 	struct _ESExpSymbol *s;
 
 	g_return_if_fail (IS_E_SEXP (f));
 	g_return_if_fail (name != NULL);
 
-	s = g_malloc0(sizeof(*s));
-	s->name = g_strdup(name);
+	s = g_malloc0 (sizeof (*s));
+	s->name = g_strdup (name);
 	s->type = ESEXP_TERM_VAR;
 	s->data = value;
-	g_scanner_scope_add_symbol(f->scanner, scope, s->name, s);
+	g_scanner_scope_add_symbol (f->scanner, scope, s->name, s);
 }
 
 void
-e_sexp_remove_symbol(ESExp *f, gint scope, const gchar *name)
+e_sexp_remove_symbol (ESExp *f, gint scope, const gchar *name)
 {
 	gint oldscope;
 	struct _ESExpSymbol *s;
@@ -1476,31 +1476,31 @@ e_sexp_remove_symbol(ESExp *f, gint scope, const gchar *name)
 	g_return_if_fail (IS_E_SEXP (f));
 	g_return_if_fail (name != NULL);
 
-	oldscope = g_scanner_set_scope(f->scanner, scope);
-	s = g_scanner_lookup_symbol(f->scanner, name);
-	g_scanner_scope_remove_symbol(f->scanner, scope, name);
-	g_scanner_set_scope(f->scanner, oldscope);
+	oldscope = g_scanner_set_scope (f->scanner, scope);
+	s = g_scanner_lookup_symbol (f->scanner, name);
+	g_scanner_scope_remove_symbol (f->scanner, scope, name);
+	g_scanner_set_scope (f->scanner, oldscope);
 	if (s) {
-		g_free(s->name);
-		g_free(s);
+		g_free (s->name);
+		g_free (s);
 	}
 }
 
 gint
-e_sexp_set_scope(ESExp *f, gint scope)
+e_sexp_set_scope (ESExp *f, gint scope)
 {
 	g_return_val_if_fail (IS_E_SEXP (f), 0);
 
-	return g_scanner_set_scope(f->scanner, scope);
+	return g_scanner_set_scope (f->scanner, scope);
 }
 
 void
-e_sexp_input_text(ESExp *f, const gchar *text, gint len)
+e_sexp_input_text (ESExp *f, const gchar *text, gint len)
 {
 	g_return_if_fail (IS_E_SEXP (f));
 	g_return_if_fail (text != NULL);
 
-	g_scanner_input_text(f->scanner, text, len);
+	g_scanner_input_text (f->scanner, text, len);
 }
 
 void
@@ -1508,22 +1508,22 @@ e_sexp_input_file (ESExp *f, gint fd)
 {
 	g_return_if_fail (IS_E_SEXP (f));
 
-	g_scanner_input_file(f->scanner, fd);
+	g_scanner_input_file (f->scanner, fd);
 }
 
 /* returns -1 on error */
 gint
-e_sexp_parse(ESExp *f)
+e_sexp_parse (ESExp *f)
 {
 	g_return_val_if_fail (IS_E_SEXP (f), -1);
 
-	if (setjmp(f->failenv)) {
+	if (setjmp (f->failenv)) {
 		g_warning("Error in parsing: %s", f->error);
 		return -1;
 	}
 
 	if (f->tree)
-		parse_term_free(f, f->tree);
+		parse_term_free (f, f->tree);
 
 	f->tree = parse_value (f);
 
@@ -1532,17 +1532,17 @@ e_sexp_parse(ESExp *f)
 
 /* returns NULL on error */
 struct _ESExpResult *
-e_sexp_eval(ESExp *f)
+e_sexp_eval (ESExp *f)
 {
 	g_return_val_if_fail (IS_E_SEXP (f), NULL);
 	g_return_val_if_fail (f->tree != NULL, NULL);
 
-	if (setjmp(f->failenv)) {
+	if (setjmp (f->failenv)) {
 		g_warning("Error in execution: %s", f->error);
 		return NULL;
 	}
 
-	return e_sexp_term_eval(f, f->tree);
+	return e_sexp_term_eval (f, f->tree);
 }
 
 /**
@@ -1556,7 +1556,7 @@ e_sexp_eval(ESExp *f)
  * Since: 2.32
  */
 gboolean
-e_sexp_evaluate_occur_times(ESExp *f, time_t *start, time_t *end)
+e_sexp_evaluate_occur_times (ESExp *f, time_t *start, time_t *end)
 {
 	struct _ESExpResult *r;
 	gboolean generator;
@@ -1567,12 +1567,12 @@ e_sexp_evaluate_occur_times(ESExp *f, time_t *start, time_t *end)
 
 	*start = *end = -1;
 
-	if (setjmp(f->failenv)) {
+	if (setjmp (f->failenv)) {
 		g_warning("Error in execution: %s", f->error);
 		return FALSE;
 	}
 
-	r = e_sexp_term_evaluate_occur_times(f, f->tree, start, end);
+	r = e_sexp_term_evaluate_occur_times (f, f->tree, start, end);
 	generator = r->time_generator;
 
 	if (generator) {
@@ -1580,7 +1580,7 @@ e_sexp_evaluate_occur_times(ESExp *f, time_t *start, time_t *end)
 		*end = r->occuring_end;
 	}
 
-	e_sexp_result_free(f, r);
+	e_sexp_result_free (f, r);
 
 	return generator;
 }
@@ -1594,7 +1594,7 @@ e_sexp_evaluate_occur_times(ESExp *f, time_t *start, time_t *end)
  * encoded using #t #f syntax.
  **/
 void
-e_sexp_encode_bool(GString *s, gboolean state)
+e_sexp_encode_bool (GString *s, gboolean state)
 {
 	if (state)
 		g_string_append(s, " #t");
@@ -1612,7 +1612,7 @@ e_sexp_encode_bool(GString *s, gboolean state)
  * are escaped appropriately.
  **/
 void
-e_sexp_encode_string(GString *s, const gchar *string)
+e_sexp_encode_string (GString *s, const gchar *string)
 {
 	gchar c;
 	const gchar *p;
@@ -1624,38 +1624,38 @@ e_sexp_encode_string(GString *s, const gchar *string)
 	g_string_append(s, " \"");
 	while ((c = *p++)) {
 		if (c=='\\' || c=='\"' || c=='\'')
-			g_string_append_c(s, '\\');
-		g_string_append_c(s, c);
+			g_string_append_c (s, '\\');
+		g_string_append_c (s, c);
 	}
 	g_string_append(s, "\"");
 }
 
 #ifdef TESTER
-gint main(gint argc, gchar **argv)
+gint main (gint argc, gchar **argv)
 {
 	ESExp *f;
 	gchar *t = "(+ \"foo\" \"\\\"\" \"bar\" \"\\\\ blah \\x \")";
 	ESExpResult *r;
 
-	g_type_init();
+	g_type_init ();
 
-	f = e_sexp_new();
+	f = e_sexp_new ();
 
 	e_sexp_add_variable(f, 0, "test", NULL);
 
 	if (argc < 2 || !argv[1])
 		return;
 
-	e_sexp_input_text(f, t, t);
-	e_sexp_parse(f);
+	e_sexp_input_text (f, t, t);
+	e_sexp_parse (f);
 
 	if (f->tree) {
-		parse_dump_term(f->tree, 0);
+		parse_dump_term (f->tree, 0);
 	}
 
-	r = e_sexp_eval(f);
+	r = e_sexp_eval (f);
 	if (r) {
-		eval_dump_result(r, 0);
+		eval_dump_result (r, 0);
 	} else {
 		printf("no result?|\n");
 	}
diff --git a/libedataserver/e-sexp.h b/libedataserver/e-sexp.h
index c10dc09..a522944 100644
--- a/libedataserver/e-sexp.h
+++ b/libedataserver/e-sexp.h
@@ -174,7 +174,7 @@ void		e_sexp_fatal_error	(struct _ESExp *f, const gchar *why, ...) G_GNUC_NORETU
 /* return the error string */
 const gchar     *e_sexp_error		(struct _ESExp *f);
 
-ESExpTerm * e_sexp_parse_value(ESExp *f);
+ESExpTerm * e_sexp_parse_value (ESExp *f);
 
 gboolean	e_sexp_evaluate_occur_times	(ESExp *f, time_t *start, time_t *end);
 G_END_DECLS
diff --git a/libedataserver/e-source-group.c b/libedataserver/e-source-group.c
index 1f70d5e..3d13ce4 100644
--- a/libedataserver/e-source-group.c
+++ b/libedataserver/e-source-group.c
@@ -818,7 +818,7 @@ compare_source_lists (GSList *a, GSList *b)
 	gboolean retval = TRUE;
 	GSList *l;
 
-	if (g_slist_length(a) != g_slist_length(b))
+	if (g_slist_length (a) != g_slist_length (b))
 		return FALSE;
 
 	for (l = a; l != NULL && retval; l = l->next) {
diff --git a/libedataserver/e-source.h b/libedataserver/e-source.h
index 88b8afa..ad68133 100644
--- a/libedataserver/e-source.h
+++ b/libedataserver/e-source.h
@@ -57,7 +57,7 @@ GType    e_source_get_type (void);
 
 ESource *e_source_new                (const gchar   *name,
 				      const gchar   *relative_uri);
-ESource *e_source_new_with_absolute_uri(const gchar   *name,
+ESource *e_source_new_with_absolute_uri (const gchar   *name,
 					const gchar   *absolute_uri);
 ESource *e_source_new_from_xml_node  (xmlNodePtr    node);
 ESource *e_source_new_from_standalone_xml (const gchar *xml);
diff --git a/libedataserver/e-time-utils.c b/libedataserver/e-time-utils.c
index 891e0d0..f4e1c0c 100644
--- a/libedataserver/e-time-utils.c
+++ b/libedataserver/e-time-utils.c
@@ -285,7 +285,7 @@ localtime_r (t, tp)
 #else
 # define get_alt_number(from, to, n) \
   /* We don't have the alternate representation.  */			      \
-  get_number(from, to, n)
+  get_number (from, to, n)
 #endif
 #define recursive(new_fmt) \
   (*(new_fmt) != '\0'							      \
@@ -1087,7 +1087,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
 	    case 'y':
 	      if (*decided != raw)
 		{
-		  get_number(0, 9999, 4);
+		  get_number (0, 9999, 4);
 		  tm->tm_year = val;
 		  want_era = 1;
 		  want_xday = 1;
@@ -1365,14 +1365,14 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
 	{
 	  /* We don't have tm_mon and/or tm_mday, compute them.  */
 	  gint t_mon = 0;
-	  while (__mon_yday[__isleap(1900 + tm->tm_year)][t_mon] <= tm->tm_yday)
+	  while (__mon_yday[__isleap (1900 + tm->tm_year)][t_mon] <= tm->tm_yday)
 	      t_mon++;
 	  if (!have_mon)
 	      tm->tm_mon = t_mon - 1;
 	  if (!have_mday)
 	      tm->tm_mday =
 		(tm->tm_yday
-		 - __mon_yday[__isleap(1900 + tm->tm_year)][t_mon - 1] + 1);
+		 - __mon_yday[__isleap (1900 + tm->tm_year)][t_mon - 1] + 1);
 	}
       day_of_the_week (tm);
     }
@@ -1403,7 +1403,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
       if (!have_mday || !have_mon)
 	{
 	  gint t_mon = 0;
-	  while (__mon_yday[__isleap(1900 + tm->tm_year)][t_mon]
+	  while (__mon_yday[__isleap (1900 + tm->tm_year)][t_mon]
 		 <= tm->tm_yday)
 	    t_mon++;
 	  if (!have_mon)
@@ -1411,7 +1411,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
 	  if (!have_mday)
 	      tm->tm_mday =
 		(tm->tm_yday
-		 - __mon_yday[__isleap(1900 + tm->tm_year)][t_mon - 1] + 1);
+		 - __mon_yday[__isleap (1900 + tm->tm_year)][t_mon - 1] + 1);
 	}
 
       tm->tm_wday = save_wday;
@@ -1618,7 +1618,7 @@ e_time_parse_date_and_time_ex		(const gchar	*value,
 	   longest first. Note that we only use the '%p' specifier if the
 	   locale actually has 'am' and 'pm' strings defined, otherwise we
 	   will get incorrect results. Note also that we try to use exactly
-	   the same strings as in e_time_format_date_and_time(), to try to
+	   the same strings as in e_time_format_date_and_time (), to try to
 	   avoid i18n problems. We also use cut-down versions, so users don't
 	   have to type in the weekday or the seconds, for example.
 	   Note that all these formats include the full date, and the time
@@ -2014,13 +2014,13 @@ e_localtime_with_offset (time_t tt, struct tm *tm, gint *offset)
 }
 
 #ifdef G_OS_WIN32
-static gint _e_string_replace(gchar **str, const gchar *old, const gchar *new)
+static gint _e_string_replace (gchar **str, const gchar *old, const gchar *new)
 {
-	GRegex *my_regex = g_regex_new(old, 0, 0, NULL);
+	GRegex *my_regex = g_regex_new (old, 0, 0, NULL);
 	gchar *buf = *str;
 	*str = g_regex_replace(my_regex, buf, -1, 0, new, 0, NULL);
-	g_free(buf);
-	g_regex_unref(my_regex);
+	g_free (buf);
+	g_regex_unref (my_regex);
     return 0;
 }
 #endif
@@ -2039,14 +2039,14 @@ e_time_get_d_fmt_with_4digit_year (void)
 	res = g_strdup (nl_langinfo (D_FMT) );
 #elif defined(G_OS_WIN32)
   #define GET_LOCALE_INFO(str, len) GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SLONGDATE, str, len)
-	gint format_string_length = GET_LOCALE_INFO(NULL, 0);
+	gint format_string_length = GET_LOCALE_INFO (NULL, 0);
 	if (format_string_length > 0)
 	{
 		gsize format_bytes_read, format_bytes_written;
-		gchar *format_string = g_strnfill(format_string_length + 1, '\0');
-		GET_LOCALE_INFO(format_string, format_string_length);
-		res = g_locale_to_utf8(format_string, format_string_length, &format_bytes_read, &format_bytes_written, NULL);
-		g_free(format_string);
+		gchar *format_string = g_strnfill (format_string_length + 1, '\0');
+		GET_LOCALE_INFO (format_string, format_string_length);
+		res = g_locale_to_utf8 (format_string, format_string_length, &format_bytes_read, &format_bytes_written, NULL);
+		g_free (format_string);
 		/* now, convert the res to format of nl_langinfo */
 		_e_string_replace(&res, "\\bd\\b", "%#d");	/* d -> %#d */
 		_e_string_replace(&res, "\\bdd\\b", "%d");	/* dd -> %d */
diff --git a/libedataserver/e-url.c b/libedataserver/e-url.c
index 2b45cef..c8dce52 100644
--- a/libedataserver/e-url.c
+++ b/libedataserver/e-url.c
@@ -64,9 +64,9 @@ e_url_shroud (const gchar *url)
 	}
 
 	if (first_colon && last_at && first_colon < last_at) {
-		shrouded = g_malloc(first_colon - url + strlen(last_at)+1);
-		memcpy(shrouded, url, first_colon-url);
-		strcpy(shrouded + (first_colon-url), last_at);
+		shrouded = g_malloc (first_colon - url + strlen (last_at)+1);
+		memcpy (shrouded, url, first_colon-url);
+		strcpy (shrouded + (first_colon-url), last_at);
 	} else {
 		shrouded = g_strdup (url);
 	}
@@ -394,7 +394,7 @@ e_uri_to_string (EUri *uri, gboolean show_password)
 			uri->query ? "?" : "",
 			uri->query ? uri->query : "");
 	else
-		str_uri = g_strdup_printf(
+		str_uri = g_strdup_printf (
                         "%s://%s%s%s%s%s%s%s%s%s%s",
                         uri->protocol,
                         uri->user ? uri->user : "",
diff --git a/libedataserverui/e-cell-renderer-color.c b/libedataserverui/e-cell-renderer-color.c
index ce5aef0..13982f2 100644
--- a/libedataserverui/e-cell-renderer-color.c
+++ b/libedataserverui/e-cell-renderer-color.c
@@ -132,7 +132,7 @@ cell_renderer_color_render (GtkCellRenderer *cell,
 		return;
 
 	gdk_colormap_alloc_color (
-		gdk_colormap_get_system(), priv->color, FALSE, TRUE);
+		gdk_colormap_get_system (), priv->color, FALSE, TRUE);
 
 	cr = gdk_cairo_create (window);
 	gdk_cairo_set_source_color (cr, priv->color);
diff --git a/libedataserverui/e-contact-store.c b/libedataserverui/e-contact-store.c
index c955e02..c49d72d 100644
--- a/libedataserverui/e-contact-store.c
+++ b/libedataserverui/e-contact-store.c
@@ -267,7 +267,7 @@ find_contact_source_by_book (EContactStore *contact_store, EBook *book)
 }
 
 EBookView *
-find_contact_source_by_book_return_view(EContactStore *contact_store, EBook *book)
+find_contact_source_by_book_return_view (EContactStore *contact_store, EBook *book)
 {
 	ContactSource *source = NULL;
 	GArray *array;
diff --git a/libedataserverui/e-destination-store.c b/libedataserverui/e-destination-store.c
index 03c2bce..0397aa5 100644
--- a/libedataserverui/e-destination-store.c
+++ b/libedataserverui/e-destination-store.c
@@ -354,7 +354,7 @@ e_destination_store_list_destinations (EDestinationStore *destination_store)
 		destination_list = g_list_prepend (destination_list, destination);
 	}
 
-	destination_list = g_list_reverse(destination_list);
+	destination_list = g_list_reverse (destination_list);
 
 	return destination_list;
 }
@@ -689,14 +689,14 @@ e_destination_store_get_value (GtkTreeModel *tree_model,
 			break;
 
 		case E_DESTINATION_STORE_COLUMN_ADDRESS:
-			contact = e_destination_get_contact(destination);
+			contact = e_destination_get_contact (destination);
 			if (contact && E_IS_CONTACT (contact)) {
 				if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
 					string = e_destination_get_name (destination);
-					string_new = g_string_new(string);
+					string_new = g_string_new (string);
 					string_new = g_string_append(string_new, " mailing list");
 					g_value_set_string (value, string_new->str);
-					g_string_free(string_new, TRUE);
+					g_string_free (string_new, TRUE);
 				}
 				else {
 					string = e_destination_get_address (destination);
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index e48ca0f..be661cf 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -255,7 +255,7 @@ e_name_selector_dialog_init (ENameSelectorDialog *name_selector_dialog)
 	name_selector_dialog->priv->sections =
 		g_array_new (FALSE, FALSE, sizeof (Section));
 
-	gconf_client = gconf_client_get_default();
+	gconf_client = gconf_client_get_default ();
 	uid = gconf_client_get_string (gconf_client, "/apps/evolution/addressbook/display/primary_addressbook",
 			NULL);
 	/* read user_query_fields here, because we are using it in call of setup_name_selector_model */
@@ -619,8 +619,8 @@ add_section (ENameSelectorDialog *name_selector_dialog,
 	section.name = g_strdup (name);
 	section.section_box = GTK_BOX (gtk_hbox_new (FALSE, 12));
 	section.label = GTK_LABEL (gtk_label_new_with_mnemonic (pretty_name));
-	section.transfer_button  = GTK_BUTTON (gtk_button_new());
-	section.remove_button  = GTK_BUTTON (gtk_button_new());
+	section.transfer_button  = GTK_BUTTON (gtk_button_new ());
+	section.remove_button  = GTK_BUTTON (gtk_button_new ());
 	section.destination_view = make_tree_view_for_section (name_selector_dialog, destination_store);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (section.label), GTK_WIDGET (section.destination_view));
@@ -637,7 +637,7 @@ add_section (ENameSelectorDialog *name_selector_dialog,
 				  G_CALLBACK (transfer_button_clicked), name_selector_dialog);
 
 	/*data for the remove callback*/
-	data = g_malloc0(sizeof(SelData));
+	data = g_malloc0 (sizeof (SelData));
 	data->view = section.destination_view;
 	data->dlg_ptr = name_selector_dialog;
 
@@ -687,11 +687,11 @@ add_section (ENameSelectorDialog *name_selector_dialog,
 	gtk_container_add (GTK_CONTAINER (scrollwin), GTK_WIDGET (section.destination_view));
 
 	/*data for 'changed' callback*/
-	data = g_malloc0(sizeof(SelData));
+	data = g_malloc0 (sizeof (SelData));
 	data->view = section.destination_view;
 	data->button = section.remove_button;
 	g_object_set_data_full ((GObject *)section.destination_view, "sel-change-data", data, g_free);
-	selection = gtk_tree_view_get_selection(section.destination_view);
+	selection = gtk_tree_view_get_selection (section.destination_view);
 	gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
 
 	g_signal_connect(selection, "changed",
@@ -764,7 +764,7 @@ model_section_removed (ENameSelectorDialog *name_selector_dialog, const gchar *n
  * -------------------- */
 
 static void
-status_message(EBookView *view, const gchar *message, ENameSelectorDialog *dialog)
+status_message (EBookView *view, const gchar *message, ENameSelectorDialog *dialog)
 {
 	if (message == NULL)
 		gtk_label_set_text (dialog->priv->status_label, "");
@@ -773,9 +773,9 @@ status_message(EBookView *view, const gchar *message, ENameSelectorDialog *dialo
 }
 
 static void
-view_complete(EBookView *view, EBookViewStatus status, const gchar *error_msg, ENameSelectorDialog *dialog)
+view_complete (EBookView *view, EBookViewStatus status, const gchar *error_msg, ENameSelectorDialog *dialog)
 {
-	status_message(view, NULL, dialog);
+	status_message (view, NULL, dialog);
 }
 
 static void
@@ -1067,7 +1067,7 @@ remove_selection (ENameSelectorDialog *name_selector_dialog, GtkTreeView *tree_v
 	rows = gtk_tree_selection_get_selected_rows (selection, NULL);
 	rows = g_list_reverse (rows);
 
-	for (l = rows; l; l = g_list_next(l)) {
+	for (l = rows; l; l = g_list_next (l)) {
 		GtkTreeIter iter;
 		GtkTreePath *path = l->data;
 
@@ -1156,7 +1156,7 @@ transfer_button_clicked (ENameSelectorDialog *name_selector_dialog, GtkButton *t
 	rows = gtk_tree_selection_get_selected_rows (selection, NULL);
 	rows = g_list_reverse (rows);
 
-	for (l = rows; l; l = g_list_next(l)) {
+	for (l = rows; l; l = g_list_next (l)) {
 		GtkTreeIter iter;
 		GtkTreePath *path = l->data;
 
diff --git a/libedataserverui/e-name-selector-dialog.h b/libedataserverui/e-name-selector-dialog.h
index b7b5fb8..5b012a7 100644
--- a/libedataserverui/e-name-selector-dialog.h
+++ b/libedataserverui/e-name-selector-dialog.h
@@ -69,7 +69,7 @@ ENameSelectorDialog *
 ENameSelectorModel *
 		e_name_selector_dialog_peek_model
 						(ENameSelectorDialog *name_selector_dialog);
-void		e_name_selector_dialog_set_model(ENameSelectorDialog *name_selector_dialog,
+void		e_name_selector_dialog_set_model (ENameSelectorDialog *name_selector_dialog,
 						 ENameSelectorModel  *model);
 void		e_name_selector_dialog_set_destination_index
 						(ENameSelectorDialog *name_selector_dialog,
diff --git a/libedataserverui/e-name-selector-entry.c b/libedataserverui/e-name-selector-entry.c
index 4f021c4..02a1451 100644
--- a/libedataserverui/e-name-selector-entry.c
+++ b/libedataserverui/e-name-selector-entry.c
@@ -653,8 +653,8 @@ get_entry_substring (ENameSelectorEntry *name_selector_entry, gint range_start,
 static gint
 utf8_casefold_collate_len (const gchar *str1, const gchar *str2, gint len)
 {
-	gchar *s1 = g_utf8_casefold(str1, len);
-	gchar *s2 = g_utf8_casefold(str2, len);
+	gchar *s1 = g_utf8_casefold (str1, len);
+	gchar *s2 = g_utf8_casefold (str2, len);
 	gint rv;
 
 	rv = g_utf8_collate (s1, s2);
@@ -1413,7 +1413,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
 			/* If we are at the beginning or removing junk space, let us ignore it */
 			del_space = TRUE;
 		}
-		g_free(c);
+		g_free (c);
 	} else	if (end_pos == start_pos +1 &&  index_end == index_start+1) {
 		/* We could be just deleting the empty text */
 		gchar *c;
@@ -1425,7 +1425,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
 			/* If we are at the beginning or removing junk space, let us ignore it */
 			del_comma = TRUE;
 		}
-		g_free(c);
+		g_free (c);
 	}
 
 	if (del_comma) {
@@ -1493,7 +1493,7 @@ user_delete_text (ENameSelectorEntry *name_selector_entry, gint start_pos, gint
 
 	/* Let model know about changes */
 	text = gtk_entry_get_text (GTK_ENTRY (name_selector_entry));
-	if (!*text || strlen(text) <= 0) {
+	if (!*text || strlen (text) <= 0) {
 		/* If the entry was completely cleared, remove the initial destination too */
 		remove_destination_by_index (name_selector_entry, 0);
 		generate_attribute_list (name_selector_entry);
@@ -1619,7 +1619,7 @@ entry_activate (ENameSelectorEntry *name_selector_entry)
 			range_end = range_end+2;
 
 		}
-		g_free(str_context);
+		g_free (str_context);
 	}
 
 	gtk_editable_set_position (GTK_EDITABLE (name_selector_entry), range_end);
@@ -2323,8 +2323,8 @@ editor_closed_cb (GtkObject *editor, gpointer data)
 	if (!book)
 		return;
 
-	result = e_book_get_contact(book, contact_uid, &contact, NULL);
-	email_num = e_destination_get_email_num(destination);
+	result = e_book_get_contact (book, contact_uid, &contact, NULL);
+	email_num = e_destination_get_email_num (destination);
 	e_destination_set_contact (destination, contact, email_num);
 
 	g_free (contact_uid);
@@ -2343,7 +2343,7 @@ popup_activate_inline_expand (ENameSelectorEntry *name_selector_entry, GtkWidget
 
 	position = GPOINTER_TO_INT(g_object_get_data ((GObject *)name_selector_entry, "index"));
 
-	email_list = e_destination_get_address(destination);
+	email_list = e_destination_get_address (destination);
 	text = gtk_entry_get_text (GTK_ENTRY (name_selector_entry));
 	get_range_at_position (text, position, &start, &end);
 
@@ -2454,7 +2454,7 @@ popup_activate_cut (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_ite
 	GtkClipboard *clipboard;
 
 	destination = name_selector_entry->priv->popup_destination;
-	contact_email =e_destination_get_address(destination);
+	contact_email =e_destination_get_address (destination);
 
 	g_signal_handlers_block_by_func (name_selector_entry, user_insert_text, name_selector_entry);
 	g_signal_handlers_block_by_func (name_selector_entry, user_delete_text, name_selector_entry);
@@ -2483,7 +2483,7 @@ popup_activate_copy (ENameSelectorEntry *name_selector_entry, GtkWidget *menu_it
 	GtkClipboard *clipboard;
 
 	destination = name_selector_entry->priv->popup_destination;
-	contact_email = e_destination_get_address(destination);
+	contact_email = e_destination_get_address (destination);
 
 	g_signal_handlers_block_by_func (name_selector_entry, user_insert_text, name_selector_entry);
 	g_signal_handlers_block_by_func (name_selector_entry, user_delete_text, name_selector_entry);
@@ -2588,7 +2588,7 @@ populate_popup (ENameSelectorEntry *name_selector_entry, GtkMenu *menu)
 			show_menu = TRUE;
 
 			if (length > 1) {
-				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored(dest));
+				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored (dest));
 				g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_list),
 							  dest);
 			}
@@ -2811,7 +2811,7 @@ e_name_selector_entry_init (ENameSelectorEntry *name_selector_entry)
 	}
 
 	/* read minimum_query_length from gconf*/
-	gconf = gconf_client_get_default();
+	gconf = gconf_client_get_default ();
 	if (COMPLETION_CUE_MIN_LEN == 0) {
 	  if ((COMPLETION_CUE_MIN_LEN = gconf_client_get_int (gconf, MINIMUM_QUERY_LENGTH, NULL)))
 		;
diff --git a/libedataserverui/e-name-selector-list.c b/libedataserverui/e-name-selector-list.c
index 666dd1e..f9a9bac 100644
--- a/libedataserverui/e-name-selector-list.c
+++ b/libedataserverui/e-name-selector-list.c
@@ -122,8 +122,8 @@ enl_popup_grab (ENameSelectorList *list)
 		GTK_TREE_MODEL (store));
 
 	/* If any selection of text is present, unselect it */
-	len = strlen(gtk_entry_get_text(GTK_ENTRY(list)));
-	gtk_editable_select_region (GTK_EDITABLE(list), len, -1);
+	len = strlen (gtk_entry_get_text (GTK_ENTRY (list)));
+	gtk_editable_select_region (GTK_EDITABLE (list), len, -1);
 }
 
 static void
@@ -143,8 +143,8 @@ enl_entry_focus_in (ENameSelectorList *list, GdkEventFocus *event, gpointer dumm
 	gint len;
 
 	/* FIXME: Dont select every thing by default- Code is there but still it does */
-	len = strlen(gtk_entry_get_text(GTK_ENTRY(list)));
-	gtk_editable_select_region (GTK_EDITABLE(list), len, -1);
+	len = strlen (gtk_entry_get_text (GTK_ENTRY (list)));
+	gtk_editable_select_region (GTK_EDITABLE (list), len, -1);
 
 	return TRUE;
 }
@@ -187,7 +187,7 @@ enl_popup_focus_out (GtkWidget *w,
 		     ENameSelectorList *list)
 {
 	/* Just ungrab. We lose focus on button press event */
-	enl_popup_ungrab(list);
+	enl_popup_ungrab (list);
 	return TRUE;
 }
 
@@ -365,10 +365,10 @@ typedef struct {
 }PopupDeleteRowInfo;
 
 static void
-popup_delete_row(GtkWidget *w, PopupDeleteRowInfo *row_info)
+popup_delete_row (GtkWidget *w, PopupDeleteRowInfo *row_info)
 {
-	delete_row(row_info->path, row_info->list);
-	g_free(row_info);
+	delete_row (row_info->path, row_info->list);
+	g_free (row_info);
 }
 
 static void
@@ -436,7 +436,7 @@ enl_tree_button_press_event (GtkWidget *widget,
 	menu = gtk_menu_new ();
 	g_signal_connect (menu, "deactivate", G_CALLBACK(menu_deactivate), list);
 	list->priv->menu = menu;
-	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, gtk_get_current_event_time());
+	gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, gtk_get_current_event_time ());
 
 	email_num = e_destination_get_email_num (destination);
 
@@ -466,7 +466,7 @@ enl_tree_button_press_event (GtkWidget *widget,
 			show_menu = TRUE;
 
 			if (length > 1) {
-				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored(dest));
+				gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), !e_destination_is_ignored (dest));
 				g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_list),
 							  dest);
 			}
@@ -564,7 +564,7 @@ enl_tree_key_press_event (GtkWidget *w,
 }
 
 void
-e_name_selector_list_expand_clicked(ENameSelectorList *list)
+e_name_selector_list_expand_clicked (ENameSelectorList *list)
 {
 	ENameSelectorEntry *entry;
 	EDestinationStore *store;
@@ -583,7 +583,7 @@ e_name_selector_list_expand_clicked(ENameSelectorList *list)
 	else {
 		enl_popup_ungrab (list);
 		if (list->priv->menu)
-			gtk_menu_popdown(GTK_MENU (list->priv->menu));
+			gtk_menu_popdown (GTK_MENU (list->priv->menu));
 		gtk_widget_hide (GTK_WIDGET (list->priv->popup));
 	}
 }
@@ -644,7 +644,7 @@ e_name_selector_list_init (ENameSelectorList *list)
 	gtk_tree_selection_unselect_all (selection);
 	gtk_tree_view_set_enable_search (GTK_TREE_VIEW (list->priv->tree_view), FALSE);
 
-	completion = gtk_entry_get_completion (GTK_ENTRY(list));
+	completion = gtk_entry_get_completion (GTK_ENTRY (list));
 	gtk_entry_completion_set_inline_completion (completion, TRUE);
 	gtk_entry_completion_set_popup_completion (completion, TRUE);
 
diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c
index bd2ea7e..e966611 100644
--- a/libedataserverui/e-passwords.c
+++ b/libedataserverui/e-passwords.c
@@ -869,7 +869,7 @@ ep_get_password_keyring (EPassMsg *msg)
 		while (iter != NULL) {
 			GnomeKeyringFound *found = iter->data;
 
-			if (default_keyring && strcmp(default_keyring, found->keyring) != 0) {
+			if (default_keyring && strcmp (default_keyring, found->keyring) != 0) {
 				g_message ("Received a password from keyring '%s'. But looking for the password from '%s' keyring\n", found->keyring, default_keyring);
 				iter = g_list_next (iter);
 				continue;
@@ -904,7 +904,7 @@ ep_get_password_keyring (EPassMsg *msg)
 		while (iter != NULL) {
 			GnomeKeyringFound *found = iter->data;
 
-			if (default_keyring && strcmp(default_keyring, found->keyring) != 0) {
+			if (default_keyring && strcmp (default_keyring, found->keyring) != 0) {
 				g_message ("Received a password from keyring '%s'. But looking for the password from '%s' keyring\n", found->keyring, default_keyring);
 				iter = g_list_next (iter);
 				continue;
diff --git a/libedataserverui/e-passwords.h b/libedataserverui/e-passwords.h
index b231a1c..9f29e72 100644
--- a/libedataserverui/e-passwords.h
+++ b/libedataserverui/e-passwords.h
@@ -38,8 +38,8 @@ G_BEGIN_DECLS
 void e_passwords_init (void);
 
 void        e_passwords_shutdown          (void);
-void	    e_passwords_cancel(void);
-void        e_passwords_set_online(gint state);
+void	    e_passwords_cancel (void);
+void        e_passwords_set_online (gint state);
 void        e_passwords_remember_password (const gchar *component, const gchar *key);
 void        e_passwords_add_password      (const gchar *key, const gchar *passwd);
 gchar       *e_passwords_get_password      (const gchar *component, const gchar *key);
diff --git a/libedataserverui/e-source-selector.c b/libedataserverui/e-source-selector.c
index 5423117..5d5ef5b 100644
--- a/libedataserverui/e-source-selector.c
+++ b/libedataserverui/e-source-selector.c
@@ -745,7 +745,7 @@ group_search_function (GtkTreeModel *model,
 	}
 
 	if (name)
-		status = g_ascii_strncasecmp (name, key, strlen(key)) != 0;
+		status = g_ascii_strncasecmp (name, key, strlen (key)) != 0;
 
 	g_object_unref (data);
 
@@ -1152,9 +1152,9 @@ ess_bool_accumulator (GSignalInvocationHint *ihint,
                       const GValue *in,
                       gpointer data)
 {
-	gboolean val = g_value_get_boolean(in);
+	gboolean val = g_value_get_boolean (in);
 
-	g_value_set_boolean(out, val);
+	g_value_set_boolean (out, val);
 
 	return !val;
 }
diff --git a/libedataserverui/e-source-selector.h b/libedataserverui/e-source-selector.h
index b20cd61..0e815ec 100644
--- a/libedataserverui/e-source-selector.h
+++ b/libedataserverui/e-source-selector.h
@@ -93,12 +93,12 @@ gboolean	e_source_selector_source_is_selected
 						(ESourceSelector *selector,
 						 ESource *source);
 GSList *	e_source_selector_get_selection	(ESourceSelector *selector);
-void		e_source_selector_free_selection(GSList *list);
-void		e_source_selector_show_selection(ESourceSelector *selector,
+void		e_source_selector_free_selection (GSList *list);
+void		e_source_selector_show_selection (ESourceSelector *selector,
 						 gboolean show);
 gboolean	e_source_selector_selection_shown
 						(ESourceSelector *selector);
-void		e_source_selector_set_select_new(ESourceSelector *selector,
+void		e_source_selector_set_select_new (ESourceSelector *selector,
 						 gboolean state);
 void		e_source_selector_edit_primary_selection
 						(ESourceSelector *selector);
diff --git a/libedataserverui/e-tree-model-generator.h b/libedataserverui/e-tree-model-generator.h
index a69993a..62d5cd6 100644
--- a/libedataserverui/e-tree-model-generator.h
+++ b/libedataserverui/e-tree-model-generator.h
@@ -68,7 +68,7 @@ struct _ETreeModelGeneratorClass {
 GType		e_tree_model_generator_get_type	(void);
 ETreeModelGenerator *
 		e_tree_model_generator_new	(GtkTreeModel *child_model);
-GtkTreeModel *	e_tree_model_generator_get_model(ETreeModelGenerator *tree_model_generator);
+GtkTreeModel *	e_tree_model_generator_get_model (ETreeModelGenerator *tree_model_generator);
 void		e_tree_model_generator_set_generate_func
 						(ETreeModelGenerator *tree_model_generator,
 						 ETreeModelGeneratorGenerateFunc func,
diff --git a/libedataserverui/test-name-selector.c b/libedataserverui/test-name-selector.c
index 71552b1..ffb0445 100644
--- a/libedataserverui/test-name-selector.c
+++ b/libedataserverui/test-name-selector.c
@@ -60,7 +60,7 @@ start_test (void)
 
 	name_selector_dialog = e_name_selector_dialog_new ();
 	e_name_selector_dialog_set_model (name_selector_dialog, name_selector_model);
-	gtk_window_set_modal(GTK_WINDOW (name_selector_dialog), FALSE);
+	gtk_window_set_modal (GTK_WINDOW (name_selector_dialog), FALSE);
 
 	name_selector_entry = e_name_selector_entry_new ();
 	e_name_selector_entry_set_destination_store (name_selector_entry, destination_store);
diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c
index a35574a..e7d3ffc 100644
--- a/servers/groupwise/e-gw-connection.c
+++ b/servers/groupwise/e-gw-connection.c
@@ -901,7 +901,7 @@ e_gw_connection_get_items_delta_info (EGwConnection *cnc, const gchar *container
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "firstSequence");
 
 	if (subparam) {
-		tmp = soup_soap_parameter_get_string_value(subparam);
+		tmp = soup_soap_parameter_get_string_value (subparam);
 		*first_sequence = strtod (tmp, NULL);
 		g_free (tmp);
 	} else
@@ -910,7 +910,7 @@ e_gw_connection_get_items_delta_info (EGwConnection *cnc, const gchar *container
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "lastSequence");
 
 	if (subparam) {
-		tmp = soup_soap_parameter_get_string_value(subparam);
+		tmp = soup_soap_parameter_get_string_value (subparam);
 		*last_sequence = strtod (tmp, NULL);
 		g_free (tmp);
 	}
@@ -920,7 +920,7 @@ e_gw_connection_get_items_delta_info (EGwConnection *cnc, const gchar *container
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "lastTimePORebuild");
 
 	if (subparam) {
-		tmp = soup_soap_parameter_get_string_value(subparam);
+		tmp = soup_soap_parameter_get_string_value (subparam);
 		*last_po_rebuild_time = strtod (tmp, NULL);
 		g_free (tmp);
 	} else
@@ -956,7 +956,7 @@ e_gw_connection_get_items_delta (EGwConnection *cnc, const gchar *container, con
 	soup_soap_message_start_element (msg, "deltaInfo", NULL, NULL);
 	e_gw_message_write_string_parameter (msg, "firstSequence", NULL, start_sequence);
 	e_gw_message_write_string_parameter (msg, "count", NULL, count);
-	soup_soap_message_end_element(msg);
+	soup_soap_message_end_element (msg);
 
         /* send message to server */
 
@@ -2256,10 +2256,10 @@ e_gw_connection_add_members (EGwConnection *cnc, const gchar *group_id, GList *m
 	for (; member_ids != NULL; member_ids = g_list_next (member_ids)) {
 		soup_soap_message_start_element (msg, "member", NULL, NULL);
 		e_gw_message_write_string_parameter (msg, "id", NULL, member_ids->data);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 	}
 
-	soup_soap_message_end_element(msg);
+	soup_soap_message_end_element (msg);
 	e_gw_message_write_footer (msg);
 	response = e_gw_connection_send_message (cnc, msg);
         if (!response) {
@@ -2299,10 +2299,10 @@ e_gw_connection_remove_members (EGwConnection *cnc, const gchar *group_id, GList
 	for (; member_ids != NULL; member_ids = g_list_next (member_ids)) {
 		soup_soap_message_start_element (msg, "member", NULL, NULL);
 		e_gw_message_write_string_parameter (msg, "id", NULL, member_ids->data);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 	}
 
-	soup_soap_message_end_element(msg);
+	soup_soap_message_end_element (msg);
 	e_gw_message_write_footer (msg);
 	response = e_gw_connection_send_message (cnc, msg);
         if (!response) {
@@ -2335,7 +2335,7 @@ e_gw_connection_create_cursor (EGwConnection *cnc, const gchar *container, const
 	e_gw_message_write_string_parameter (msg, "container", NULL, container);
 	if (view)
 		e_gw_message_write_string_parameter (msg, "view", NULL, view);
-	if (E_IS_GW_FILTER(filter))
+	if (E_IS_GW_FILTER (filter))
 		e_gw_filter_append_to_soap_message (filter, msg);
 
 	e_gw_message_write_footer (msg);
@@ -2360,7 +2360,7 @@ e_gw_connection_create_cursor (EGwConnection *cnc, const gchar *container, const
                 g_object_unref (msg);
                 return E_GW_CONNECTION_STATUS_INVALID_RESPONSE;
         }
-	value = soup_soap_parameter_get_string_value(param);
+	value = soup_soap_parameter_get_string_value (param);
 
 	if (!value) {
 		 g_object_unref (response);
@@ -2619,7 +2619,7 @@ EGwConnectionStatus e_gw_connection_get_quick_messages (EGwConnection *cnc, cons
 }
 
 EGwConnectionStatus
-e_gw_connection_create_folder(EGwConnection *cnc, const gchar *parent_name,const gchar *folder_name, gchar **container_id)
+e_gw_connection_create_folder (EGwConnection *cnc, const gchar *parent_name,const gchar *folder_name, gchar **container_id)
 {
 	SoupSoapMessage *msg;
 	SoupSoapResponse *response;
@@ -2922,7 +2922,7 @@ e_gw_connection_rename_folder (EGwConnection *cnc, const gchar *id ,const gchar
 }
 
 EGwConnectionStatus
-e_gw_connection_share_folder(EGwConnection *cnc, gchar *id, GList *new_list, const gchar *sub, const gchar *mesg ,int flag)
+e_gw_connection_share_folder (EGwConnection *cnc, gchar *id, GList *new_list, const gchar *sub, const gchar *mesg ,int flag)
 {
 	SoupSoapMessage *msg;
 	SoupSoapResponse *response;
@@ -3080,7 +3080,7 @@ e_gw_connection_purge_selected_items (EGwConnection *cnc, GList *item_ids)
 }
 
 EGwConnectionStatus
-e_gw_connection_mark_read(EGwConnection *cnc, GList *item_ids)
+e_gw_connection_mark_read (EGwConnection *cnc, GList *item_ids)
 {
 	SoupSoapMessage *msg;
 	SoupSoapResponse *response;
@@ -3115,7 +3115,7 @@ e_gw_connection_mark_read(EGwConnection *cnc, GList *item_ids)
 }
 
 EGwConnectionStatus
-e_gw_connection_mark_unread(EGwConnection *cnc, GList *item_ids)
+e_gw_connection_mark_unread (EGwConnection *cnc, GList *item_ids)
 {
 	SoupSoapMessage *msg;
 	SoupSoapResponse *response;
@@ -3483,7 +3483,7 @@ e_gw_junkentry_new_from_soap_parameter (SoupSoapParameter *param)
 
 	g_return_val_if_fail (param != NULL, NULL);
 
-	junk_entry = g_new0(EGwJunkEntry, 1);
+	junk_entry = g_new0 (EGwJunkEntry, 1);
 
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "id");
 	if (!subparam) {
@@ -4074,7 +4074,7 @@ e_gw_connection_get_proxy_connection (EGwConnection *parent_cnc, gchar *username
 
 	for (i=0; proxy[i]!='\0' && proxy[i]!='@'; i++);
 	if (proxy[i]=='@')
-		name = g_strndup(proxy, i);
+		name = g_strndup (proxy, i);
 	else
 		name = g_strdup (proxy);
 	/* search the connection in our hash table */
@@ -4176,7 +4176,7 @@ e_gw_connection_get_proxy_connection (EGwConnection *parent_cnc, gchar *username
 
 	g_hash_table_insert (loaded_connections_permissions, hash_key, cnc);
 	permissions_key = g_strdup_printf ("%s:permissions", hash_key);
-	g_hash_table_insert (loaded_connections_permissions, permissions_key, GINT_TO_POINTER(*permissions));
+	g_hash_table_insert (loaded_connections_permissions, permissions_key, GINT_TO_POINTER (*permissions));
 
 	/* free memory */
 	g_object_unref (response);
diff --git a/servers/groupwise/e-gw-connection.h b/servers/groupwise/e-gw-connection.h
index 7bebdc3..d66bfab 100644
--- a/servers/groupwise/e-gw-connection.h
+++ b/servers/groupwise/e-gw-connection.h
@@ -150,7 +150,7 @@ EGwConnectionStatus e_gw_connection_position_cursor (EGwConnection *cnc, const g
 
 EGwConnectionStatus e_gw_connection_get_quick_messages (EGwConnection *cnc, const gchar *container, const gchar *view, gchar **start_date, const gchar *message_list, const gchar *item_types, const gchar *item_sources, gint count, GSList **item_list);
 
-EGwConnectionStatus e_gw_connection_create_folder(EGwConnection *cnc, const gchar *parent_name,const gchar *folder_name, gchar **container_id);
+EGwConnectionStatus e_gw_connection_create_folder (EGwConnection *cnc, const gchar *parent_name,const gchar *folder_name, gchar **container_id);
 EGwConnectionStatus
 e_gw_connection_get_attachment (EGwConnection *cnc, const gchar *id, gint offset, gint length, const gchar **attachment, gint *attach_length);
 EGwConnectionStatus e_gw_connection_get_attachment_base64 (EGwConnection *cnc, const gchar *id, gint offset, gint length, const gchar **attachment, gint *attach_length, gint *offset_r);
@@ -165,8 +165,8 @@ EGwConnectionStatus e_gw_connection_accept_shared_folder (EGwConnection *cnc, gc
 EGwConnectionStatus e_gw_connection_purge_deleted_items (EGwConnection *cnc);
 EGwConnectionStatus e_gw_connection_purge_selected_items (EGwConnection *cnc, GList *item_ids);
 
-EGwConnectionStatus e_gw_connection_mark_read(EGwConnection *cnc, GList *item_ids);
-EGwConnectionStatus e_gw_connection_mark_unread(EGwConnection *cnc, GList *item_ids);
+EGwConnectionStatus e_gw_connection_mark_read (EGwConnection *cnc, GList *item_ids);
+EGwConnectionStatus e_gw_connection_mark_unread (EGwConnection *cnc, GList *item_ids);
 EGwConnectionStatus e_gw_connection_reply_item (EGwConnection *cnc, const gchar *id, const gchar *view, EGwItem **item);
 EGwConnectionStatus e_gw_connection_forward_item (EGwConnection *cnc, const gchar *id, const gchar *view, gboolean embed, EGwItem **item);
 EGwConnectionStatus e_gw_connection_create_junk_entry (EGwConnection *cnc, const gchar *value, const gchar *match_type , const gchar *list_type);
diff --git a/servers/groupwise/e-gw-container.c b/servers/groupwise/e-gw-container.c
index b96c151..6e7f52d 100644
--- a/servers/groupwise/e-gw-container.c
+++ b/servers/groupwise/e-gw-container.c
@@ -53,12 +53,12 @@ static GObjectClass *parent_class = NULL;
 
 static void e_gw_container_set_sequence (EGwContainer *container, gint sequence);
 static void e_gw_container_set_modified (EGwContainer *container, const gchar *modified);
-static void e_gw_container_set_owner(EGwContainer *container, const gchar *owner);
+static void e_gw_container_set_owner (EGwContainer *container, const gchar *owner);
 static void e_gw_container_set_is_shared_by_me (EGwContainer *container, gboolean is_shared_by_me);
 static void e_gw_container_set_is_shared_to_me (EGwContainer *container, gboolean is_shared_to_me);
 
 static void
-free_node(EShUsers *user)
+free_node (EShUsers *user)
 {
 	if (user) {
 		g_free (user->email);
@@ -259,7 +259,7 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet
 		if (subparam) {
 			value = soup_soap_parameter_get_string_value (subparam);
 			if (value)
-				container->priv->unread = atoi(value);
+				container->priv->unread = atoi (value);
 			else
 				container->priv->unread = 0; /*XXX:should it be 0?*/
 
@@ -271,13 +271,13 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet
 	if (subparam) {
 		value = soup_soap_parameter_get_string_value (subparam);
 		if (value)
-			container->priv->total = atoi(value);
+			container->priv->total = atoi (value);
 		g_free (value);
 	}
 	/* Is shared by me*/
 	subparam = soup_soap_parameter_get_first_child_by_name (param, "isSharedByMe");
 	if (!subparam) {
-		e_gw_container_set_is_shared_by_me(container, FALSE);
+		e_gw_container_set_is_shared_by_me (container, FALSE);
 
 	} else {
 		value = soup_soap_parameter_get_string_value (subparam);
@@ -320,7 +320,7 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet
 					entry_subparam != NULL;
 					entry_subparam = soup_soap_parameter_get_next_child_by_name (entry_subparam, "entry")) {
 
-				EShUsers *user = g_new0(EShUsers , 1);
+				EShUsers *user = g_new0 (EShUsers , 1);
 				email_rt_subparam = soup_soap_parameter_get_first_child_by_name (entry_subparam, "email");
 
 				if (!email_rt_subparam) {
@@ -438,11 +438,11 @@ e_gw_container_set_modified (EGwContainer *container, const gchar *modified)
 }
 
 static void
-e_gw_container_set_owner(EGwContainer *container, const gchar *owner)
+e_gw_container_set_owner (EGwContainer *container, const gchar *owner)
 {
 	EGwContainerPrivate *priv;
 
-	g_return_if_fail (E_IS_GW_CONTAINER(container));
+	g_return_if_fail (E_IS_GW_CONTAINER (container));
 	g_return_if_fail (owner!=NULL);
 
 	priv = container->priv;
diff --git a/servers/groupwise/e-gw-container.h b/servers/groupwise/e-gw-container.h
index 3aa7719..4a34953 100644
--- a/servers/groupwise/e-gw-container.h
+++ b/servers/groupwise/e-gw-container.h
@@ -88,14 +88,14 @@ void          e_gw_container_set_is_writable (EGwContainer *container, gboolean
 gboolean     e_gw_container_get_is_frequent_contacts (EGwContainer *container);
 void         e_gw_container_set_is_frequent_contacts (EGwContainer *container, gboolean is_frequent_contacts);
 gboolean    e_gw_container_is_root (EGwContainer *container);
-const gchar *  e_gw_container_get_owner(EGwContainer *container);
-const gchar *  e_gw_container_get_modified(EGwContainer *container);
-gint           e_gw_container_get_sequence(EGwContainer *container);
-gboolean      e_gw_container_get_is_shared_by_me(EGwContainer *container);
-gboolean      e_gw_container_get_is_shared_to_me(EGwContainer *container);
-gint	      e_gw_container_get_rights(EGwContainer *container, gchar *email);
+const gchar *  e_gw_container_get_owner (EGwContainer *container);
+const gchar *  e_gw_container_get_modified (EGwContainer *container);
+gint           e_gw_container_get_sequence (EGwContainer *container);
+gboolean      e_gw_container_get_is_shared_by_me (EGwContainer *container);
+gboolean      e_gw_container_get_is_shared_to_me (EGwContainer *container);
+gint	      e_gw_container_get_rights (EGwContainer *container, gchar *email);
 EGwContainerType e_gw_container_get_container_type (EGwContainer *container);
-void	      e_gw_container_get_user_list(EGwContainer *container, GList **user_list);
+void	      e_gw_container_get_user_list (EGwContainer *container, GList **user_list);
 void	      e_gw_container_form_message (SoupSoapMessage *msg, gchar *id, GList *new_list, const gchar *sub, const gchar *mesg, gint flag);
 gboolean e_gw_container_get_is_system_folder (EGwContainer *container);
 void e_gw_container_set_is_system_folder (EGwContainer *container, gboolean is_system_folder);
diff --git a/servers/groupwise/e-gw-filter.c b/servers/groupwise/e-gw-filter.c
index 77b0c45..0de8fa4 100644
--- a/servers/groupwise/e-gw-filter.c
+++ b/servers/groupwise/e-gw-filter.c
@@ -238,7 +238,7 @@ e_gw_filter_init (EGwFilter *filter)
 {
 	EGwFilterPrivate *priv;
 
-	priv = g_new0(EGwFilterPrivate, 1);
+	priv = g_new0 (EGwFilterPrivate, 1);
 	priv->filter_group_type = E_GW_FILTER_OP_AND; /*by default all condtions are to be met*/
 	priv->component_list = NULL;
 	filter->priv = priv;
diff --git a/servers/groupwise/e-gw-filter.h b/servers/groupwise/e-gw-filter.h
index a931412..9672b48 100644
--- a/servers/groupwise/e-gw-filter.h
+++ b/servers/groupwise/e-gw-filter.h
@@ -67,7 +67,7 @@ struct _EGwFilterClass {
 };
 
 GType       e_gw_filter_get_type (void);
-EGwFilter*  e_gw_filter_new(void);
+EGwFilter*  e_gw_filter_new (void);
 void        e_gw_filter_add_filter_component (EGwFilter *filter, EGwFilterOpType operation, const gchar *field_name, const gchar *field_value);
 void        e_gw_filter_append_to_soap_message (EGwFilter *filter, SoupSoapMessage *msg);
 void        e_gw_filter_group_conditions (EGwFilter *filter, EGwFilterOpType operation, gint num_of_condtions);
diff --git a/servers/groupwise/e-gw-item.c b/servers/groupwise/e-gw-item.c
index d7e60ed..7b1f952 100644
--- a/servers/groupwise/e-gw-item.c
+++ b/servers/groupwise/e-gw-item.c
@@ -163,11 +163,11 @@ free_postal_address (gpointer  postal_address)
 	if (address) {
 		g_free (address->street_address);
 		g_free (address->location);
-		g_free(address->city);
-		g_free(address->country);
-		g_free(address->state);
-		g_free(address->postal_code);
-		g_free(address);
+		g_free (address->city);
+		g_free (address->country);
+		g_free (address->state);
+		g_free (address->postal_code);
+		g_free (address);
 	}
 }
 
@@ -209,7 +209,7 @@ free_attach (gpointer s, gpointer data)
 		if (attach->data)
 			g_free (attach->data), attach->data = NULL;
 
-		g_free(attach);
+		g_free (attach);
 	}
 
 }
@@ -571,9 +571,9 @@ e_gw_item_init (EGwItem *item)
 	priv->delay_until = NULL;
 	priv->attach_list = NULL;
 	priv->simple_fields = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
-	priv->full_name = g_new0(FullName, 1);
+	priv->full_name = g_new0 (FullName, 1);
 	priv->addresses = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, free_postal_address);
-	priv->additions = g_hash_table_new(g_str_hash, g_str_equal);
+	priv->additions = g_hash_table_new (g_str_hash, g_str_equal);
 	priv->updates =   g_hash_table_new (g_str_hash, g_str_equal);
 	priv->deletions = g_hash_table_new (g_str_hash, g_str_equal);
 	priv->self_status = 0;
@@ -830,7 +830,7 @@ e_gw_item_get_field_value (EGwItem *item, const gchar *field_name)
 	gpointer value;
 
 	g_return_val_if_fail (field_name != NULL, NULL);
-	g_return_val_if_fail (E_IS_GW_ITEM(item), NULL);
+	g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
 
 	if (item->priv->simple_fields == NULL)
 		return NULL;
@@ -847,7 +847,7 @@ e_gw_item_set_field_value (EGwItem *item, const gchar *field_name, gchar * field
 {
 	g_return_if_fail (field_name != NULL);
 	g_return_if_fail (field_name != NULL);
-	g_return_if_fail (E_IS_GW_ITEM(item));
+	g_return_if_fail (E_IS_GW_ITEM (item));
 
 	if (item->priv->simple_fields != NULL)
 		g_hash_table_insert (item->priv->simple_fields, (gpointer) field_name, g_strdup (field_value));
@@ -1040,7 +1040,7 @@ set_common_addressbook_item_fields_from_soap_parameter (EGwItem *item, SoupSoapP
 				g_free (value);
 				value = components[0];
 				priv->category_list = g_list_append (priv->category_list, g_strdup (value));
-				g_strfreev(components);
+				g_strfreev (components);
 
 			}
 
@@ -1180,7 +1180,7 @@ set_contact_fields_from_soap_parameter (EGwItem *item, SoupSoapParameter *param)
 	if (subparam) {
 		for ( temp = soup_soap_parameter_get_first_child (subparam); temp != NULL; temp = soup_soap_parameter_get_next_child (temp))
 			{
-				IMAddress *im_address = g_new0(IMAddress, 1);
+				IMAddress *im_address = g_new0 (IMAddress, 1);
 				im_address->address = im_address->service = NULL;
 				second_level_child = soup_soap_parameter_get_first_child_by_name (temp, "service");
 				if (second_level_child) {
@@ -1461,7 +1461,7 @@ append_postal_address_to_soap_message (SoupSoapMessage *msg, PostalAddress *addr
 		e_gw_message_write_string_parameter (msg, "postalCode", NULL, address->postal_code);
 	if (address->country)
 		e_gw_message_write_string_parameter (msg, "country", NULL, address->country);
-	soup_soap_message_end_element(msg);
+	soup_soap_message_end_element (msg);
 
 }
 
@@ -1684,7 +1684,7 @@ append_group_fields_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 		e_gw_message_write_string_parameter (msg, "id", NULL, member->id);
 		e_gw_message_write_string_parameter (msg, "distType", NULL, "TO");
 		e_gw_message_write_string_parameter (msg, "itemType", NULL, "Contact");
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 
 	}
 	soup_soap_message_end_element (msg);
@@ -1958,7 +1958,7 @@ e_gw_item_new_from_soap_parameter (const gchar *email, const gchar *container, S
 					g_free (value);
 					value = components[0];
 					item->priv->category_list = g_list_append (item->priv->category_list, g_strdup (value));
-					g_strfreev(components);
+					g_strfreev (components);
 				}
 			}
 
@@ -2642,7 +2642,7 @@ e_gw_item_set_to (EGwItem *item, const gchar *to)
 const gchar *
 e_gw_item_get_to (EGwItem *item)
 {
-	g_return_val_if_fail (E_IS_GW_ITEM(item), NULL);
+	g_return_val_if_fail (E_IS_GW_ITEM (item), NULL);
 	return item->priv->to;
 }
 
@@ -3036,7 +3036,7 @@ e_gw_item_add_distribution_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 }
 
 static void
-add_attachment_to_soap_message(EGwItemAttachment *attachment, SoupSoapMessage *msg)
+add_attachment_to_soap_message (EGwItemAttachment *attachment, SoupSoapMessage *msg)
 {
 	gchar *size = NULL;
 
@@ -3282,7 +3282,7 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 		if (priv->subject)
 			e_gw_message_write_string_parameter (msg, "subject", NULL, priv->subject);
 		/*distribution*/
-		e_gw_item_add_distribution_to_soap_message(item, msg);
+		e_gw_item_add_distribution_to_soap_message (item, msg);
 
 		if (priv->set_sendoptions) {
 			/* item options */
@@ -3393,22 +3393,22 @@ e_gw_item_append_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 	case E_GW_ITEM_TYPE_CONTACT :
 		soup_soap_message_add_attribute (msg, "type", "Contact", "xsi", NULL);
 		append_contact_fields_to_soap_message (item, msg);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	case E_GW_ITEM_TYPE_GROUP :
 		soup_soap_message_add_attribute (msg, "type", "Group", "xsi", NULL);
 		append_group_fields_to_soap_message (item, msg);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	case E_GW_ITEM_TYPE_ORGANISATION :
 		soup_soap_message_add_attribute (msg, "type", "Organization", "xsi", NULL);
 		append_contact_fields_to_soap_message (item, msg);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	case E_GW_ITEM_TYPE_CATEGORY :
 		soup_soap_message_add_attribute (msg, "type", "Category", "xsi", NULL);
 		e_gw_message_write_string_parameter (msg, "name", NULL, item->priv->category_name);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	default :
 		g_warning (G_STRLOC ": Unknown type for item");
@@ -3597,7 +3597,7 @@ e_gw_item_append_changes_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 		append_contact_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_ADD);
 		append_contact_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_UPDATE);
 		append_contact_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_DELETE);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	case E_GW_ITEM_TYPE_GROUP :
 		soup_soap_message_start_element (msg, "update", NULL, NULL);
@@ -3605,7 +3605,7 @@ e_gw_item_append_changes_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 		if (value)
 			e_gw_message_write_string_parameter (msg, "name", NULL, value);
 		soup_soap_message_end_element (msg);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	case E_GW_ITEM_TYPE_APPOINTMENT:
 	case E_GW_ITEM_TYPE_TASK :
@@ -3613,7 +3613,7 @@ e_gw_item_append_changes_to_soap_message (EGwItem *item, SoupSoapMessage *msg)
 		append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_ADD);
 		append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_UPDATE);
 		append_event_changes_to_soap_message (item, msg, E_GW_ITEM_CHANGE_TYPE_DELETE);
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 		return TRUE;
 	default :
 		g_warning (G_STRLOC ": Unknown type for item");
diff --git a/servers/groupwise/e-gw-proxy.c b/servers/groupwise/e-gw-proxy.c
index 0f6c02d..b260603 100644
--- a/servers/groupwise/e-gw-proxy.c
+++ b/servers/groupwise/e-gw-proxy.c
@@ -43,7 +43,7 @@ e_gw_proxy_construct_proxy_access_list (SoupSoapParameter *param, GList **proxy_
 			subparam = soup_soap_parameter_get_next_child_by_name (subparam, "entry")) {
 
 		proxyHandler *aclInstance;
-		aclInstance = (proxyHandler *) g_malloc0 (sizeof(proxyHandler));
+		aclInstance = (proxyHandler *) g_malloc0 (sizeof (proxyHandler));
 		aclInstance->permissions = 0;
 		aclInstance->flags = 0;
 		type_param = soup_soap_parameter_get_first_child_by_name (subparam, "email");
@@ -187,7 +187,7 @@ e_gw_proxy_form_soap_request_from_proxyHandler (SoupSoapMessage *msg, proxyHandl
 		e_gw_message_write_int_parameter (msg, "write", NULL, 1);
 	}
 	if (added == TRUE)
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 
 	added = FALSE;
 	if (new_proxy->permissions & E_GW_PROXY_APPOINTMENT_READ) {
@@ -221,7 +221,7 @@ e_gw_proxy_form_soap_request_from_proxyHandler (SoupSoapMessage *msg, proxyHandl
 		e_gw_message_write_int_parameter (msg, "write", NULL, 1);
 	}
 	if (added == TRUE)
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 
 	added = FALSE;
 	if (new_proxy->permissions & E_GW_PROXY_NOTES_READ) {
@@ -238,7 +238,7 @@ e_gw_proxy_form_soap_request_from_proxyHandler (SoupSoapMessage *msg, proxyHandl
 		e_gw_message_write_int_parameter (msg, "write", NULL, 1);
 	}
 	if (added == TRUE)
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 
 	added = FALSE;
 	if (new_proxy->permissions & E_GW_PROXY_GET_ALARMS) {
@@ -272,7 +272,7 @@ e_gw_proxy_form_soap_request_from_proxyHandler (SoupSoapMessage *msg, proxyHandl
 		e_gw_message_write_int_parameter (msg, "readHidden", NULL, 1);
 	}
 	if (added==TRUE)
-		soup_soap_message_end_element(msg);
+		soup_soap_message_end_element (msg);
 
 }
 
diff --git a/servers/groupwise/soup-soap-response.c b/servers/groupwise/soup-soap-response.c
index 9c0f048..0bc0d40 100644
--- a/servers/groupwise/soup-soap-response.c
+++ b/servers/groupwise/soup-soap-response.c
@@ -569,7 +569,7 @@ soup_soap_response_dump_response (SoupSoapResponse *response, FILE *buffer)
 	gint buffersize, ret;
 
 	SoupSoapResponsePrivate *priv = SOUP_SOAP_RESPONSE_GET_PRIVATE (response);
-	xmlDocDumpFormatMemory(priv->xmldoc, &xmlbuff, &buffersize, 1);
+	xmlDocDumpFormatMemory (priv->xmldoc, &xmlbuff, &buffersize, 1);
 
 	ret = fputs ((gchar *) xmlbuff, buffer);
 	xmlFree (xmlbuff);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]