Get the compilation running on Debian Wheezy. Cleanup of code needed.