Fixed broken main classes and unit tests after last commit.