Revert 94d7023..5975d26

This rolls back to commit 94d7023a7f4cd448ca33d6fc35fd224df486562d.
Resolved conflicts in main.php