Improved types to make errors impossible