Added test cases, documentation
Deprecated old code that duplicates existing functionality