Cleaned up and fixed errors WIP