minor code formatting
updated error messages
added duplicate() method
updated default role handiing
added named scopes