Bug update framework

@Kevinwlee 

Small changes, see commit messages.