Fixes #17
Improve compile script

Only recompile what has changed
Merged 'develop'.