Refactor UI code; added some Git ignores