Fixes variable passed by reference error.
Added check to ensure empty themes (themes that have been removed) aren't shown (even with incomplete info).
Fixes declaration compatibility for strict standards