More cleaned up converted code