major refactor: allow compatibility with astropy 0.2.4