Cleanup: fix some static analysis warnings

 * Use named constants instead of magic numbers for FTP error codes
 * Reduce visibility of methods and fields
 * Use more readable `for` loops