Reorganise into separate folders for client, server and common code