Re-factor into some object structure, basic testing and packaging.