cleanup/refactoring + docs