Rackspace rebuild2

completed refactoring ready to merged into master.