Minor code clean up. Added doc strings