Code refactor & default image fix