Changes C-style casts to static_cast

Issue: #36