Updated to remove unused code