Initial commit of old code, plus bug fixes and changes