Implements #37, #36, #34