Changed file extension, separated logic and data, added try/finally for cleanup, switched to env(8), changed explicit variable boolean to flow control (break)