update - clean code, comments, renames, etc