#55 and #56

This PR implements #55 and #56.