Pattern selection ui and model implementation.
Fixing bug with rendering current pattern.