fixes+improvements based on PR comments