Fixing random TODOs, adding maxsize config