Added RUnit tests
Added comments