Small bugs fixed and removed old stuff