Cleaned up code and removed some unnecessary files