Remove unneeded stuff in makefile
Fix dependencies and update layout of
Add basic error handling