Consolidated PR (24/25)

This is the sum of #24 and #25.