This commit changes how projects are handled internally so that projects can be renamed. This commit also fixes some bugs, and removes redundant code.