Some fixes for various issues and delete unnecessary files