rework of codebase, updated readme and tests