Added formated HTML to system messages + minor code cleanup