clean up media type parsing, move out token regexp to acceptable module