Implemented functions as object properties, refactored tests