reworked some task basics

Changed how task are setup and then called. This way they function
better and eat up less memory. As well i removed how the base task
stored variables. Now the program itself keeps a ref to the machine, and
its location. This will save on a good bit of memory as each task was
holding a memory location for this.