Added general view handler and view cleanup procedures. Functionality tweaks.