Cleaned up the code, now it should be readable