Moved core views functions to a dedicated ns under views