Lots of bug fixes and filled in missing methods