fixed a null bug, some cleanup, tweaked config