config
made shorturl optional
added logging and refactored