Code cleanup for modern updates and short code check