Implemented most of functionality; UI work at most is remained