Setting up views and sepearting out logic to manage easier