Removed migration and small refactoring