Refactored makefiles.
Minor updates, fixed compilation.