Cleaning up/fixing some code.