Refactoring and Admin Functionality added