Fixed some bugs with the multiple inheritance, reformatted, refactorings of precondition checks.