Added button weights
Re-wrote sanitization code