more code cleanup, brought added code into greater conformance with original codebase