Added final code and migration