core: basic capture functionality, as yet mostly untested