Fix issue where some cassandra permissions for some commands were not consisistent with SQL versions.
Minor code refactoring to remove magic numbers.
Add missing javadoc for some classes.