Added Tests for new features
Fixed some build errors