some cleanup
use int instead of long for now
main function suprresed for now.