diff --git a/Makefile.am b/Makefile.am
index beb7c58..fdbbd0d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,7 @@ SUBDIRS = \
 	lib \
 	man \
 	po \
-	src \
-	tests
+	src
 
 EXTRA_DIST = \
 	INSTALL.md \
diff --git a/configure.ac b/configure.ac
index 309e0a9..02831c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([1.11.1 foreign no-dist-gzip dist-xz])
 AM_SILENT_RULES([yes])
 
-AC_PROG_CC_C99
+AC_LANG([C++])
 AC_PROG_CXX
 AC_PROG_RANLIB
 AC_PROG_INSTALL
@@ -71,7 +71,6 @@ AC_CONFIG_FILES([
 	man/spek.1
 	po/Makefile.in
 	src/Makefile
-	tests/Makefile
 	web/version
 ])
 AC_OUTPUT
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 736bf6a..5641d43 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,20 +1,20 @@
 noinst_LIBRARIES = libspek.a
 
 libspek_a_SOURCES = \
-	spek-audio.c \
+	spek-audio.cc \
 	spek-audio.h \
-	spek-fft.c \
+	spek-fft.cc \
 	spek-fft.h \
-	spek-palette.c \
+	spek-palette.cc \
 	spek-palette.h \
-	spek-pipeline.c \
+	spek-pipeline.cc \
 	spek-pipeline.h \
-	spek-utils.c \
+	spek-utils.cc \
 	spek-utils.h
 
 libspek_a_CPPFLAGS = \
 	-include config.h \
 	-pthread
 
-libspek_a_CFLAGS = \
+libspek_a_CXXFLAGS = \
 	$(FFMPEG_CFLAGS)
diff --git a/lib/spek-audio.c b/lib/spek-audio.cc
similarity index 95%
rename from lib/spek-audio.c
rename to lib/spek-audio.cc
index 5f0f713..e7e9173 100644
--- a/lib/spek-audio.c
+++ b/lib/spek-audio.cc
@@ -1,4 +1,4 @@
-/* spek-audio.c
+/* spek-audio.cc
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -18,9 +18,12 @@
 
 #include <string.h>
 
+#define __STDC_CONSTANT_MACROS
+extern "C" {
 #include <libavformat/avformat.h>
 #include <libavcodec/avcodec.h>
 #include <libavutil/mathematics.h>
+}
 
 #include "spek-audio.h"
 
@@ -53,7 +56,8 @@ const struct spek_audio_properties * spek_audio_get_properties(struct spek_audio
 struct spek_audio_context * spek_audio_open(const char *path)
 {
     // TODO: malloc and initialise explicitely
-    struct spek_audio_context *cx = calloc(1, sizeof(struct spek_audio_context));
+    struct spek_audio_context *cx =
+        (spek_audio_context *)calloc(1, sizeof(struct spek_audio_context));
 
     if (avformat_open_input(&cx->format_context, path, NULL, NULL) != 0) {
         cx->properties.error = SPEK_AUDIO_CANNOT_OPEN_FILE;
@@ -132,8 +136,8 @@ struct spek_audio_context * spek_audio_open(const char *path)
         return cx;
     }
     cx->buffer_size = (AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2;
-    cx->properties.buffer = av_malloc(cx->buffer_size);
-    cx->packet = av_mallocz(sizeof(AVPacket));
+    cx->properties.buffer = (uint8_t*)av_malloc(cx->buffer_size);
+    cx->packet = (AVPacket*)av_mallocz(sizeof(AVPacket));
     av_init_packet(cx->packet);
     cx->offset = 0;
     return cx;
diff --git a/lib/spek-fft.c b/lib/spek-fft.cc
similarity index 86%
rename from lib/spek-fft.c
rename to lib/spek-fft.cc
index 756087d..7b4e8a9 100644
--- a/lib/spek-fft.c
+++ b/lib/spek-fft.cc
@@ -1,4 +1,4 @@
-/* spek-fft.c
+/* spek-fft.cc
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -17,16 +17,20 @@
  */
 
 #include <math.h>
