Started again slowly, no fluff

I've started re-writing the core function from scratch. Once that's
complete I can work on text instructions and input sanitising.