Some cleanup

This is most cleanup to make the code conform to astropy coding standards a little better.