Huge overhaul of code, getting ready for release