General code modifications