Separated into modules. Additional utilities.