Addition of lookup table and functions using lookup table

Not positive that lookup table is stored in flash at the moment... but
functionality of functions is very similar to previous ones so we may as
well get used to using them.