Multiple optimizations; added scheduling and priority support. Added pickle-support.