Made various vals in constructor private. Made database lazy.