Added 'get' function and exit statements
Changed 'get' to work correctly