Clean up and templatize PM system. Add table for file uploads.