Fixed div wrapping and added defaultcategoryid
added tests