Tweaking some code