Cleaned up code, comments