major refactor
cleanup