First of all make sure your ammonia test is correct. Some cheap tests, are just that and are often inaccurate. A slight trace trace can cause fish to stess and hide and corals to close tight. If there is indeed ammonia in your tank find out why as mentioned above. Do a water change, about %30, then test, then repeat if needed. The flake food will not directly cause ammonia, if frozen food does not get eaten you will get the same results. How thick is your sand bed and what type of substrate are you using? your tank may not be effectively breaking down wastes if there is not enough area, ie live rock and live sand, to harbor bacteria. I would remove the rubble and the bio grid from your filter, the rubble acts just like any biological media when put in that situation. Remove them one at a time, grid, then a week later rubble or vise versa. If your trates have just all of sudden started to rise after previously testing zero then you may have a nitrate factory on your hands. Either way the media in your filter will cause a factory eventually and you might as well pull them out now. Always observe your tank when making changes, how the fish are acting as well as testing. HTH