internal refactoring & cleanup