Fixes issue #5 + some style changes