Extracted some methods from my spaghetti code

Tried to increase readability/maintainability by breaking down a large
method into smaller ones
Evaluate registers as expressions (and echo)