Bug fixes, code integration and renaming of functions