Cleanup & apply POSIX extended shell