Added conversion functions
minor reformatting
minor reformatting
minor corrections