Moves common code to common/ and updates project files