Added object cleanup, more specs and removed dead code