Cleaned up semi-Mojang code