Fixed routes ordering and added controllers with functions