Code cleanup from IDEA recommendations