Bug fixes and renamed test class
Added tests, cleanup