Refined some data types and var names.