cleaned up p.proto, reorganized directory structure