Merged some stuff from master in