change package; add database access class; add template files