Tweaked some functions