Cleanup code for jsmag feb branch