Added capability request. Opimizations and comments added.