Fix code convention violations
Added test cases