Reworking stuff, fixing bugs