Implemented view collapse