Added variable declarations
Changed some int variables to doubles
Added user options
Added user PIN parameter
Added user option conditions