Improved convoluted design a little
Improved code clarify with comments and better variable names