Added several tests
Merged with master