reorganized scheduling into seperate functions for code reuse

added most error checking in message passing system calls

as part of the error checking, initialized all TIDs to -1 so we can know if a task has been created or not
redid memcpy in assembly
added some tests