Working innards

Also deletes files no longer in use.