Some refactors and bugfixes

For learn and understand how apidoc and @rottmann mind works to learn how develop features i'm reading the full code. I'm started to make some refactors for make better read. Please check and if you are disagree with some part i will check.For learn and understand how apidoc and @rottmann mind works to learn how develop features i'm reading the full code. I'm started to make some refactors and little bugfixes for make better read. Please check and if you are disagree with some part i will check.