Simplified code. Added ShortCode support.