Added prototype functionality

all sorts of fun stuff in here