Code organisation, makefile improvements.