Added migrations classes. Code cleanup.