Minor changes

Class method in a better order, all code following the same code
convention and added/splitted a couple of errors.