fixes and basic conditional compilation