Tidying

Put everything into it's own subscript to get everything tidied up.
Should make simplifying and reviewing code simpler in the future.
Standard really