refactoring,apropriate intendation,error handling,rename lib,edit Makefile