refactored variable usage in main.coffee