Add loop table structures

Converting loop tables to code form
Later will load from fil