Fixed some things based on Kehlim's recommendations