Added profiling. Fixed makefile a bit.