Added additional comments and cleanup