Refactored Router and Controller models