Reorganize code layout

* Move CodeContext creation into its own build step
* Move language validation to its own function
* Finish extracting lang, codeContext
* Simplify line based path
* Separate line and file/selection runs
* Simplify code context selection