Cleaned up code. yey