cleaning up ui and connecting the dots between all the components