refactoring code to use associations. cleanup controllers (catagory and topic).