Shrink core

This pull request is for review.