Implemented first  version of core functionality.