added todos
added Measurement class and changed error handling (messy commit)
added tests