Added more tests
Added semicolon to snippet and improved snippet testing function