Various code modifications needed