Added security group entity and fixed a bug around node creation that stemmed from earlier refactoring.