Reworked the overall framework and added database access instead of file.