Made it compilable with clang and fixed all the warnings with -Wall

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>