Fix animation issues

Fix animation issues within the adapter. The start value was not
calculated correctly, and also the return value during animation was not
working correctly
Fix optimization

Optimized the return value calculation on arrays. Which were already set
to numeric. Moved the regular expression out.
Merge pull request #2 from jdoubleu72/master

Fix animation issues