Minor change and bug fix

A bug in __getslice__ method was fixed. Also, built-in get method for dictionary was used instead of try-except structure.