Adding seekbar functionality and revamping code