Implemented the core functionality

It has not been tested yet but the core functions discussed in the group
have been implemented. There might be errors throughout the code syntax
and functionality wise.