Added some changes, clean up the code and redundant files