Adding the main UI + re-factoring