SHA512withRSA - Looking for details about the Signature Algorithm
References

Related to your reference request: SHA512withRSA points to the RSA Signature Scheme with Appendix based on PKCS #1 v1.5 with SHA-512 hash function.

This means you’re looking for reference documentation describing RSA PKCS1 v1.5 (see: RFC2313) signatures with SHA512 (see: RFC6234) hash and X.509 encoding format.

Removing “overhead” from code

As for the part of your question on how to achieve the removal of overhead in your code: diving into that could quickly become off-topic for Crypto.SE and it would probably be more suitable for StackOverflow anyway. Nevertheless – since your question indicates you’re new to the reference documentations and RFCs describing SHA2, RSA, etc. – I would like to add my two cents to your code-modification idea…

Cryptographic implementations rarely contain or produce (what you call) “overhead”. Therefore, I would like to strongly discourage you from stripping or modifying any part of code that represents, interacts, or relates to cryptographical algorithms or schemes. Doing so has a high probability of introducing issues – which might range from simple software bugs, up to a dangerous situation where the removal of code is equal to the voiding (= removal) of cryptographic security. You surely don’t want the later to happen. Instead of fiddling with the code, you should simply rely a tested and well-vetted implementation. There are many of them out there, available in almost every programming language you could wish for.