Integration to admin and code refactoring