Working on #37 and other small fixes