Fixed incorrect push which does not work in older perl versions.
Code cleanup.