Adds full functionality and tests