made some changes to controllers and layout