added asInt
added some tests
cleanups