this is the first step of making the code follow the default jslint behaviour, I also manually changed some { } to make it reasonable in addition to replacing tabs