More small improvements and cleanup of build system