changed directories and fixed some bugs