test/fix simple variable binding & resolution
fix function definitions