+
+#define __STDC_CONSTANT_MACROS
+extern "C" {
 #include <libavcodec/avfft.h>
 #include <libavutil/mem.h>
+}
 
 #include "spek-fft.h"
 
 struct spek_fft_plan * spek_fft_plan_new(int n)
 {
-    struct spek_fft_plan *p = malloc(sizeof(struct spek_fft_plan));
-    p->input = av_mallocz(sizeof(float) * n);
-    p->output = av_mallocz(sizeof(float) * (n / 2 + 1));
+    struct spek_fft_plan *p = (spek_fft_plan*)malloc(sizeof(struct spek_fft_plan));
+    p->input = (float*)av_mallocz(sizeof(float) * n);
+    p->output = (float*)av_mallocz(sizeof(float) * (n / 2 + 1));
     int bits = 0;
     while (n) {
         n >>= 1;
diff --git a/lib/spek-palette.c b/lib/spek-palette.cc
similarity index 99%
rename from lib/spek-palette.c
rename to lib/spek-palette.cc
index bdb074c..bf39088 100644
--- a/lib/spek-palette.c
+++ b/lib/spek-palette.cc
@@ -1,4 +1,4 @@
-/* spek-palette.c
+/* spek-palette.cc
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
diff --git a/lib/spek-palette.h b/lib/spek-palette.h
index 783b49b..ed4dbef 100644
--- a/lib/spek-palette.h
+++ b/lib/spek-palette.h
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_PALETTE_HH_
-#define SPEK_PALETTE_HH_
+#ifndef SPEK_PALETTE_H_
+#define SPEK_PALETTE_H_
 
 #include <stdint.h>
 
diff --git a/lib/spek-pipeline.c b/lib/spek-pipeline.cc
similarity index 94%
rename from lib/spek-pipeline.c
rename to lib/spek-pipeline.cc
index a3197fe..f242e33 100644
--- a/lib/spek-pipeline.c
+++ b/lib/spek-pipeline.cc
@@ -1,4 +1,4 @@
-/* spek-pipeline.c
+/* spek-pipeline.cc
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -23,9 +23,12 @@
  * (c) 2007-2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
  */
 
+#define __STDC_LIMIT_MACROS
+
 #include <assert.h>
 #include <math.h>
 #include <pthread.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -81,7 +84,7 @@ static float average_input(const struct spek_pipeline *p, void *buffer);
 struct spek_pipeline * spek_pipeline_open(
     const char *path, int bands, int samples, spek_pipeline_cb cb, void *cb_data)
 {
-    struct spek_pipeline *p = malloc(sizeof(struct spek_pipeline));
+    struct spek_pipeline *p = (spek_pipeline*)malloc(sizeof(struct spek_pipeline));
     p->cx = spek_audio_open(path);
     p->properties = spek_audio_get_properties(p->cx);
     p->bands = bands;
@@ -102,15 +105,15 @@ struct spek_pipeline * spek_pipeline_open(
 
     if (!p->properties->error) {
         p->nfft = 2 * bands - 2;
-        p->coss = malloc(p->nfft * sizeof(float));
+        p->coss = (float*)malloc(p->nfft * sizeof(float));
         float cf = 2.0f * (float)M_PI / p->nfft;
         for (int i = 0; i < p->nfft; ++i) {
             p->coss[i] = cosf(cf * i);
         }
         p->fft = spek_fft_plan_new(p->nfft);
         p->input_size = p->nfft * (NFFT * 2 + 1);
-        p->input = malloc(p->input_size * sizeof(float));
-        p->output = malloc(bands * sizeof(float));
+        p->input = (float*)malloc(p->input_size * sizeof(float));
+        p->output = (float*)malloc(bands * sizeof(float));
         spek_audio_start(p->cx, samples);
     }
 
@@ -189,7 +192,7 @@ void spek_pipeline_close(struct spek_pipeline *p)
 
 static void * reader_func(void *pp)
 {
-    struct spek_pipeline *p = pp;
+    struct spek_pipeline *p = (spek_pipeline*)pp;
 
     p->has_worker_thread = !pthread_create(&p->worker_thread, NULL, &worker_func, p);
     if (!p->has_worker_thread) {
@@ -248,7 +251,7 @@ static void reader_sync(struct spek_pipeline *p, int pos)
 
 static void * worker_func(void *pp)
 {
-    struct spek_pipeline *p = pp;
+    struct spek_pipeline *p = (spek_pipeline*)pp;
 
     int sample = 0;
     int64_t frames = 0;
@@ -340,26 +343,26 @@ static float average_input(const struct spek_pipeline *p, void *buffer)
     float res = 0.0f;
     if (p->properties->fp) {
         if (p->properties->width == 32) {
-            float *b = buffer;
+            float *b = (float*)buffer;
             for (int i = 0; i < channels; i++) {
                 res += b[i];
             }
         } else {
             assert(p->properties->width == 64);
-            double *b = buffer;
+            double *b = (double*)buffer;
             for (int i = 0; i < channels; i++) {
                 res += (float) b[i];
             }
         }
     } else {
         if (p->properties->width == 16) {
-            int16_t *b = buffer;
+            int16_t *b = (int16_t*)buffer;
             for (int i = 0; i < channels; i++) {
                 res += b[i] / (float) INT16_MAX;
             }
         } else {
             assert (p->properties->width == 32);
-            int32_t *b = buffer;
+            int32_t *b = (int32_t*)buffer;
             for (int i = 0; i < channels; i++) {
                 res += b[i] / (float) INT32_MAX;
             }
diff --git a/lib/spek-utils.c b/lib/spek-utils.cc
similarity index 98%
rename from lib/spek-utils.c
rename to lib/spek-utils.cc
index 90d0490..68722c3 100644
--- a/lib/spek-utils.c
+++ b/lib/spek-utils.cc
@@ -1,4 +1,4 @@
-/* spek-utils.c
+/* spek-utils.cc
  *
  * Copyright (C) 2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
diff --git a/po/spek.pot b/po/spek.pot
index 1c9e0d6..d45981e 100644
--- a/po/spek.pot
+++ b/po/spek.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-09-21 19:49-0700\n"
+"POT-Creation-Date: 2013-02-02 19:03-0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -34,179 +34,179 @@ msgstr ""
 msgid "View spectrograms of your audio files"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:38
+#: ../src/spek-audio-desc.cc:36
 #, c-format
 msgid "%d kbps"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:41
+#: ../src/spek-audio-desc.cc:39
 #, c-format
 msgid "%d Hz"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:46
+#: ../src/spek-audio-desc.cc:44
 #, c-format
 msgid "%d bit"
 msgid_plural "%d bits"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../src/spek-audio-desc.cc:52
+#: ../src/spek-audio-desc.cc:50
 #, c-format
 msgid "%d channel"
 msgid_plural "%d channels"
 msgstr[0] ""
 msgstr[1] ""
 
-#: ../src/spek-audio-desc.cc:69
+#: ../src/spek-audio-desc.cc:67
 msgid "Cannot open input file"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:72
+#: ../src/spek-audio-desc.cc:70
 msgid "Cannot find stream info"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:75
+#: ../src/spek-audio-desc.cc:73
 msgid "The file contains no audio streams"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:78
+#: ../src/spek-audio-desc.cc:76
 msgid "Cannot find decoder"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:81
+#: ../src/spek-audio-desc.cc:79
 msgid "Unknown duration"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:84
+#: ../src/spek-audio-desc.cc:82
 msgid "No audio channels"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:87
+#: ../src/spek-audio-desc.cc:85
 msgid "Cannot open decoder"
 msgstr ""
 
-#: ../src/spek-audio-desc.cc:90
+#: ../src/spek-audio-desc.cc:88
 msgid "Unsupported sample format"
 msgstr ""
 
 #. TRANSLATORS: first %s is the error message, second %s is stream description.
-#: ../src/spek-audio-desc.cc:98
+#: ../src/spek-audio-desc.cc:96
 #, c-format
 msgid "%s: %s"
 msgstr ""
 
-#: ../src/spek-preferences-dialog.cc:58
+#: ../src/spek-preferences-dialog.cc:61
 msgid "Preferences"
 msgstr ""
 
-#: ../src/spek-preferences-dialog.cc:63
+#: ../src/spek-preferences-dialog.cc:66
 msgid "(system default)"
 msgstr ""
 
 #. TRANSLATORS: The name of a section in the Preferences dialog.
-#: ../src/spek-preferences-dialog.cc:70
+#: ../src/spek-preferences-dialog.cc:73
 msgid "General"
 msgstr ""
 
-#: ../src/spek-preferences-dialog.cc:79
+#: ../src/spek-preferences-dialog.cc:82
 msgid "Language:"
 msgstr ""
 
-#: ../src/spek-preferences-dialog.cc:95
+#: ../src/spek-preferences-dialog.cc:98
 msgid "Check for &updates"
 msgstr ""
 
-#: ../src/spek-spectrogram.cc:193
+#: ../src/spek-spectrogram.cc:191
 #, c-format
 msgid "%d kHz"
 msgstr ""
 
-#: ../src/spek-spectrogram.cc:198
+#: ../src/spek-spectrogram.cc:196
 #, c-format
 msgid "%d dB"
 msgstr ""
 
 #. TRANSLATORS: keep "00" unchanged, it's used to calc the text width
-#: ../src/spek-spectrogram.cc:304
+#: ../src/spek-spectrogram.cc:302
 msgid "00 kHz"
 msgstr ""
 
 #. TRANSLATORS: keep "-00" unchanged, it's used to calc the text width
-#: ../src/spek-spectrogram.cc:335
+#: ../src/spek-spectrogram.cc:333
 msgid "-00 dB"
 msgstr ""
 
-#: ../src/spek-window.cc:77
+#: ../src/spek-window.cc:75
 msgid "Spek - Acoustic Spectrum Analyser"
 msgstr ""
 
-#: ../src/spek-window.cc:97
+#: ../src/spek-window.cc:95
 msgid "&File"
 msgstr ""
 
-#: ../src/spek-window.cc:103
+#: ../src/spek-window.cc:101
 msgid "&Edit"
 msgstr ""
 
-#: ../src/spek-window.cc:107 ../src/spek-window.cc:112
+#: ../src/spek-window.cc:105 ../src/spek-window.cc:110
 msgid "&Help"
 msgstr ""
 
-#: ../src/spek-window.cc:135
+#: ../src/spek-window.cc:133
 msgid "Help"
 msgstr ""
 
-#: ../src/spek-window.cc:149
+#: ../src/spek-window.cc:147
 msgid "A new version of Spek is available, click to download."
 msgstr ""
 
 #. TRANSLATORS: window title, %s is replaced with the file name
-#: ../src/spek-window.cc:187
+#: ../src/spek-window.cc:185
 #, c-format
 msgid "Spek - %s"
 msgstr ""
 
-#: ../src/spek-window.cc:233
+#: ../src/spek-window.cc:231
 msgid "All files"
 msgstr ""
 
-#: ../src/spek-window.cc:235
+#: ../src/spek-window.cc:233
 msgid "Audio files"
 msgstr ""
 
-#: ../src/spek-window.cc:249
+#: ../src/spek-window.cc:247
 msgid "Open File"
 msgstr ""
 
-#: ../src/spek-window.cc:271
+#: ../src/spek-window.cc:269
 msgid "PNG images"
 msgstr ""
 
-#: ../src/spek-window.cc:277
+#: ../src/spek-window.cc:275
 msgid "Save Spectrogram"
 msgstr ""
 
 #. Suggested name is <file_name>.png
-#: ../src/spek-window.cc:285
+#: ../src/spek-window.cc:283
 msgid "Untitled"
 msgstr ""
 
 #. TRANSLATORS: Add your name here
-#: ../src/spek-window.cc:330
+#: ../src/spek-window.cc:329
 msgid "translator-credits"
 msgstr ""
 
-#: ../src/spek-window.cc:336
+#: ../src/spek-window.cc:335
 msgid "Copyright (c) 2010-2012 Alexander Kojevnikov and contributors"
 msgstr ""
 
-#: ../src/spek-window.cc:339
+#: ../src/spek-window.cc:338
 msgid "Spek Website"
 msgstr ""
 
 #. TRANSLATORS: the %s is the package version.
-#: ../src/spek.cc:100
+#: ../src/spek.cc:98
 #, c-format
 msgid "Spek version %s"
 msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
index 2b76eb9..dcebc91 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,24 +1,24 @@
 bin_PROGRAMS = spek
 
 spek_SOURCES = \
-	spek-artwork.hh \
 	spek-artwork.cc \
+	spek-artwork.h \
 	spek-audio-desc.cc \
-	spek-audio-desc.hh \
+	spek-audio-desc.h \
 	spek-events.cc \
-	spek-events.hh \
+	spek-events.h \
 	spek-platform.cc \
-	spek-platform.hh \
+	spek-platform.h \
 	spek-preferences-dialog.cc \
-	spek-preferences-dialog.hh \
+	spek-preferences-dialog.h \
 	spek-preferences.cc \
-	spek-preferences.hh \
+	spek-preferences.h \
 	spek-ruler.cc \
-	spek-ruler.hh \
+	spek-ruler.h \
 	spek-spectrogram.cc \
-	spek-spectrogram.hh \
+	spek-spectrogram.h \
 	spek-window.cc \
-	spek-window.hh \
+	spek-window.h \
 	spek.cc
 
 spek_CPPFLAGS = \
diff --git a/src/spek-artwork.cc b/src/spek-artwork.cc
index 2e1ffda..56c61f8 100644
--- a/src/spek-artwork.cc
+++ b/src/spek-artwork.cc
@@ -19,7 +19,7 @@
 #include <wx/artprov.h>
 #include <wx/iconbndl.h>
 
-#include "spek-artwork.hh"
+#include "spek-artwork.h"
 
 class SpekArtProvider : public wxArtProvider
 {
diff --git a/src/spek-artwork.hh b/src/spek-artwork.h
similarity index 93%
rename from src/spek-artwork.hh
rename to src/spek-artwork.h
index 4061420..b461379 100644
--- a/src/spek-artwork.hh
+++ b/src/spek-artwork.h
@@ -1,4 +1,4 @@
-/* spek-artwork.hh
+/* spek-artwork.h
  *
  * Copyright (C) 2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_ARTWORK_HH_
-#define SPEK_ARTWORK_HH_
+#ifndef SPEK_ARTWORK_H_
+#define SPEK_ARTWORK_H_
 
 #include <wx/string.h>
 
diff --git a/src/spek-audio-desc.cc b/src/spek-audio-desc.cc
index fdbe67f..f1cd229 100644
--- a/src/spek-audio-desc.cc
+++ b/src/spek-audio-desc.cc
@@ -19,11 +19,9 @@
 #include <wx/arrstr.h>
 #include <wx/intl.h>
 
-extern "C" {
 #include <spek-audio.h>
-}
 
-#include "spek-audio-desc.hh"
+#include "spek-audio-desc.h"
 
 #define ngettext wxPLURAL
 
diff --git a/src/spek-audio-desc.hh b/src/spek-audio-desc.h
similarity index 91%
rename from src/spek-audio-desc.hh
rename to src/spek-audio-desc.h
index 85e43b7..5a66776 100644
--- a/src/spek-audio-desc.hh
+++ b/src/spek-audio-desc.h
@@ -1,4 +1,4 @@
-/* spek-audio-desc.hh
+/* spek-audio-desc.h
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_AUDIO_DESC_HH_
-#define SPEK_AUDIO_DESC_HH_
+#ifndef SPEK_AUDIO_DESC_H_
+#define SPEK_AUDIO_DESC_H_
 
 #include <wx/string.h>
 
diff --git a/src/spek-events.cc b/src/spek-events.cc
index a518ce3..918f467 100644
--- a/src/spek-events.cc
+++ b/src/spek-events.cc
@@ -16,7 +16,7 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "spek-events.hh"
+#include "spek-events.h"
 
 //IMPLEMENT_DYNAMIC_CLASS(SpekHaveSampleEvent, wxEvent)
 DEFINE_EVENT_TYPE(SPEK_HAVE_SAMPLE)
diff --git a/src/spek-events.hh b/src/spek-events.h
similarity index 96%
rename from src/spek-events.hh
rename to src/spek-events.h
index 5179de2..8d655d3 100644
--- a/src/spek-events.hh
+++ b/src/spek-events.h
@@ -1,4 +1,4 @@
-/* spek-events.hh
+/* spek-events.h
  *
  * Copyright (C) 2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_EVENTS_HH_
-#define SPEK_EVENTS_HH_
+#ifndef SPEK_EVENTS_H_
+#define SPEK_EVENTS_H_
 
 #include <wx/wx.h>
 
diff --git a/src/spek-platform.cc b/src/spek-platform.cc
index 5654a8a..25a7e2e 100644
--- a/src/spek-platform.cc
+++ b/src/spek-platform.cc
@@ -26,7 +26,7 @@
 #include <wx/stdpaths.h>
 #include <wx/utils.h>
 
-#include "spek-platform.hh"
+#include "spek-platform.h"
 
 void spek_platform_init()
 {
diff --git a/src/spek-platform.hh b/src/spek-platform.h
similarity index 94%
rename from src/spek-platform.hh
rename to src/spek-platform.h
index 4a61cd5..459836b 100644
--- a/src/spek-platform.hh
+++ b/src/spek-platform.h
@@ -1,4 +1,4 @@
-/* spek-platform.hh
+/* spek-platform.h
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_PLATFORM_HH_
-#define SPEK_PLATFORM_HH_
+#ifndef SPEK_PLATFORM_H_
+#define SPEK_PLATFORM_H_
 
 #include <wx/string.h>
 
diff --git a/src/spek-preferences-dialog.cc b/src/spek-preferences-dialog.cc
index f7d9c56..541990f 100644
--- a/src/spek-preferences-dialog.cc
+++ b/src/spek-preferences-dialog.cc
@@ -16,10 +16,10 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "spek-platform.hh"
-#include "spek-preferences.hh"
+#include "spek-platform.h"
+#include "spek-preferences.h"
 
-#include "spek-preferences-dialog.hh"
+#include "spek-preferences-dialog.h"
 
 // List all languages with a decent (e.g. 80%) number of translated
 // strings. Don't translate language names. Keep the first line intact.
diff --git a/src/spek-preferences-dialog.hh b/src/spek-preferences-dialog.h
similarity index 90%
rename from src/spek-preferences-dialog.hh
rename to src/spek-preferences-dialog.h
index e9267b7..aaf8b31 100644
--- a/src/spek-preferences-dialog.hh
+++ b/src/spek-preferences-dialog.h
@@ -1,4 +1,4 @@
-/* spek-preferences-dialog.hh
+/* spek-preferences-dialog.h
  *
  * Copyright (C) 2011-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_PREFERENCES_DIALOG_HH_
-#define SPEK_PREFERENCES_DIALOG_HH_
+#ifndef SPEK_PREFERENCES_DIALOG_H_
+#define SPEK_PREFERENCES_DIALOG_H_
 
 #include <wx/wx.h>
 
diff --git a/src/spek-preferences.cc b/src/spek-preferences.cc
index ae7cfec..c46f177 100644
--- a/src/spek-preferences.cc
+++ b/src/spek-preferences.cc
@@ -18,9 +18,9 @@
 
 #include <wx/string.h>
 
-#include "spek-platform.hh"
+#include "spek-platform.h"
 
-#include "spek-preferences.hh"
+#include "spek-preferences.h"
 
 SpekPreferences& SpekPreferences::get()
 {
diff --git a/src/spek-preferences.hh b/src/spek-preferences.h
similarity index 93%
rename from src/spek-preferences.hh
rename to src/spek-preferences.h
index 9658043..eee3dc4 100644
--- a/src/spek-preferences.hh
+++ b/src/spek-preferences.h
@@ -1,4 +1,4 @@
-/* spek-preferences.hh
+/* spek-preferences.h
  *
  * Copyright (C) 2011-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_PREFERENCES_HH_
-#define SPEK_PREFERENCES_HH_
+#ifndef SPEK_PREFERENCES_H_
+#define SPEK_PREFERENCES_H_
 
 #include <wx/fileconf.h>
 #include <wx/intl.h>
diff --git a/src/spek-ruler.cc b/src/spek-ruler.cc
index 93e47de..3ad6dd5 100644
--- a/src/spek-ruler.cc
+++ b/src/spek-ruler.cc
@@ -18,7 +18,7 @@
 
 #include <cmath>
 
-#include "spek-ruler.hh"
+#include "spek-ruler.h"
 
 SpekRuler::SpekRuler(
     int x, int y, Position pos, wxString sample_label,
diff --git a/src/spek-ruler.hh b/src/spek-ruler.h
similarity index 95%
rename from src/spek-ruler.hh
rename to src/spek-ruler.h
index 9b5304e..2a57c3f 100644
--- a/src/spek-ruler.hh
+++ b/src/spek-ruler.h
@@ -1,4 +1,4 @@
-/* spek-ruler.hh
+/* spek-ruler.h
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_RULER_HH_
-#define SPEK_RULER_HH_
+#ifndef SPEK_RULER_H_
+#define SPEK_RULER_H_
 
 #include <wx/dc.h>
 #include <wx/string.h>
diff --git a/src/spek-spectrogram.cc b/src/spek-spectrogram.cc
index 6f98624..0ffdb3f 100644
--- a/src/spek-spectrogram.cc
+++ b/src/spek-spectrogram.cc
@@ -20,19 +20,17 @@
 
 #include <wx/dcbuffer.h>
 
-extern "C" {
 #include <spek-audio.h>
 #include <spek-palette.h>
 #include <spek-pipeline.h>
 #include <spek-utils.h>
-}
 
-#include "spek-audio-desc.hh"
-#include "spek-events.hh"
-#include "spek-platform.hh"
-#include "spek-ruler.hh"
+#include "spek-audio-desc.h"
+#include "spek-events.h"
+#include "spek-platform.h"
+#include "spek-ruler.h"
 
-#include "spek-spectrogram.hh"
+#include "spek-spectrogram.h"
 
 BEGIN_EVENT_TABLE(SpekSpectrogram, wxWindow)
     EVT_CHAR(SpekSpectrogram::on_char)
diff --git a/src/spek-spectrogram.hh b/src/spek-spectrogram.h
similarity index 94%
rename from src/spek-spectrogram.hh
rename to src/spek-spectrogram.h
index 25bd5db..e39c20a 100644
--- a/src/spek-spectrogram.hh
+++ b/src/spek-spectrogram.h
@@ -1,4 +1,4 @@
-/* spek-spectrogram.hh
+/* spek-spectrogram.h
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_SPECTROGRAM_HH_
-#define SPEK_SPECTROGRAM_HH_
+#ifndef SPEK_SPECTROGRAM_H_
+#define SPEK_SPECTROGRAM_H_
 
 #include <wx/wx.h>
 
diff --git a/src/spek-window.cc b/src/spek-window.cc
index 0227bc3..dca6733 100644
--- a/src/spek-window.cc
+++ b/src/spek-window.cc
@@ -26,16 +26,14 @@
 // WX on WIN doesn't like it when pthread.h is included first.
 #include <pthread.h>
 
-extern "C" {
 #include <spek-utils.h>
-}
 
-#include "spek-artwork.hh"
-#include "spek-preferences-dialog.hh"
-#include "spek-preferences.hh"
-#include "spek-spectrogram.hh"
+#include "spek-artwork.h"
+#include "spek-preferences-dialog.h"
+#include "spek-preferences.h"
+#include "spek-spectrogram.h"
 
-#include "spek-window.hh"
+#include "spek-window.h"
 
 DECLARE_EVENT_TYPE(SPEK_NOTIFY_EVENT, -1)
 DEFINE_EVENT_TYPE(SPEK_NOTIFY_EVENT)
diff --git a/src/spek-window.hh b/src/spek-window.h
similarity index 95%
rename from src/spek-window.hh
rename to src/spek-window.h
index f8a27ae..d9edc18 100644
--- a/src/spek-window.hh
+++ b/src/spek-window.h
@@ -1,4 +1,4 @@
-/* spek-window.hh
+/* spek-window.h
  *
  * Copyright (C) 2010-2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
@@ -16,8 +16,8 @@
  * along with Spek.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef SPEK_WINDOW_HH_
-#define SPEK_WINDOW_HH_
+#ifndef SPEK_WINDOW_H_
+#define SPEK_WINDOW_H_
 
 #include <wx/wx.h>
 
diff --git a/src/spek.cc b/src/spek.cc
index e8c922b..eabb039 100644
--- a/src/spek.cc
+++ b/src/spek.cc
@@ -20,15 +20,13 @@
 #include <wx/log.h>
 #include <wx/socket.h>
 
-extern "C" {
 #include <spek-audio.h>
-}
 
-#include "spek-artwork.hh"
-#include "spek-platform.hh"
-#include "spek-preferences.hh"
+#include "spek-artwork.h"
+#include "spek-platform.h"
+#include "spek-preferences.h"
 
-#include "spek-window.hh"
+#include "spek-window.h"
 
 class Spek: public wxApp
 {
diff --git a/tests/test-utils.c b/tests/test-utils.cc
similarity index 99%
rename from tests/test-utils.c
rename to tests/test-utils.cc
index 322e105..9d55e5b 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.cc
@@ -1,4 +1,4 @@
-/* test-utils.c
+/* test-utils.cc
  *
  * Copyright (C) 2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *
diff --git a/tests/test.c b/tests/test.cc
similarity index 98%
rename from tests/test.c
rename to tests/test.cc
index d2c628f..7cfafff 100644
--- a/tests/test.c
+++ b/tests/test.cc
@@ -1,4 +1,4 @@
-/* test.c
+/* test.cc
  *
  * Copyright (C) 2012  Alexander Kojevnikov <alexander@kojevnikov.com>
  *