Refactors, Added target features

Refactored the library by separating out kernel and api. Added
implementation and tests for adding feature targets.