New functions and tweaks