Cleaned up some code and made it a bit more efficient