Local keyword semantics

1. Semantic implementation of local variables
2. Testcases for local
Sorry, accidental. will remove