Fixed some bugs. Some more bugs remain. Entities dying extremely fast now..