first very ugly refactor of the core.make-file