Added update and snap retrieval functions (and fixed some weird indenting)