Refactor variable names and readline init