random cleanup, lot of stuff changed, don't ask :P