Add some usefull methods and remove unsafe code