fix no-args int() call
minor code cleanup
extend test