Added pair ToSlice function (this should make function definition much easier
Added more type safety, anotations about safety (and lack of) and TODO functions