added support for directly using input var in fragment
refactoring + started working on h2d changes