Merged changes and updated Tests