Added case handler and functions for different actions

So far there is a bare bones links and count process.