better handling of exponent numbers
Added program exit
seperated into modules
updated example