Added categories

also fixed search and added relations in models