Refactored subjects controller