Removed unused code.
Improved argument passing.
Fixed bug, Order of queue changed when switching between free pin
and all samples.
Removed unused members and code
Resolved reference to task