Made code a bit more efficient and nearly finished skeleton parsing