Fixed code style & added few extra checks.
Updated cart documentation.