use singleton decorator
styling fixes according to PEP8