Addressed type conversion warnings and other minor compiler warnings