Documentation, move some functions inside the method, and WordPress coding standards updates