Merging in Final code