Remove the logic from views