Refactory source code structor