Code cleanup, log warnings if unknown elements are encountered