Fixed some calling issues and test suite