Fixed a couple issues, tests passing