Slight code modifications