Minor changes
Added a ref
Various changes