split out less compile logic into separate module

split out less compile logic into separate module for readability.