(*) Cleanup and refactor

(*) Reduce code reuse
(*) Convert double properties/fields to float