Just put some random js almost refactored code in git