layout update and pythonic precondition
Merge pull request #6 from Bryukh/patch-2

layout update and pythonic precondition. 

I thought this task is in the past already)