Updated to store data

Updated dated to store data in tables.  Other fixes were made because
of errors being thrown.