fixed FMS compilation
removed tmp file
fixed misc problems after refactoring