Prepared several interfaces to make the code more modular and easier to control.