optimisations

A few optimisations done, to meet the WordPress API
recommendations/requirements