Fixed Runtime Version issue and cleaned some code.