Fixed build system and added license header to *.h files.