Main functionality. (Use at your own risk)