Logic update, fixing space, adding comments