Massive refactoring: splitting up ProductContext; using LayoutParams instead of ProductParams; adding VariableContext class (extracted from previous behavior). Fixed a bug where relative_paths were being greedily stripped of their prefixes (glob_sources)