general refactoring, cleaning up, default values, interface implementation