Fixed line endings. Overhauled the interface system to be more modular
and removed some redundant code.