Removed temporary files, fixed compilation errors and arguments inversion