fix binary systems
code cleanup