refactor to external modules
remove unused module references