Updated scripts to work with TraP R2 databases (only with TraP R1 functionality). Still need to correct machine learning part...