Fixed rendering bug with DeleteComment

Also refactored a bit more and moved around code for readability