unify stuff, added a few comments