strip trailing slash
remove useless stuff