Addition of history management (still needs work) and separating code
out.