Add in hacks for Android, minor code changes

Two new config options to allow for Android support - imprecision and floats. Also tidied up the code a little and changed the demo file a little.