added code koi stream, slight cleaning on layouts