Moved cancel method.
Minor changes.
Fix bug. Moved methods around.