Vastly simplified codebase by using Jan's new libraries.