Nail main functionality