Aims to solve bugs related to objects not being cleared when they should. Currently fixes a few things: