All fields now generated
Added database code and a first test