Updated functionality for analysis and moved htmltables into seperate database for faster extraction