cleaned up old code
refactored compile parameter parsing
added option to define // main: