Consumes migration2

consumes migration and code clean up