Changed how the main interface is loaded + cleanup.