some code refactoring, more organization
reorganized attributes, defaults