Many changies

Init state function, mouse listener, singleshot and centered drawing