BaseMixin utility, indentation fixes

Created a BaseMixin class providing utility functions for model classes (again a cosmetic change for easier refactoring, if the need ever be). Fixed some weird indentation here and there.