Better input with Readline Refactoring of .h files

restructured .h files into just declarations with the functions in .c
files
got better input with readline dealt with empty input segfault