Rudimentary substitution engine
Move data to data.h
Fix replacement engine