Fix bug in makefiles, add more modelines and...

some restructuring