Cleaned up the code structure a little bit