fixed some bugs and cleaned up some folder