restructured pre command checks for the prompt

main goal is to get it working faster than now