Basic Pattern Functionality

Needs a lot of work.