Cleaned up measures.jl