it's a big one: fixed race condition and added JSON api for blockroutine routes

see 702f046 for details