Some new functions and name fixing