moved auto-code creation to create function in samples controller.
Added extra entries to test database.