Data has been separated out from code keeping the API unchanged. Also
added two functions to get and set the data.
This will allow the user to have custom data.