getConfig method, cleanup