Modified that using multiple primary keys and unique keys.
Moved all logic in Master to PWBasicController.