Implemented most basic functionality