Refactor hadoop installation