TKO - Drop Legacy Database Layer and CGI scripts

This is a followup for the pull request #663.

For some reason github was showing a radical history change when compared to my local repo.