Reorganised sources, fixed linker settings