Fixed: measurements is now empty list if empty, not none.

Thanks to this the builtin pop can safely be used and less checking is needed.