added proper namespacing and traits and fixed few errors