Moving common behavior in abstract class, update enhancements, Javadoc, code formatting.