Fixed category logic in controllers and forms; converted edit and new views to haml.