Implemented #193 parts 1-3
Migration for #193