DLS Complete. Removed testing functions