Add migrations, remove CVS and fix code to working state