reworked structure a bit, changed the interface from terminal to a custom implementation, cleaned up decs/comments