Added a controller and moved all the application logic to it.
Added gender selection feature