Cleaned code, added try/catch to proCheck, troubleshooting db.update()