Added functional testing and migrations