Added brakeman for security testing, minor refactoring and convenience methods added - test changes to come