Fixed some syntax errors and added migrations