Cleaned up add_code debug code
Now getting code from sqlite db