Convert instance variables to properties
Clean up some small code tweaks