Aesthetic changes

Minor changes and fixes to realtime
Updated for PHP 5.3 compatibility