Improved malloc() and removed unnecessary 'puts' and 'printf's' from processInput()