Added interactive mode using ipython & code cleanup