Implemented security group rules and wrote rspec tests for them
Got rid of some code duplication in the chains module