Added level line tests, created a util class/method and did some package refactoring