Account Capabilities

Added methods and tests for account capabilities, test sql data, cleaned
up code