Improves problem statement, and merges main question.
Adds explanation to optimisations and adds to input methods.