Generated profiles controller, added test cases