Removed duplication
Formatted code
Removed unused ngbp code