Adding namespace to definitions + some renaming + minor fixes