Move database parsing and knowledge base creating into it's own seperate file.