tons of fixes. Special thanks to MWIsBest