some refactor on the guest code to make it clearer and also to make the views prettier