Cleaned up code: replaced literals with terminal vars where appropriate
within code.