use get_basename() everywhere
prettier source
even prettier code
CALC command