Some functionality and tests added