Starting work on refactoring the code to meet WP code standards