Recording transaction in database now. Basics structure done.