Changed static file references to absolute paths so they work for arbitraty resources; decoupled interface and implementation of database access