Almost finished skeleton generation. Still need some fixes.