Order of Operation Fix

Fixed some functional flows - primarily in regard to database creation