rewritten some core components + documented source code