module refactors and improved tests
minor updates