Implemented additional binding through the BasicPattern#as method.  Cleaned up the code as well.