Added testcases and refactored structure a little