parse package.json instead of hardcoding version
refactored code into an actual library and added some mysql tests