Added MaxSize configuration option. Small fixes.