Refactored prompt command parser to work with all window types and moved command stuff to separate files