Made more modular for importing.