Ported to Coffee, updated to use Q