Moved validations & chart into separate methods.