added some format fixes and function renames