Folder contents popover position fixes and minor render code cleanup

This fixes a couple of minor popover position issues where the popover will be 10px too high on the second view.

Also moves some render code into an event for less code redundancy and more extendability.