Cleaning up.
Rehauled priority queue, fixed calculations around limits.
Cleanup of signatures.