Move lookup table to seperate function.
Split common.h into a header and an implementation file.
Add definition for inline when building with Visual Studio.