Move types into a separate module.
Clean up number/identifier finding functions.