More refactoring, code usage improvements, and bug fixes