added controller and sort functions in labeled areas
added comment details, formatting some
final changes