Cleaned up code and removed comments