namespaced devices under api
added model associations