Better memory handling with separate memory portions; added fileio.c for code input/output.