DanilF: Added more functionality and tests