Fixes and other

Some minor code fixes or updates (like deprecated calls).