Various bug fixes and quality of life changes.
Merge branch 'scalaness' of https://github.com/pchapin/scala into scalaness