Merged with bcoles branch