refactoring: move getType and readings to PapillonCore.hs