Change naming of functions and variables. Clean the code

A better basis to start.