Improve struct constructor