Fixed some errors. Cleaned up