Cleaned up all the code a bit