avoid js errors that break admin
fixed undefined var notices, removed closing php tag
added 'static' keyword to methods to avoid 'non-strict method x...' errors, commented out useless ob_start() which was immediately followed by ob_end_clean() (wtf?), fixed deprecated current_user_can() call
trailing whitespace removed
Merge branch 'fix-debug-warnings'