Refactored, updated file structure
Add flash errors to prevent duplicate registrations