Added some examples and implemented a couple useful core functions