Added single parameter __init__ and renamed main to discrete.