Removed unreachable code and use Int instead of Integer