Code revisions

overall code revisions