Move the views' logic to a framework independant module