Updated for easier and cleaner usage.